1
$\begingroup$

This question already has an answer here:

I am running lsmeans to determine the means and standard error for each group within a 4x3 experiment, consisting of three subject types and four treatments. When I run the following it does display the means and error, however the SE for each subject type is exactly the same.

> myModel <- lme(y ~ Treatment * SubjectType * Year, random=list(SubjectNum=~1, Location=~1), control=ctrl, method="REML", data = dframe1, na.action="na.exclude")

> lsmeans(myModel, pairwise~SubjectType, adjust="tukey")

NOTE: Results may be misleading due to involvement in interactions
$lsmeans
 SubjectType    lsmean           SE  df lower.CL upper.CL
 Type1          5.601792 0.06719405 168 5.469139 5.734446
 Type2          5.164734 0.06719405 168 5.032080 4.297387
 Type3          4.791922 0.06719405 168 4.659269 4.924576

Results are averaged over the levels of: Treatment, Year 
Confidence level used: 0.95 

$contrasts
 contrast             estimate          SE  df t.ratio p.value
 Type1 - Type2        0.5370586 0.09502674 168   4.599  <.0001
 Type1 - Type3        0.9098701 0.09502674 168   8.523  <.0001
 Type2 - Type3        0.4728115 0.09502674 168   3.923  0.0004

Results are averaged over the levels of: Inoculant, Year 
P value adjustment: tukey method for comparing a family of 3 estimates 

Does anyone have an explanation? The same thing happens when I run it by treatment - each treatment has the same SE.

$\endgroup$

marked as duplicate by gung r Jul 25 '17 at 19:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Jul 25 '17 at 17:44

This question came from our site for professional and enthusiast programmers.

  • $\begingroup$ Why do you think the standard errors should be different? $\endgroup$ – Dason Jul 25 '17 at 18:06
  • $\begingroup$ It's important to remember that least squares means summarize a model, not the data. Since your model assumes homogeneous error structures, and since the design is evidently balanced, the standard errors are all the same. $\endgroup$ – rvl Jul 26 '17 at 12:30
4
$\begingroup$

It makes perfect sense if your data are balanced, i.e., you have the same number of observations in each Treatment * SubjectType * Year combination. (That's how ANOVA was done in the 1940s, and balance like that was the reason ANOVA was feasible in 1940s ☺ ).

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.