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

Hello,

 

After using this syntax on imputed data (10 imputations), I can not retrieve parameterEstimates for the 10 imputations and then use Rubin's method for the global analysis. Is it possible? If yes, how to do it?

proc ttest data=ttest_cd;
paired cd1*cd2;
by _imputation_;
ods output parameterEstimates=diff ;
run;

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
SAS_Rob
SAS Employee

You would need the Statistics ODS table from TTEST to do this.  Below is a full example you should be able to follow.

 

/*Create a Sample dataset*/

data a;
do rep=1 to 40;
if ranuni(3211)>.6 then y1=.;
else y1=1.6+rannor(3211);
if ranuni(3211)>.8 then y2=.;
else y2=2.3+rannor(3211);
output;
end;
run;

 

proc mi data=a seed=10 out=outmi;
var y1 y2;
run;

proc ttest data=outmi;
by _imputation_;
paired y1*y2;
ods output statistics=t_stats;
run;

 

proc mianalyze data=t_stats;
modeleffects mean;
stderr stderr;
run;

View solution in original post

2 REPLIES 2
SAS_Rob
SAS Employee

You would need the Statistics ODS table from TTEST to do this.  Below is a full example you should be able to follow.

 

/*Create a Sample dataset*/

data a;
do rep=1 to 40;
if ranuni(3211)>.6 then y1=.;
else y1=1.6+rannor(3211);
if ranuni(3211)>.8 then y2=.;
else y2=2.3+rannor(3211);
output;
end;
run;

 

proc mi data=a seed=10 out=outmi;
var y1 y2;
run;

proc ttest data=outmi;
by _imputation_;
paired y1*y2;
ods output statistics=t_stats;
run;

 

proc mianalyze data=t_stats;
modeleffects mean;
stderr stderr;
run;

Liamb
Obsidian | Level 7

Thanks a lot Rob

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