Hi,
I am comparing the treatment difference and looking for the 95% CI by using Proc GLM. However it seems there are different CIs are produced from CLPARM and PDIFF. Please see the code below:
proc glm data=xxx order=data;
class usubjid treatment;
model chg=treatment/solution clparm;
lsmeans treatment/stderr pdiff cl adjust=dunnett;
estimate 'Difference' treatment 1 -1;
quit;
From option of CLPARM, I got below:
Estimate | StdErr | tValue | Probt | LowerCL | UpperCL |
-2.03825641 | 3.79425842 | -0.54 | 0.5924 | -9.57081174 | 5.49429892 |
From option of PDIFF CL, I have,
LowerCL | Difference | UpperCL |
-11.177164 | -2.038256 | 7.100651 |
The difference of treatment are same from these two options, but CIs are different. Does anyone know what is the reason and which one we should use? Thanks very much,
Nancy
Yes, you would have to use the output from CLPARM option for what you wanted.
What happens if you remove ADJUST=DUNNETT? Does this change give the same confidence intervals?
Hi @Nancych,
I guess that variable treatment has more than two levels. In this case the PDIFF CL options have produced at least two differences and confidence intervals (headed "Simultaneous 95% Confidence Limits ..." in the original output) using an "Adjustment for Multiple Comparisons: Dunnett" -- as you requested with the ADJUST=DUNNETT option. Due to this adjustment the confidence intervals are wider in order to control the coverage probability of the intervals simultaneously.
If you're interested in only one preplanned comparison, you don't need the adjustment for multiple comparisons and the confidence interval obtained with CLPARM is sufficient. But if you deliberately decided that you need Dunnett's adjustment for comparing, say, both treatment B vs. A and C vs. A, then it would only be consistent to use the PDIFF confidence limits.
Thank you so much! This is exactly what I have.
I got 4 treatments but need to compare individuals and pooled treatments vs placebo. The CIs for pooled one is not available from PDIFF (even without DUNNET). Please see below
proc glm data=xxxx order=data;
class usubjid treatment ;
model chg=treatment /solution clparm;
lsmeans treatment /stderr pdiff cl ;
estimate 'trt1 vs pla' treatment 1 0 0 -1;
estimate 'trt2 vs pla' treatment 0 1 0 -1;
estimate 'trt3 vs pla' treatment 0 0 1 -1;
estimate 'trt1&2 vs pla' treatment 0.5 0.5 0 -1;
quit;
In this case, if I need CIs for all estimate above (4 of them), I have to consider the CIs from clparm?
Many thanks
Nancy
Yes, you would have to use the output from CLPARM option for what you wanted.
@jiltao: Thanks for chiming in. Wouldn't it be an option to switch to PROC MIXED or PROC GLIMMIX and then use an LSMESTIMATE statement like this?
lsmestimate treatment 'trt1 vs pla' 1 0 0 -1 ,
'trt2 vs pla' 0 1 0 -1 ,
'trt3 vs pla' 0 0 1 -1 ,
'trt1&2 vs pla' 0.5 0.5 0 -1 / cl adjust=simulate;
(There is no DUNNETT adjustment available in LSMESTIMATE. On my random test data SIMULATE came closest to the DUNNETT results from LSMEANS.)
Yes, if you wanted to obtain the adjusted CL's, this would be a good approach. Alternatively, you can fit your model in PROC GLM, add the STORE statement in there, then use PROC PLM to do what you wanted with the LSMESTIMATE statements.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.