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

Dear all.

Wish you all well.

Can anyone please enlighten me on why is the result from lsmeans statement and that from slice statement different?


Thank you very much.


proc genmod data=temp order=internal plots=all;

  class id time var1;

  MODEL y= var1 time var1*time / type3 dist=gamma link=log;

  lsmeans time*var1 / om diff ilink cl plots=all;

  slice time*var1 / sliceby=var1 ilink diff nof;

  repeated subject=id / type=cs;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Hi KC,

In what sense are they different?  The SLICE command should give all the differences between timepoints for each level of var1.  The differences are in the lsmeans diffs, as well, but they are scattered through out the output.  Excuse me if I am missing your point--a short example of how the outputs differ would help in explaining.

Steve Denham

View solution in original post

2 REPLIES 2
SteveDenham
Jade | Level 19

Hi KC,

In what sense are they different?  The SLICE command should give all the differences between timepoints for each level of var1.  The differences are in the lsmeans diffs, as well, but they are scattered through out the output.  Excuse me if I am missing your point--a short example of how the outputs differ would help in explaining.

Steve Denham

Miracle
Barite | Level 11

Hi Steve.

Yes, you are right. The estimates from both lsmeans and lsmeans are the same. My mistake due to oversight.


Thank you very much.



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
  • 2 replies
  • 2703 views
  • 0 likes
  • 2 in conversation