DummyInitialObservationPrior.dummy_observations#
- DummyInitialObservationPrior.dummy_observations(context)[source]#
A single artificial observation at the pre-sample means.
The target is \(\delta \bar y^\top\); the design row carries \(\delta\) in every deterministic column, supplied by the context’s
_leadso that a constant, a constant and trend, and a panel’s fixed effects are all switched on alike, then \(\delta \bar y^\top\) at each lag, and zeros under any exogenous regressors. With no deterministic terms the row is the lag part alone.- Parameters:
context (
_PriorContext) – The sample description;k_endog,order,presample_mean,n_deterministic, andk_exogare read.- Return type:
- Returns:
A
(1, k)target block and a(1, width)design block.- Raises:
SpecificationError – If
tightnessis not positive.
Example
Under a constant and a trend both deterministic columns are set to the tightness:
>>> import numpy as np >>> from cultivars.bayes.priors import PriorContext >>> ctx = PriorContext( ... k_endog=2, order=1, scales=np.ones(2), ... presample_mean=np.array([10.0, 20.0]), n_deterministic=2, ... ) >>> DummyInitialObservationPrior(tightness=0.5).dummy_observations(ctx)[1] array([[ 0.5, 0.5, 5. , 10. ]])