predict.var_estimate: Model Predictions for 'var_estimate' Objects

View source: R/predict.estimate.R

predict.var_estimateR Documentation

Model Predictions for var_estimate Objects

Description

Model Predictions for var_estimate Objects

Usage

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

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

Value

The predicted values for each regression model.

Examples


# 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]



donaldRwilliams/BGGM documentation built on April 17, 2024, 5:52 p.m.