mbsts.forecast {mbsts} | R 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, Jammalamadaka and Ning (2018), Multivariate Bayesian Structural Time Series Model, Journal of Machine Learning Research 19.68: 1-33.
Ning and Qiu (2021), The mbsts package: Multivariate Bayesian Structural Time Series Models in R.
Jammalamadaka, Qiu and Ning (2019), Predicting a Stock Portfolio with the Multivariate Bayesian Structural Time Series Model: Do News or Emotions Matter?, International Journal of Artificial Intelligence, Vol. 17, Number 2.