FactorSVResult._from_fit#
- classmethod FactorSVResult._from_fit(fit, model)[source]#
Assemble the public result from a raw fit and its specification.
- Parameters:
fit (
_FactorVolatilityFit) – The packed draws from_sample.model (
FactorSV) – The specification the draws were produced for.
- Return type:
- Returns:
The public posterior record.
Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> y = rng.standard_normal((120, 3)) >>> model = FactorSV(y, n_factors=1) >>> fit = model._sample( ... n_draws=40, n_burn=10, thin=1, prior=VolatilityPrior(), ... loading_prior_precision=1.0, seed=0, ... ) >>> res = FactorSVResult._from_fit(fit, model) >>> res.series_names, res.n_kept, bool(np.allclose(res.panel, y)) (('x1', 'x2', 'x3'), 30, True)