BookmarkSubscribeRSS Feed
Jep
Obsidian | Level 7 Jep
Obsidian | Level 7

Hello,

I am trying to compare two independent group means using a t-test. The variable I am trying to compare between the two groups is difference in weight change six months after an intervention between two groups who underwent different interventions. Each individual has a baseline weight measurement but some individuals are missing the weight variable for the sixth month follow up period, so I performed  multiple imputation for the missing values. How do I use proc mianalyze to pool the results of the multiple  t-tests from the imputed data sets?

Here is what I have so far.

Thank you for your help.

/* imputation phase*/

proc mi data =b; nimpute=10 out = mi_b;

run;

/*Analysis phase*/

proc ttest data =mi_b;

var v6wdiff;

class group;

by _imputation_;

ods output parameterestimates =a_b;

run;

quit;

/* pooling phase*/

Proc mianalyze data =a_b;  (This is where I need help with.)

 

run;

 

 

 

1 REPLY 1
SAS_Rob
SAS Employee

Picking up from the Proc TTEST step, the code below should combine the means and differences.

 

 

proc ttest data =mi_b;

var v6wdiff;

class group;

by _imputation_;

ods output statistics=ttest_ds;
run;

proc sort data=ttest_ds;
by class _imputation_;
run;
proc mianalyze data=ttest_ds;
by class;
modeleffects mean;
stderr stderr;
run;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 1 reply
  • 1997 views
  • 0 likes
  • 2 in conversation