Multiple Imputation in SAS

This forum made possible through the generous support of SDN members, donors, and sponsors. Thank you.

irish80122

DCT at Miss State U.
20+ Year Member
Joined
Apr 26, 2003
Messages
943
Reaction score
155
Do any of you out there use SAS? If so, do you know how to do multiple imputation? I believe I have the proper code and am running it properly but I am not sure how to combine the 5 imputations into one and then import that data into my main dataset.

Below is my syntax (based on the Syntax from Tabachnick and Fidell)

*Conduct multiple imputation to impute values for SAStot ;
*step 1, Tabachnick and Fidell p 181 ;
proc mi data=sss.analysis seed=37851 out=sss.imputout;
var ISItot DDNtot CESDtot PCLtot SAStot ;
run ;

*step 2, Tabachnick and Fidell p 183 ;
proc reg data=sss.imputout outest=REGOUT covout ;
model SBQ4sqrt = ISItot DDNtot CESDtot PCLtot SAStot ;
by _Imputation_;
run;

*step 3, Tabachnick and Fidell p 186 ;
proc mianalyze data=regout ;
var Intercept ISItot DDNtot CESDtot PCLtot SAStot;
run ;
 
I take the silence to mean that no one knows. That is alright, I obviously don't either 🙂. Do any of you know of good stat message boards? I would love to figure this out but am trying to avoid hiring a consultant!

Thanks!!!
 
Have yet to really use MI outside of class, so I haven't really sat down to figure it out. That said, I'll post the syntax I have for it, courtesy of my stats professor. Its slightly different from what you have, so hopefully it will help some. I'm not entirely clear on your question...are you trying to export the results? MI is definitely not my strong point, but my understanding is that you are using mianalyze to combine the values and get results, and that combining imputed values (would you average them?) isn't the point. If you need other values, I would import them into the imputed dataset, rather than the other way around. I'm VERY ignorant of the process though, so take it with a grain of salt.

*Imputing mv using age gender education*;
proc mi out=bdi_mi;
var age gender educ bdi;run;

*regression done in each imputed dataset*;
proc reg data=bdi_mi
outest=bdi_param
covout noprint;
model bdi=age gender educ;
by _imputation_;run;

*Prints regression estimate for imputed datasets*;
proc print
data=bdi_param;run;

*unstandard estimates across the 5 regressions*;
proc mianalyze
data=bdi_param;
modeleffects intercept age gender educ;run;
 
Ollie, if this is your ignorant, I am very jealous! The problem I have had is with the mianalyze, I haven't been able to combine the imputed values. The best I have been able to do is come up with a dataset with the imputation done 5 times. I will play with your code and see if I can get it to work. Thank you very much for taking the time to reply, I really appreciate it.
 
Ollie, if this is your ignorant, I am very jealous! The problem I have had is with the mianalyze, I haven't been able to combine the imputed values. The best I have been able to do is come up with a dataset with the imputation done 5 times. I will play with your code and see if I can get it to work. Thank you very much for taking the time to reply, I really appreciate it.

Please refrain from jealousy until we figure out if I am outlandishly incorrect😉 I'm by no means a quant guy, so I'm just talking based off my loose understanding from an hour long lecture, and some reading.

The final step should be the key. I can't remember exactly what my output looked like, but I think that was where mianalyze should give you what is "essentially" output from a single regression (at least outwardly). Perhaps its the modeleffects line that will make the difference.

Let me know how it turns out.
 
It is the final step that is important. I thought the final step combined the data bases but it actually combines the five regressions into one. However, it uses theta instead of beta? I still don't get that. Thanks for your help Ollie!
 
Top