MinnesotaPrior.coefficient_mean#
- MinnesotaPrior.coefficient_mean(context)[source]#
Each variable’s own first lag at
persistence, everything else zero.The random-walk centre: row
lag_offset + jof columnjholds that variable’spersistence, and every other entry – the deterministic block, the cross lags, the longer own lags, the exogenous block – is zero.- Parameters:
context (
_PriorContext) – The sample description;k_endog,width, andlag_offsetare read.- Return type:
- Returns:
A
(width, k)array in design-column order.- 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.zeros(2) ... ) >>> MinnesotaPrior(persistence=(1.0, 0.0)).coefficient_mean(ctx) array([[0., 0.], [1., 0.], [0., 0.]])