Programming the statistical procedures from SAS

Lsmeans and slice from genmod.

Accepted Solution Solved
Reply
Regular Contributor
Posts: 204
Accepted Solution

Lsmeans and slice from genmod.

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;


Accepted Solutions
Solution
‎07-22-2015 08:42 AM
Respected Advisor
Posts: 2,655

Re: Lsmeans and slice from genmod.

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


All Replies
Solution
‎07-22-2015 08:42 AM
Respected Advisor
Posts: 2,655

Re: Lsmeans and slice from genmod.

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

Regular Contributor
Posts: 204

Re: Lsmeans and slice from genmod.

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.



☑ This topic is SOLVED.

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

Discussion stats
  • 2 replies
  • 281 views
  • 0 likes
  • 2 in conversation