predict.var_estimate: Model Predictions for 'var_estimate' Objects

Description Usage Arguments Value Examples

View source: R/predict.estimate.R

Description

Model Predictions for var_estimate Objects

Usage

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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]

BGGM documentation built on Aug. 20, 2021, 5:08 p.m.