I am trying out the following code in SAS 9.4 and SAS/STAT version 14.1
proc mixed data=test;
class a b;
model y= a b a*b;
lsmeans a*b / diff;
lsmestimate a*b 'AB11 - AB12' 1 -1 0 0 0 0 0 0 0 0;
slice a*b / sliceby(a='1') diff;
contrast 'AB11 - AB12' b 1 -1
a*b 1 -1 0 0 0 0 0 0 0 0;
estimate 'AB11 - AB12' b 1 -1
a*b 1 -1 0 0 0 0 0 0 0 0;
run;
(The above code can be found in this link - http://support.sas.com/kb/24/addl/fusion_24447_1_contrasts.sas.txt)
I am not able to figure out as to why the LSMESTIMATE and SLICE statements are not working (Displayed in red color). I checked the SAS Documentation, both LSMESTIMATE and SLICE statements are there for proc mixed. What may be wrong with this..? As soon as I change the "MIXED" keyword to "GENMOD" or "GLIMMIX", it is working.
Please help me figure it out. I need to use proc mixed since I want to perform a MMRM analysis with a step-down method of checking the LSMEANS difference between treatment groups and between each treatment group and PLacebo group. I also want to use DDFM=KR option as a correction for the Degrees of freedom. As far as I know, these things can be done with proc mixed. Please help me with the LSMESTIMATE and SLICE Statement in Proc Mixed.
Thanks
Regards,
Writwik
I just want to re-confirm that you should not get misled by red highlighting. Sometimes the text truns red and everything still works fine. I think the programmers sometimes forget to update things in the Enhanced Editor when new features are added to PROCs. Only get concerned if you get errors or warnings when you run the program.
Hello @Writwik,
I have only SAS/STAT 13.2. Yes, the two keywords are displayed in red in my enhanced editor, too, but nevertheless the code works without any problems. (I think there are a few minor bugs with syntax highlighting.)
Do you get undesirable log messages, wrong or incomplete results?
I just want to re-confirm that you should not get misled by red highlighting. Sometimes the text truns red and everything still works fine. I think the programmers sometimes forget to update things in the Enhanced Editor when new features are added to PROCs. Only get concerned if you get errors or warnings when you run the program.
Thanks a lot. You are right.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.