BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
lansoprazole
Obsidian | Level 7

Hi,

I need help with combining the LSMEANS output of PROC GLIMMIX using PROC MIANALYZE. 

This is LSMEANS output table:

lansoprazole_0-1738010062931.png

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:

lansoprazole_1-1738010194853.png

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,

1 ACCEPTED SOLUTION

Accepted Solutions
SAS_Rob
SAS Employee
The approach should be the same as it is in Proc MIXED. See the example in the usage note below.
https://support.sas.com/kb/30/715.html

View solution in original post

4 REPLIES 4
SAS_Rob
SAS Employee
The approach should be the same as it is in Proc MIXED. See the example in the usage note below.
https://support.sas.com/kb/30/715.html
lansoprazole
Obsidian | Level 7
Thanks for your help.
lansoprazole
Obsidian | Level 7

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? 

SAS_Rob
SAS Employee

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;

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 4 replies
  • 919 views
  • 4 likes
  • 2 in conversation