BookmarkSubscribeRSS Feed
hava
Calcite | Level 5
I have a dataset with only categorical variables. Some of the variables have missing values but I only want to impute missing values for one variable and to leave the others alone. Is it acceptable to fill them in with temporary flags for missing values so that the function doesn't impute them?

Like this. Let's say I don't want to impute the missing values for Var1.
Var1 -> Var1
'Cat' -> 'Cat'
'Dog' -> 'Dog'
' ' -> 'ZZZ'
2 REPLIES 2
ballardw
Super User

You should show the code that you are currently using or have attempted.

If you had I would not have to ask "Did you have a VAR statement?".

From the online help for the Var statement in Proc MI:

The VAR statement lists the variables to be analyzed. The variables can be either character or numeric. If you omit the VAR statement, all continuous variables not mentioned in other statements are used.


@hava wrote:
I have a dataset with only categorical variables. Some of the variables have missing values but I only want to impute missing values for one variable and to leave the others alone. Is it acceptable to fill them in with temporary flags for missing values so that the function doesn't impute them?

Like this. Let's say I don't want to impute the missing values for Var1.
Var1 -> Var1
'Cat' -> 'Cat'
'Dog' -> 'Dog'
' ' -> 'ZZZ'

 

 

 

 

SAS_Rob
SAS Employee

I think it depends on what you want to assume about the missing values in the variables that you do not want to impute.  Are they missing at random, MNAR or actually valid responses?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2 replies
  • 1052 views
  • 2 likes
  • 3 in conversation