type of model. Possible options are "level", "trend" and "BSM",
corresponding to local level, local linear trend, and local linear trend model with seasonal component.
xreg
matrix or data frame containing the exogenous variables
(not including the intercept which is always included for non-differenced series)
n_ahead
length of the forecast horizon.
level
desired frequentist coverage probability of the prediction intervals.
median
compute the median of the prediction interval.
se_limits
compute the standard errors of the prediction interval limits.
prior
prior to be used in importance sampling for log-sd parameters.
Defaults to uniform prior on logarithm of standard deviations (with constraints that all variances are smaller than 1e7).
If "custom", a user-defined custom prior is used (see next arguments).
custom_prior
function for computing custom prior.
First argument must be a vector containing the log-variance parameters (observation error, level, slope, and seasonal).
custom_prior_args
list containing additional arguments to custom_prior.
nsim
number of simulations used in importance sampling. Default is 1000.
inits
initial values for log-sds
last_only
compute the prediction intervals only for the last prediction step.
return_weights
Return (scaled) weights used in importance sampling.
Value
a list containing the prediction intervals.
See Also
tsPI, arima_pi
@references
Helske, J. (2015). Prediction and interpolation of time series by state space models.
University of Jyv<c3><83><c2><a4>skyl<c3><83><c2><a4>. PhD thesis, Report 152.
http://urn.fi/URN:NBN:fi:jyu-201603111829