SumOfCoefficientsPrior.dummy_observations#

SumOfCoefficientsPrior.dummy_observations(context)[source]#

One row per variable, centred on its pre-sample mean.

The target block is \(\lambda_5 \operatorname{diag}(\bar y)\); the design block repeats it in every lag position, with the deterministic columns supplied by the context’s _lead – as many zero columns as the design has deterministic terms, so the block lines up under a constant, a constant and trend, or a panel’s fixed effects alike – and zeros under any exogenous regressors.

Parameters:

context (_PriorContext) – The sample description; k_endog, order, presample_mean, n_deterministic, and k_exog are read.

Return type:

tuple[NDArray[double], NDArray[double]]

Returns:

A (k, k) target block and a (k, width) design block.

Raises:

SpecificationError – If tightness is not positive.

Example

Under a constant and a trend the row carries two leading zeros:

>>> 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,
... )
>>> SumOfCoefficientsPrior(tightness=0.5).dummy_observations(ctx)[1]
array([[ 0.,  0.,  5.,  0.],
       [ 0.,  0.,  0., 10.]])