Questions tagged [lsmeans]

Least-Squares means are predictions from a model over a regular grid, possibly averaged over other dimensions. Also use this tag for the R packages emmeans and lsmeans.

Least-Squares means are the means of predictions from a model over a regular grid, averaged over zero or more additional dimensions. In some contexts these are called "predicted marginal means", "covariate adjusted means", or "estimated marginal means", among other names.

The term originated with the work of Walt Harvey in the 1970s, and was adopted by SAS and later by other software. See this post for several references.

345 questions
1
vote
1 answer

compare contrasts from different models with emmeans

I'm trying to compare two contrasts from different models (each model from data from different individuals), and I'm wondering if that is possible using the estimate, SE and t.ratio information from each contrast. Just as an example, let's pretend I…
locus
  • 1,593
1
vote
0 answers

emmeans df > observations

I made a lmer with an interaction between odour and concentration and random effect of date. I'm getting very high df in the emmeans output below. It's actually higher than the number of observations in my df (954). Why? Should I be…
0
votes
0 answers

Estimated marginal means with afex::lmer - handling of random intercepts

I am fitting a very simple model where group, time and id are factors: > model <- afex::lmer(depvar ~ group * time + (1 | id), data = df) > model Linear mixed model fit by REML ['lmerModLmerTest'] Formula: depvar ~ group * time + (1 | id) Data:…
0
votes
1 answer

Are LSMeans calculated from Predicted Values?

I have a question which I can't find an answer online. When we ask a software (SAS, R,...) to calculate the LSMeans from a linear model, like regression, what is the procedure? Does the model find predicted values and simply calculates the mean, or…
0
votes
2 answers

lsmeans output "rate", "estimate",

My Question is about the output of the lsmeans() and contrast() functions. Can somebody please explain to me what is the meaning of "lsmeans", "rate", "rate.ratio" And especially "estimate"? As far as I know "lsmeans" is a mean estimated from a…
Pharcyde
  • 309