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 2025: Call for Content

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!

Submit your idea!

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
  • 1366 views
  • 0 likes
  • 2 in conversation