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-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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