BookmarkSubscribeRSS Feed
Altal
Calcite | Level 5

I'm working on a longitudinal model like the one below, with trt having 4 arms (1,2,3 and 4)

What is the syntax to have group 3 to be always the control in all visit*trt interactions in the lsmeans to get the difference?

proc mixed data=visits noclprint empirical;

      class ID trt visit;

      model dependant= visit trt visit*trt;

      repeated visit / subject=ID(trt);

      lsmeans visit*trt/diff pdiff  ;

      ods output LSMeans=means;

      ods output Diffs=difference;

run;

Please for your help....

2 REPLIES 2
Altal
Calcite | Level 5

I wasn't successful in getting the output I want using CONTROL option; however, I changed coding of arms so that 3 becomes 4 and 4 becomes 3; in this case output was always

1-4

2-4

3-4

which is what I was interested in.

any help regarding syntax without changing coding of groups would be appreciated.

SteveDenham
Jade | Level 19

You might look into the LSMESTIMATE statement to specifically look into comparisons.

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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