UnobservedComponentsResult._component_std#
- UnobservedComponentsResult._component_std(name)[source]#
One component’s smoothed standard deviation path.
Single-state components read the diagonal of their block; the seasonal propagates the block covariance through the design row, so the harmonics’ covariances are counted. The caller is responsible for the component existing.
- Parameters:
name (
str) –"level","slope","cycle"or"seasonal".- Return type:
- Returns:
The smoothed standard deviations, shape
(n,), floored at zero against rounding.
Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> y = np.cumsum(0.2 * rng.standard_normal(200)) + rng.standard_normal(200) >>> res = UnobservedComponents(y, trend="level").fit() >>> std = res._component_std("level") >>> std.shape, bool(np.all(std > 0)), bool(std[0] > std[100]) ((200,), True, True)