Constructor of the ets("A","N","N")
object for Bayesian estimation in
Stan.
LocalLevel(ts, xreg = NULL, genT = FALSE, series.name = NULL)
The function returns a list with the data for running stan()
function of rstan package.
a numeric or ts object with the univariate time series.
Optionally, a numerical matrix of external regressors, which must have the same number of rows as ts. It should not be a data frame.
a boolean value to specify for a generalized t-student SSM model.
an optional string vector with the time series names.
Asael Alonzo Matamoros.
By default the ssm()
function generates a local-level, ets("A","N","N")
,
or exponential smoothing model from the forecast package. When
trend = TRUE
the SSM transforms into a local-trend, ets("A","A","N")
,
or the equivalent Holt model. For damped trend models set damped = TRUE
.
If seasonal = TRUE
, the model is a seasonal local level model, or
ets("A","N","A")
model. Finally, the Holt-Winters method (ets("A","A","A")
)
is obtained by setting both Trend = TRUE
and seasonal = TRUE
.
The genT = TRUE
option generates a t-student innovations SSM model. For
a detailed explanation, check Ardia (2010); or Fonseca, et. al (2019).
The default priors used in a ssm( )
model are:
level ~ normal(0,0.5)
sigma0 ~ t-student(0,1,7)
level1 ~ normal(0,1)
dfv ~ gamma(2,0.1)
breg ~ t-student(0,2.5,6)
For changing the default prior use the function set_prior()
.
Fonseca, T. and Cequeira, V. and Migon, H. and Torres, C. (2019). The effects of
degrees of freedom estimation in the Asymmetric GARCH model with Student-t
Innovations. arXiv doi: arXiv: 1910.01398
.
Sarima
, auto.arima
, set_prior
, and garch
.