The function extracts various types of variance-covariance matrices from objects of class "rma". By default, the variance-covariance matrix of the parameter estimates (fixed effects) is returned.

# S3 method for rma
vcov(object, type="fixed", ...)

## Arguments

object an object of class "rma". character string to specify the type of variance-covariance matrix to return: type="fixed" returns the variance-covariance matrix of the fixed effects (the default), type="obs" returns the marginal variance-covariance matrix of the observed effect sizes or outcomes, type="fitted" returns the variance-covariance matrix of the fitted values, type="resid" returns the variance-covariance matrix of the residuals. other arguments.

## Details

Note that type="obs" currently only works for object of class "rma.uni" and "rma.mv".

For objects of class "rma.uni", the marginal variance-covariance matrix of the observed effect sizes or outcomes is just a diagonal matrix with $$\hat{\tau}^2 + v_i$$ along the diagonal, where $$\hat{\tau}^2$$ is the estimated amount of (residual) heterogeneity (set to 0 in fixed-effects models) and $$v_i$$ is the sampling variance of the $$i$$th study.

For objects of class "rma.mv", the structure can be more complex and depends on the types of random effects included in the model.

## Value

A matrix corresponding to the requested variance-covariance matrix.

## Author

Wolfgang Viechtbauer wvb@metafor-project.org http://www.metafor-project.org

## References

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. https://doi.org/10.18637/jss.v036.i03