When I run ANOVA by proc mixed (or proc glm) with lsmeans option to compare means of groups (e.g., each group containing n=12 samples = balanced data), I get identical standard errors (SE) for each mean value.
Based on manual calculation with Excel, I know that the standard deviation (SD) of each group is quite different, and also I remember: SE = SD/(sqrt of sample size n).
If SD are different, why does lsmeans option give identical SE for all of the group means?
If you have a balanced design with no other covariates etc the standard error in the LSMEANS will use the residual mean square from the analysis of variance. Therefore as you have the same number of observations in each group you will get the same sem since they are all using the same estimate of variance.
Hi cws, thank you so much for your clear and concise answer. It is very helpful!
My question on “identical LSMEAN values” originates from a problem I am experiencing (as explained below). If you are bored, would you take a look and share what you think?
Let’s say you want to report differences among group means following ANOVA, and you want to inform the reader about the ‘spread’ of the data points around the mean of each group.
If no random variable exists (such as blocking effect) and the data is balanced, I’d present arithmetic means with standard deviations obtained from PROC GLM with MEANS statement.
But, the dataset I deal with contains a random variable as well as occasional imbalance among groups as a result of extreme outliers. In such case, I prefer to use PROC MIXED with LSMEANS statement. However, I am not sure what information to present with lsmean values to indicate the ‘spread’ of the data points for each group… thoughts? (maybe I should start a new thread with this question) Thanks again cws! Best regards,