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?

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