View source: R/predict.mbsts.R
predict.mbsts | R Documentation |
Generate draws from the posterior predictive distribution
of an mbsts
object.
## S3 method for class 'mbsts'
predict(object,
horizon = 1,
newdata = NULL,
timestamps = NULL,
burn = SuggestBurn(.1, object),
na.action = na.exclude,
quantiles = c(.025, .975),
seed = NULL,
...)
object |
An object of class |
horizon |
An integer specifying the number of periods into the
future you wish to predict. If |
newdata |
A vector, matrix, or data frame containing the
predictor variables to use in making the prediction. This is only
required if |
timestamps |
A vector of time stamps (of the same type as the
timestamps used to fit |
burn |
An integer describing the number of MCMC iterations in
|
na.action |
A function determining what should be done with
missing values in |
quantiles |
A numeric vector of length 2 giving the lower and upper quantiles to use for the forecast interval estimate. |
seed |
An integer to use as the C++ random seed. If
|
... |
Not used. Present to match the signature of the default predict method. |
The prediction is based off of samples taken from the posterior distribution of a multivariate Bayesian structural time series model.
As an added convenience, means and interval estimates are produced from the posterior predictive distribution.
Returns an object of class mbsts.prediction, which is a list.
Steven L. Scott
mbsts
.
predict.bsts
plot.mbsts.prediction
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.