BookmarkSubscribeRSS Feed
Kyra
Quartz | Level 8

Hi!

 

I am working with a dataset with missing values for few observations.

I would like to do multiple imputation for them.

 

The variables are below:

BMI_1_year          Frequency Missing = 199

BMI_6_mon                    Frequency Missing = 122

Post_op_BMI_4_weeks          Frequency Missing = 127

Pre_op_BMI                         Frequency Missing = 177

 

Please let me know sas code to do it.

I have attached a part of my dataset.

 

Thanks,

6 REPLIES 6
Kyra
Quartz | Level 8

I am not able to attach my dataset. sorry. It says "The contents of the attachment doesn't match its file type."

SAS_Rob
SAS Employee

You will need to decide which methodology you want to use specifically.  This link in the MI documentation will help you to decide:

https://go.documentation.sas.com/?docsetId=statug&docsetVersion=14.3&docsetTarget=statug_mi_details0...

 

Once you decide between MCMC vs FS/Monotone then there are good examples of the coding in the documentation as well.

https://go.documentation.sas.com/?docsetId=statug&docsetVersion=14.3&docsetTarget=statug_mi_examples...

Kyra
Quartz | Level 8
Thank you very much for the reply. I will go through the paper.
Kyra
Quartz | Level 8
How do i know if the missing pattern is monotone or arbitrary?
I looked into the examples provided in document but it is not clear.
Thanks.
SAS_Rob
SAS Employee
MI provides a table in the output with the missing data pattern. Since you have all continuous variables you could use the MCMC method and the NIMPUTE=0 option to see only the missing data pattern.


Kyra
Quartz | Level 8

I used the following code:

proc mi data=red.sleeve1  nimpute=0  ;
   mcmc chain=multiple displayinit initial=em(itprint);
   var BMI_1_year       BMI_6_mon      Post_op_BMI_4_weeks     Pre_op_BMI ;
run;

 

The sas output i got is attached. How do i interpret this. Thanks.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 6 replies
  • 1416 views
  • 0 likes
  • 2 in conversation