MinnesotaPrior._persistence#
- MinnesotaPrior._persistence(context)[source]#
Broadcast the prior mean of the own first lags to one value per variable.
A scalar
persistenceis repeatedk_endogtimes; a sequence is taken as given after its length is checked. Called bycoefficient_mean()anddummy_observations(), the two places the centre enters, so the two cannot disagree.- Parameters:
context (
_PriorContext) – The sample description; onlyk_endogis read.- Return type:
- Returns:
(k,)prior means, one per variable in column order.- Raises:
DimensionError – If
persistenceis a sequence whose length is notk_endog.
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=0.9)._persistence(ctx) array([0.9, 0.9]) >>> MinnesotaPrior(persistence=(1.0, 0.0))._persistence(ctx) array([1., 0.])