difflsmeans: Calculates Differences of Least Squares Means and Confidence...

Description Usage Arguments Value Author(s) See Also Examples

Description

Produces a data frame which resembles to what SAS software gives in proc mixed statement. The approximation for degrees of freedom is Satterthwaite's.

Usage

1
difflsmeans(model, test.effs=NULL, ddf="Satterthwaite",...)

Arguments

model

linear mixed effects model (lmer object).

test.effs

charachter vector specifying names of terms to be tested. If NULL all the terms are tested.

ddf

By default the Satterthwaite's approximation to degrees of freedom is calculated. If ddf="Kenward-Roger", then the Kenward-Roger's approximation is calculated using KRmodcomp function from pbkrtest package. If ddf="lme4" then the anova table that comes from lme4 package is returned.

...

other potential arguments.

Value

Produces Differences of Least Squares Means (population means) table with p-values and Confidence intervals.

Author(s)

Alexandra Kuznetsova, Per Bruun Brockhoff, Rune Haubo Bojesen Christensen

See Also

lsmeansLT, step, rand

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## import lme4 package and lmerTest package
library(lmerTest)

## specify lmer model
m1 <- lmer(Informed.liking ~ Gender*Information +(1|Consumer), data=ham)

## calculate least squares means for interaction Gender:Information
difflsmeans(m1, test.effs="Gender:Information")
m <- lmer(Coloursaturation ~ TVset*Picture + (1|Assessor), data=TVbo)
plot(difflsmeans(m, test.effs="TVset"))

runehaubo/lmerTest documentation built on May 14, 2019, 6:15 p.m.