BookmarkSubscribeRSS Feed
VioletaB
Calcite | Level 5

Hello,

 

I want to use proc mi to impute missing data and i have following question:

In the code below i have in the var statement 2 categorical variables with no missing values and continuous variables that have missing data. 

 

proc mi data=data1 seed=38467 nimpute=50 out=data_mcmc;

  mcmc impute=monotone chain=multiple;

var treatment gender calcium_v1 calcium_v2 calcium_v3...calcium_v20;

run; 

 

In this case do i have to include 'by' statement with these 2 categorical variables OR create a dummy variable (0,1) for each category OR no updates are needed in this case? 

1 REPLY 1
SAS_Rob
SAS Employee

If you are going to use the MCMC statement then you will need to create dummy variables for the categorical variables. 

Unless you have a specific reason for doing so, you could avoid having to impute in two steps by simply using the FCS statement.  This would enable you to use the CLASS statement and avoid having to dummy code.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 1 reply
  • 962 views
  • 0 likes
  • 2 in conversation