fixef: Extract fixed-effects estimates

Description Usage Arguments Details Value Examples

Description

Extract the fixed-effects estimates

Usage

1
2
  ## S3 method for class 'merMod'
 fixef(object, add.dropped=FALSE, ...)

Arguments

object

any fitted model object from which fixed effects estimates can be extracted.

add.dropped

for models with rank-deficient design matrix, reconstitute the full-length parameter vector by adding NA values in appropriate locations?

...

optional additional arguments. Currently none are used in any methods.

Details

Extract the estimates of the fixed-effects parameters from a fitted model.

Value

a named, numeric vector of fixed-effects estimates.

Examples

1
2
3
4
5
6
7
fixef(lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy))
fm2 <- lmer(Reaction ~ Days + Days2 + (1|Subject),
            data=transform(sleepstudy,Days2=Days))
fixef(fm2,add.dropped=TRUE)
## first two parameters are the same ...
stopifnot(all.equal(fixef(fm2,add.dropped=TRUE)[1:2],
                    fixef(fm2)))

Example output

Loading required package: Matrix
(Intercept)        Days 
  251.40510    10.46729 
fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
(Intercept)        Days       Days2 
  251.40510    10.46729          NA 

lme4 documentation built on Aug. 18, 2018, 1:05 a.m.