BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Writwik
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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

3 REPLIES 3
FreelanceReinh
Jade | Level 19

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?

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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.

Writwik
Calcite | Level 5

Thanks a lot. You are right.  

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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.

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