mbsts.forecast: Specification of time series components

View source: R/mbsts.forecast.R

mbsts.forecastR Documentation

Specification of time series components

Description

Generate draws from the posterior predictive distribution of a mbsts object. Samples from the posterior predictive distribution of the MBSTS model.

Usage

mbsts.forecast(object, STmodel, newdata, steps = 1)

Arguments

object

An object of the mbsts class created by a call to the mbsts_function function.

STmodel

An object of the SSModel class created by a call to the tsc.setting function.

newdata

A vector or matrix containing the predictor variables to use in making the prediction. This is only required if the mbsts model has a regression component.

steps

An integer value describing the number of time steps ahead to be forecasted. If it is greater than the number of new observations in the newdata, zero values will fill in missing new observations.

Value

An object of predicted values which is a list containing the following:

pred.dist

An array of draws from the posterior predictive distribution. The first dimension in the array represents time, the second dimension denotes each target series, and the third dimension indicates each MCMC draw.

pred.mean

A matrix giving the posterior mean of the prediction for each target series.

pred.sd

A matrix giving the posterior standard deviation of the prediction for each target series.

pred.se

A matrix giving the posterior standard error of the prediction for each target series, calculated by pred.sd divided by the square root of the numer of MCMC iterations.

Author(s)

Jinwen Qiu qjwsnow_ctw@hotmail.com Ning Ning patricianing@gmail.com

References

\Qiu

2018

\Ning

2021

\Jammalamadaka

2019


mbsts documentation built on Jan. 7, 2023, 9:07 a.m.