- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please review the attached PDF file on Missing value imputation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The imputation method will depend on the missing data pattern and the variable type. This table from the documentation will be helpful.
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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)