sts_seasonal | R Documentation |
A seasonal effect model posits a fixed set of recurring, discrete 'seasons', each of which is active for a fixed number of timesteps and, while active, contributes a different effect to the time series. These are generally not meteorological seasons, but represent regular recurring patterns such as hour-of-day or day-of-week effects. Each season lasts for a fixed number of timesteps. The effect of each season drifts from one occurrence to the next following a Gaussian random walk:
sts_seasonal( observed_time_series = NULL, num_seasons, num_steps_per_season = 1, drift_scale_prior = NULL, initial_effect_prior = NULL, constrain_mean_effect_to_zero = TRUE, name = NULL )
observed_time_series |
optional |
num_seasons |
Scalar |
num_steps_per_season |
|
drift_scale_prior |
optional |
initial_effect_prior |
optional |
constrain_mean_effect_to_zero |
if |
name |
the name of this model component. Default value: 'Seasonal'. |
effects[season, occurrence[i]] = ( effects[season, occurrence[i-1]] + Normal(loc=0., scale=drift_scale))
The drift_scale
parameter governs the standard deviation of the random walk;
for example, in a day-of-week model it governs the change in effect from this
Monday to next Monday.
an instance of StructuralTimeSeries
.
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_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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.