This class enables compositional specification of a structural time series model from basic components. Given a list of component models, it represents an additive model, i.e., a model of time series that may be decomposed into a sum of terms corresponding to the component models.
sts_sum( observed_time_series = NULL, components, constant_offset = NULL, observation_noise_scale_prior = NULL, name = NULL )
observed_time_series | optional |
---|---|
components |
|
constant_offset | optional scalar |
observation_noise_scale_prior | optional |
name | string name of this model component; used as |
an instance of StructuralTimeSeries
.
Formally, the additive model represents a random process
g[t] = f1[t] + f2[t] + ... + fN[t] + eps[t]
, where the f
's are the
random processes represented by the components, and
eps[t] ~ Normal(loc=0, scale=observation_noise_scale)
is an observation
noise term. See the AdditiveStateSpaceModel
documentation for mathematical details.
This model inherits the parameters (with priors) of its components, and
adds an observation_noise_scale
parameter governing the level of noise in
the observed time series.
For usage examples see sts_fit_with_hmc()
, sts_forecast()
, sts_decompose_by_component()
.
Other sts:
sts_additive_state_space_model()
,
sts_autoregressive_state_space_model()
,
sts_autoregressive()
,
sts_constrained_seasonal_state_space_model()
,
sts_dynamic_linear_regression_state_space_model()
,
sts_dynamic_linear_regression()
,
sts_linear_regression()
,
sts_local_level_state_space_model()
,
sts_local_level()
,
sts_local_linear_trend_state_space_model()
,
sts_local_linear_trend()
,
sts_seasonal_state_space_model()
,
sts_seasonal()
,
sts_semi_local_linear_trend_state_space_model()
,
sts_semi_local_linear_trend()
,
sts_smooth_seasonal_state_space_model()
,
sts_smooth_seasonal()
,
sts_sparse_linear_regression()