Learn R Programming

AICcmodavg (version 2.1-1)

extractSE: Extract SE of Fixed Effects of coxme, glmer, and lmekin Fit

Description

This function extracts the standard errors (SE) of the fixed effects of a mixed model fit with coxme, glmer, lmer, and lmekin and adds the appropriate labels.

Usage

extractSE(mod, …)

# S3 method for coxme extractSE(mod, …)

# S3 method for lmekin extractSE(mod, …)

# S3 method for mer extractSE(mod, …)

# S3 method for merMod extractSE(mod, …)

Arguments

mod

an object of coxme, lmekin, mer or merMod class.

additional arguments passed to the function.

Value

Returns the SE's of the fixed effects with the appropriate labels for each.

Details

These are extractor functions that use vcov.coxme, vcov.lmekin, vcov.mer, and vcov.merMod. Some of these functions are called by modavg, depending on the class of the objects.

See Also

modavg, glmer, lmer, coxme, lmekin

Examples

Run this code
# NOT RUN {
##modified example from ?glmer
# }
# NOT RUN {
if(require(lme4)) {
##create proportion of incidence
cbpp$prop <- cbpp$incidence/cbpp$size
gm1 <- glmer(prop ~ period + (1 | herd), family = binomial,
             weights = size, data = cbpp)
##print summary
summary(gm1)
##extract variance-covariance matrix of fixed effects
vcov(gm1)
##extract SE's of fixed effects - no labels
sqrt(diag(vcov(gm1))) #no labels
extractSE(gm1)  #with labels
detach(package:lme4)
}
# }

Run the code above in your browser using DataLab