vcov.glmerMod {merDeriv} | R Documentation |
Extract Variance-Covariance Matrix of all Parameters for Generalized Linear Mixed Effects Models
Description
This function calculates the variance-covariance
matrix for all parameters (fixed and random effect) in a generalized linear
mixed effects model of class glmerMod
.
Usage
## S3 method for class 'glmerMod'
vcov(object, ...)
Arguments
object |
An object of class |
... |
additional arguments, including |
Value
A p by p variance-covariance matrix, where p
represents the number of parameters.
If full = FALSE
, returns the
variance-covariance matrix of only fixed effect
parameters. If full = TRUE
, returns the variance-covariance matrix
for all fitted parameters (including fixed effect parameters and random
effect (co)variances). The variance-covariance matrix
is based on the negative of Hessian matrix, which is extracted from
lme4
. If ranpar = "var"
, the random effects are
parameterized as variance/covariance; If ranpar = "sd"
,
the random effects are parameterized as standard
deviation/correlation; If ranpar = "theta"
,
the random effects are parameterized as components of Cholesky decomposition.
References
Douglas Bates, Martin Maechler, Ben Bolker, Steve Walker (2015). Fitting Linear Mixed-Effects Models Using lme4. Journal of Statistical Software, 67(1), 1-48. doi: 10.18637/jss.v067.i01.
Examples
## Not run:
# The cbpp example
data(finance, package="smdata")
lme4fit <- glmer(corr ~ jmeth + (1 | item), data = finance,
family = binomial, nAGQ = 20)
# variance covariance matrix for all parameters
vcov(lme4fit, full = TRUE, ranpar = "var")
## End(Not run)