Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vcov.brmsfit

Covariance and Correlation Matrix of Population-Level Effects


Description

Get a point estimate of the covariance or correlation matrix of population-level parameters

Usage

## S3 method for class 'brmsfit'
vcov(object, correlation = FALSE, pars = NULL, ...)

Arguments

object

An object of class brmsfit.

correlation

Logical; if FALSE (the default), compute the covariance matrix, if TRUE, compute the correlation matrix.

pars

Optional names of coefficients to extract. By default, all coefficients are extracted.

...

Currently ignored.

Details

Estimates are obtained by calculating the maximum likelihood covariances (correlations) of the posterior samples.

Value

covariance or correlation matrix of population-level parameters

Examples

## Not run: 
fit <- brm(count ~ zAge + zBase * Trt + (1+Trt|visit), 
           data = epilepsy, family = gaussian(), chains = 2)
vcov(fit)

## End(Not run)

brms

Bayesian Regression Models using 'Stan'

v2.15.0
GPL-2
Authors
Paul-Christian Bürkner [aut, cre], Jonah Gabry [ctb], Sebastian Weber [ctb], Andrew Johnson [ctb], Martin Modrak [ctb]
Initial release
2021-03-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.