01-01-2013 05:51 AM
I am trying to fit a mixed model, and for some reason I could not find, SAS 9.3 doesn't let me use the lsmestimate statement.
I wrote the next code (only with real variable names), and the lsmestimate is colored with red and not with blue like I would expect..
proc mixed data = MyData plots = all;
class X1 X2;
model Y = X3 X1;
random intercept / subject = Subject_ID;
random intercept / subject = Z1*Subject_ID;
lsmeans X1 / plot = diff;
lsmestimate X1 "level 1 vs. level 3" 1 0 -1;
does anybody knows why ?
Thank you !
01-03-2013 02:21 AM
you are both right, I tried running it, and it ran smoothly, so it's only an "editor bug".
The output was identical to the one I got from the 'estimate' command, I am not sure I understand the difference then...
01-03-2013 07:11 AM
For a lot of things, LSMESTIMATE and ESTIMATE will give the same result. What you can do with LSMESTIMATE that you cannot do with ESTIMATE is why I tend to use it more. The biggest difference is that LSMESTIMATE can accept a "multiple line" series of estimates, much like the CONTRAST statement, while the ESTIMATE statement provides only a single comparison. This is especially useful for joint testing of hypotheses of interest, and for application of multiple comparison adjustments when you are only interested in specific comparisons, as opposed to the adjustments available through the LSMEANS statment.