Produces a data frame which resembles to what SAS software gives in proc mixed statement. The approximation of degrees of freedom is Satterthwate's. This is a deprecated function, use lsmeansLT function instead.
lsmeans(model, test.effs = NULL, ddf="Satterthwaite", ...)
linear mixed effects model (lmer object).
charachter vector specyfying the names of terms to be tested. If NULL all the terms are tested.
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.
Produces Least Squares Means (population means) table with p-values and Confidence intervals.
doBy package, gplots package
# NOT RUN {
## import lme4 package and lmerTest package
library(lmerTest)
## specify lmer model
m1 <- lmer(Informed.liking ~ Gender*Information +(1|Consumer), data=ham)
# }
# NOT RUN {
## calculate least squares means for interaction Gender:Information
lsmeans(m1, test.effs="Gender:Information")
m <- lmer(Coloursaturation ~ TVset*Picture + (1|Assessor), data=TVbo)
plot(lsmeans(m))
lsmeans(m, test.effs="TVset")
# }
Run the code above in your browser using DataLab