Description Usage Arguments Value Author(s)
View source: R/posterior_predict.R
The posterior predictive distribution is the distribution of the outcome implied by the model after using the observed data to update our beliefs about the unknown parameters in the model. Simulating data from the posterior predictive distribution using the observed predictors is useful for checking the fit of the model. Drawing from the posterior predictive distribution at interesting values of the predictors also lets us visualize how a manipulation of a predictor affects (a function of) the outcome(s). With new observations of predictor variables we can use the posterior predictive distribution to generate predicted outcomes.
1 2 3 4 5 6 7 8 9 10 | ## S3 method for class 'varstan'
posterior_predict(
object,
h = 0,
xreg = NULL,
robust = FALSE,
draws = 1000,
seed = NULL,
...
)
|
object |
a varstan object |
h |
An integer indicating the number of predictions. The default number of predictions is 12. |
xreg |
Optionally, a numerical matrix of external regressors, which must have the same number of rows as ts. It should not be a data frame. |
robust |
A boolean for obtain the robust estimation. The default |
draws |
An integer indicating the number of draws to return. The default number of draws is 1000 |
seed |
An optional |
... |
Further arguments passed to |
A draws
by h
data.frame of simulations from the
posterior predictive distribution. Each row of the data.frame
is a vector of predictions generated using a single draw of
the model parameters from the posterior distribution.
Asael Alonzo Matamoros
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.