## steps to multiple imputation: proc mi

Solved
Occasional Contributor
Posts: 13

# steps to multiple imputation: proc mi

Hi SAS experts,

I have a question on multiple imputation.  Variables with missing data are: stage_cancer(ordinal) and birthcountry (nominal).

After I impute this data with the following code - what's next?

proc mi data = data nimpute=5 seed=9455 out=outmi;
class stage_cancer birthcountry;
fcs discrim(stage_cancer = sexn age birthcountry/classeffects=include);
fcs discrim(birthcountry = sexn age stage_cancer/classeffects=include);
var sexn age stage_cancer birthcountry;
run;

I am not sure how to handle the 5 new imputed datasets for the same subject, if lets say I want to run a regression - do i use the outmi dataset?

proc reg data = data;

model outcome = sexn age stage_cancer birthcountry;

run;

Any advice would be much appreciated! Thanks a lot.

Accepted Solutions
Solution
‎05-18-2016 01:50 PM
Posts: 5,046

## Re: steps to multiple imputation: proc mi

[ Edited ]

Look at proc MIANALYZE, something like

proc reg data=outmi outest=estmi;
by _imputation_;
model outcome = sexn age stage_cancer birthcountry;
run;

proc mianalyze data=estmi;
modeleffects ...;
run;

PG

All Replies
Solution
‎05-18-2016 01:50 PM
Posts: 5,046

## Re: steps to multiple imputation: proc mi

[ Edited ]

Look at proc MIANALYZE, something like

proc reg data=outmi outest=estmi;
by _imputation_;
model outcome = sexn age stage_cancer birthcountry;
run;

proc mianalyze data=estmi;
modeleffects ...;
run;

PG
Occasional Contributor
Posts: 13

## Re: steps to multiple imputation: proc mi

Thanks PG Stats!

I guess what I am struggle is this: "The key idea is that M repetitions yield M completed data sets, each of which can be analyzed by standard complete-data methods just as if it were the real data set. The M complete-data analyses based on the M repeated imputations are then combined to create one repeated-imputation inference."

So in this case, do I run proc reg 5 times for each imputed dataset?

and proc mianalyze creates combines to create one inference?

Thanks in advance for the clarification

Posts: 5,046

## Re: steps to multiple imputation: proc mi

You run proc reg once with by _imputation_. This performs 5 regressions and puts all the results in the same file (estmi) which is then fed to proc mianalyze.

PG
☑ This topic is solved.