An autoregressive (AR) model posits a latent level
whose value at each step
is a noisy linear combination of previous steps:
level[t+1] = (sum(coefficients * levels[t:t-order:-1]) + Normal(0., level_scale))
sts_autoregressive( observed_time_series = NULL, order, coefficients_prior = NULL, level_scale_prior = NULL, initial_state_prior = NULL, coefficient_constraining_bijector = NULL, name = NULL )
observed_time_series | optional |
---|---|
order | scalar positive |
coefficients_prior | optional |
level_scale_prior | optional |
initial_state_prior | optional |
coefficient_constraining_bijector | optional |
name | the name of this model component. Default value: 'Autoregressive'. |
an instance of StructuralTimeSeries
.
The latent state is levels[t:t-order:-1]
. We observe a noisy realization of
the current level: f[t] = level[t] + Normal(0., observation_noise_scale)
at
each timestep.
If coefficients=[1.]
, the AR process is a simple random walk, equivalent to
a LocalLevel
model. However, a random walk's variance increases with time,
while many AR processes (in particular, any first-order process with
abs(coefficient) < 1
) are stationary, i.e., they maintain a constant
variance over time. This makes AR processes useful models of uncertainty.
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_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()
,
sts_sum()