Programming the statistical procedures from SAS

Facing issues with LSMESTIMATE statement in SAS 9.4( SAS/STAT version 14.1)

Accepted Solution Solved
Reply
Frequent Learner
Posts: 1
Accepted Solution

Facing issues with LSMESTIMATE statement in SAS 9.4( SAS/STAT version 14.1)

[ Edited ]

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


Accepted Solutions
Solution
‎06-14-2016 12:52 AM
Valued Guide
Valued Guide
Posts: 684

Re: Facing issues with LSMESTIMATE statement in SAS 9.4( SAS/STAT version 14.1)

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.

View solution in original post


All Replies
Trusted Advisor
Posts: 1,115

Re: Facing issues with LSMESTIMATE statement in SAS 9.4( SAS/STAT version 14.1)

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?

Solution
‎06-14-2016 12:52 AM
Valued Guide
Valued Guide
Posts: 684

Re: Facing issues with LSMESTIMATE statement in SAS 9.4( SAS/STAT version 14.1)

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.

Frequent Learner
Posts: 1

Re: Facing issues with LSMESTIMATE statement in SAS 9.4( SAS/STAT version 14.1)

Thanks a lot. You are right.  

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 234 views
  • 0 likes
  • 3 in conversation