IndependentNormalWishartPrior.dummy_observations#

IndependentNormalWishartPrior.dummy_observations(context)[source]#

The sum-of-coefficients rows, when that restriction is asked for.

Delegates to MinnesotaPrior.dummy_observations() through _minnesota(): one row per variable centred on persistence times its pre-sample mean, scaled by sum_of_coefficients, or the empty blocks when that field is None.

Parameters:

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

Return type:

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

Returns:

A (k, k) target block and a (k, width) design block when sum_of_coefficients is set; (0, k) and (0, width) otherwise.

Raises:

Example

>>> 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]),
... )
>>> IndependentNormalWishartPrior(sum_of_coefficients=0.5).dummy_observations(ctx)[1]
array([[ 0.,  5.,  0.],
       [ 0.,  0., 10.]])
>>> IndependentNormalWishartPrior().dummy_observations(ctx)[1].shape
(0, 3)