Hello Everyone
I am trying to learn Multiple Imputation to address the problems of missing values in my data and wanted to know if my approach is correct:
Data set abc:
Response Variable: Target_B (Binary)
(Do not have any missing for response, but have missing for all the predictors; interval & Categorical)
Predictors: Interval var - demage, medhomevalue, giftavg, promcnt.
Class Var: DemGender(Binary), Statusnk (Ordinal)
/* SAS CODE For Multiple Imputation
*/ Step 1: proc mi data = abc out = miout nimpute = 5 seed = 35399;
class Target_B DemGender statusnk;
var Demage medhomevalue giftavg promcnt;
run;
Step 2:
Proc Logistic data = miout outest = outreg covout;
class Target_B DemGender statusnk;
model Target_B (Event = '1') = DemGender statusnk Demage medhomevalue giftavg promcnt/
selection = stepwise fast SLStay = 0.05 SLEntry = 0.05 ;
by _imputation_;
ods output parameterestimates = lgsparms;
run;
Step3: Lets Say the variables selected by stepwise are Demage DemGender(Categorical) & giftavg
Proc mianalyze data = outreg;
var Demage Demgender Giftavg;
run;
Hi - you are getting the gist of it. Just a few points to note though:
1. When you select your predictors, make sure to insert all the variables that you will be using in your analysis model and any additional 'auxiliary' variables (do not need to be risk factors, just predictors, can be precursors, intermediate outcomes.
2. Before you start imputing, it is important to look at the proportion of missing for each of the variable. If the proportion of missingness is relatively large (e.g 50%), you might need to increase the number of imputations (nimpute = 50) to achieve reasonable statistical efficiency (Rubin, 1987).
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.