Hi,
I'm using proc mixed as follows:
proc mixed data = mydata (where=(treatn in (1,2,3))) plots=all;
by estremn estrem atypen atype paramcd param avisitn avisit ;
class treatn;
model aval = treatn base/residual outp=resid;
lsmeans treatn / pdiff=control('3');
run;
The difference of lsmeans and SE for 2 treatments (treatn=1,2) is required to be estimated from placebo (treatn=3) as 'placebo - treatment'. I believe currently pdiff is giving the difference as 'treatment - placebo'.
Help is required to reverse the direction of the difference so that I can get the difference of each treatment from placebo.
Thanks
Hi @Arthur2,
You can use the LSMESTIMATE statement (instead of the PDIFF option of the LSMEANS statement) to request the statistics for these differences (or for more general linear combinations).
lsmeans treatn;
lsmestimate treatn 'placebo vs. trt 1' -1 0 1,
'placebo vs. trt 2' 0 -1 1;
Changed title and moved to statistics community.
Hi @Arthur2,
You can use the LSMESTIMATE statement (instead of the PDIFF option of the LSMEANS statement) to request the statistics for these differences (or for more general linear combinations).
lsmeans treatn;
lsmestimate treatn 'placebo vs. trt 1' -1 0 1,
'placebo vs. trt 2' 0 -1 1;
@FreelanceReinh , nice to see that your answer matches mine. This thread is duplicated, and I am not sure how to merge the two.
SteveDenham
@SteveDenham: That's funny. Rather, I am glad to see that my tentative idea matches a real expert's advice. 🙂
I wasn't aware of the duplicate thread. I think only moderators, super users and very few others have the privileges to merge threads.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.