brmsfit
.
For linear models, the residual standard deviations,
correlations and covariances are also returned.## S3 method for class 'brmsfit':
VarCorr(x, sigma = 1, estimate = "mean", as.list = TRUE,
...)
## S3 method for class 'brmsVarCorr':
as.data.frame(x, ...)
brmsift
.VarCorr
).as.list
to FALSE
.estimate
brmsVarCorr
,
which is a list of lists (one per grouping factor),
each containing 3 elements: a matrix containing the standard deviations,
a list of correlation matrices, and a list of covariance matrices.
Can be coerced to a data.frame
by using the as.data.frame
method.fit <- brm(count ~ log_Age_c + log_Base4_c * Trt_c + (1+Trt_c|visit),
data = epilepsy, family = "poisson", chains = 1)
## return the means of random effects covariances
(vc <- VarCorr(fit))
as.data.frame(vc)
## return 2.5% and 97.5% quantiles of random effects covariances
VarCorr(fit, estimate = "quantile", probs = c(0.025, 0.975))
Run the code above in your browser using DataLab