stsm_init_pars {autostsm} R Documentation

## Get initial parameter estimates for estimation

### Description

Get initial parameter estimates for estimation

### Usage

stsm_init_pars(
y,
freq,
trend,
cycle,
decomp = "",
seasons = NULL,
prior = NULL,
sig_level = 0.01,
arma = c(p = NA, q = NA),
exo = NULL,
state_eqns = NULL,
interpolate = NA,
interpolate_method = NA
)


### Arguments

 y an object created from stsm_detect_frequency freq Frequency of the data trend Trend specification ("random-walk", "random-walk-drift", "double-random-walk", "random-walk2"). cycle The period for the longer-term cycle decomp Decomposition model ("tend-cycle-seasonal", "trend-seasonal", "trend-cycle", "trend-noise") seasons The seasonal lengths to split the seasonality into prior A data table created by stsm_prior sig_level Significance level for statistical tests arma Named vector with values for p and q corresponding to the ARMA(p,q) specification if exo Matrix of exogenous variables. Can be used to specify regression effects or other seasonal effects like holidays, etc. state_eqns Character vector of equations to apply exo_state to the unobserved components. If left as the default, then all variables in exo_state will be applied to all the unobserved components. The equations should look like: "trend ~ var - 1", "drift ~ var - 1", "cycle ~ var - 1", "seasonal ~ var - 1". If only some equations are specified, it will be assumed that the exogenous data will be applied to only those specified equations. interpolate Character string giving frequency to interpolate to: i.e. "quarterly", "monthly", "weekly", "daily" cycle is set to 'arma'. If NA, then will auto-select the order. interpolate_method Character string giving the interpolation method:

### Value

named vector containing the initial parameter estimates for estimation

[Package autostsm version 3.0.1 Index]