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

Hi SAS experts, 

I am a beginner, planning to do multiple imputations for a data set.

The data has the following variables ( both continuous and categorical); age, gender, education level, blood pressure, body weight index, cholesterol., mean daily steps, genotype, and outcome of dementia. 

 

All the variables including the outcome, have got missing values.

 

Please do share what type of multiple imputations I have to go with along with the codes  

 

( the primary aim is to validate a prediction model, i.e. to find how well the variables predict the outcome of dementia, done by finding the ROC curve!)

 

I have attached the missing pattern table. 

Thanks in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
Gopi2
Fluorite | Level 6

finally, the code below gave me the required imputation. thanks all!

I used multiple imputation with Fully  conditional specification (FCS)

 

 

proc mi data= data minimum = 0 0 0 0 MINMAXITER=100 nimpute=10 out= imuputed_data ;
var  (variables);
fcs plots=trace(mean std);

fcs discrim( categorical variables) /classeffects=include) nbiter =100 ;
fcs reg (continuous variables) nbiter =100 ;
run;

 

 

 

mini function was used in some to prevent getting some negative minimum values. minmaxter is to re-imupute if the system gets a negative ( or any avoided number in minimum) 

 

 

View solution in original post

5 REPLIES 5
gcjfernandez
SAS Employee

Please review the attached PDF file on Missing value imputation.

Gopi2
Fluorite | Level 6
thanks will try to do this and reply back if it worked
SAS_Rob
SAS Employee

The imputation method will depend on the missing data pattern and the variable type.  This table from the documentation will be helpful.

https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=statug&docsetTarget=st... 

 

There is not a way to get a combined ROC curve directly using multiple imputation.

You can however get a combined estimate of the C-statistic as the area under the ROC curve.  Below is an example that shows how you might code this.

data roc;
input alb tp totscore popind @@;
totscore = 10 - totscore;
datalines;
3.0 5.8 10 0 3.2 6.3 5 1 3.9 6.8 3 1 2.8 4.8 6 0
3.2 5.8 3 . 0.9 4.0 5 0 2.5 5.7 8 0 1.6 5.6 5 1
3.8 5.7 5 1 3.7 6.7 6 1 3.2 5.4 4 1 3.8 6.6 6 1
4.1 6.6 5 1 3.6 5.7 5 1 4.3 7.0 4 1 3.6 6.7 4 .
2.3 4.4 6 1 4.2 7.6 4 0 4.0 6.6 6 0 3.5 5.8 6 1
3.8 6.8 7 1 3.0 4.7 8 0 4.5 7.4 5 1 3.7 7.4 5 1
3.1 6.6 6 1 4.1 8.2 6 1 4.3 7.0 5 1 4.3 6.5 4 1
3.2 5.1 5 1 2.6 4.7 6 1 3.3 6.8 6 0 1.7 4.0 7 0
3.7 6.1 5 1 3.3 6.3 7 1 4.2 7.7 6 1 3.5 6.2 5 1
2.9 5.7 9 0 2.1 4.8 7 1 2.8 6.2 8 0 4.0 7.0 7 1
3.3 5.7 6 1 3.7 6.9 5 . 3.6 6.6 5 1
;
proc mi data=roc out=mi_roc;
class popind;
var alb tp totscore popind;
monotone logistic;
run;
proc logistic data=mi_roc;
by _imputation_;
ods output ROCAssociation=roc_ds(where=(ROCMODEL='Model'));
model popind(event='0') = alb tp totscore;
roc;
run;
proc mianalyze data=roc_ds;
modeleffects area;
stderr stderr;
run;

Gopi2
Fluorite | Level 6
thanks will try to do this
Gopi2
Fluorite | Level 6

finally, the code below gave me the required imputation. thanks all!

I used multiple imputation with Fully  conditional specification (FCS)

 

 

proc mi data= data minimum = 0 0 0 0 MINMAXITER=100 nimpute=10 out= imuputed_data ;
var  (variables);
fcs plots=trace(mean std);

fcs discrim( categorical variables) /classeffects=include) nbiter =100 ;
fcs reg (continuous variables) nbiter =100 ;
run;

 

 

 

mini function was used in some to prevent getting some negative minimum values. minmaxter is to re-imupute if the system gets a negative ( or any avoided number in minimum) 

 

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 5 replies
  • 1501 views
  • 6 likes
  • 3 in conversation