Hi,
I need help with combining the LSMEANS output of PROC GLIMMIX using PROC MIANALYZE.
This is LSMEANS output table:
I want to combine each pairwise comparison's odds ratio and adjusted CL.
I tried
PROC MIANALYZE parms=lsestim ;
MODELEFFECTS induction ;
RUN;
but it ended up with one combined estimate, as shown:
I tried other PROC MIANALYZE statements but did not get anything.
I wonder if I can get something similar to:
Induction _induction OR LCL UCL
A B 123 123 123
Thanks,
This is helpful. Hoewever, these steps only combine the estimate and the unadjusted stnd error and unadjusted CL. Do you know how to pool the adjusted lower and upper CL?
The theory behind multiply imputed data only takes estimates and their standard errors and gives combined estimates. It does not lend itself to combining confidence intervals or p-values (adjusted or unadjusted). My suggestion would be to combine the estimates using MIANALYZE like shown and then save the p-values to a SAS data set. You could then use on the p-value adjustment methods available in Proc MULTTEST.
Note that not all the p-value adjustment methods are available in MULTTEST that are in GLIMMIX.
SAS Help Center: PROC MULTTEST Statement
data outmi;
do _imputation_=1 to 3;
do trt='test','trt1','trt2','trt3';
do rep=1 to 10;
trtn+1;
y=1.3+.18*trtn+rannor(123);
output;
end; end; end;
run;
proc glimmix data=outmi;
by _imputation_;
class trt;
model y=trt;
lsmeans trt/diff;
ods output diffs=diff;
run;
data diff2;
set diff;
comparison=trt||' vs '||left(_trt);
run;
proc sort data=diff2;
by comparison _imputation_;
run;
proc mianalyze data=diff2;
by comparison;
modeleffects estimate;
stderr stderr;
ods output ParameterEstimates=estimate_ds(rename=(probt=raw_p comparison=test));
run;
proc multtest inpvalues=estimate_ds holm hoc fdr bon;
run;
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.