Learn R Programming

BGGM (version 2.1.5)

predict.var_estimate: Model Predictions for var_estimate Objects

Description

Model Predictions for var_estimate Objects

Usage

# S3 method for var_estimate
predict(object, summary = TRUE, cred = 0.95, iter = NULL, progress = TRUE, ...)

Value

The predicted values for each regression model.

Arguments

object

object of class var_estimate

summary

summarize the posterior samples (defaults to TRUE).

cred

credible interval used for summarizing

iter

number of posterior samples (defaults to all in the object).

progress

Logical. Should a progress bar be included (defaults to TRUE) ?

...

Currently ignored

Examples

Run this code
# \donttest{
# data
Y <- subset(ifit, id == 1)[,-1]

# fit model with alias (var_estimate also works)
fit <- var_estimate(Y, progress = FALSE)

# fitted values
pred <- predict(fit, progress = FALSE)

# predicted values (1st outcome)
pred[,,1]

# }

Run the code above in your browser using DataLab