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

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