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 onpersistencetimes its pre-sample mean, scaled bysum_of_coefficients, or the empty blocks when that field isNone.- Parameters:
context (
_PriorContext) – The sample description;k_endog,order,presample_mean,lag_offset, andk_exogare read.- Return type:
- Returns:
A
(k, k)target block and a(k, width)design block whensum_of_coefficientsis set;(0, k)and(0, width)otherwise.- Raises:
SpecificationError – If a hyperparameter is out of range.
DimensionError – If
persistencehas the wrong length.
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)