BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Rebecca1
Calcite | Level 5

Hello,

 

I am trying to use PROC MI to impute values in a data set, there are not many missing values in the data set, but a fair number of variables.  When I just use PROC MI without the VAR statement, it doesn't appear to analyze all the variables.  When I specify the variables, I'm fine specifying up to 8, but when I add the ninth variable, I get an error "Variable att9 should either be numeric in the CLASS list"  Is there a parameter that I need to add to expand the variable list?  I'm using:

 

proc mi data=newdata seed=33333 out=midata;

var att1 att2 att3 att4 att5 att6 att7 att8 att9;

run;

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
rayIII
SAS Employee

Hi.

 

Add a CLASS statement to your PROC MI call, like:

 

proc mi...;

CLASS att9;

var...

run; 

 

Actually, all categorical variables should be included in the CLASS statement, whether they are character or numeric. 

 

You may also need to add an FCS or MONOTONE statement. I haven't used MI in a while so please consult the examples here:

 

http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_mi_sect041.h...

 

Hope this helps. 

 

Ray

View solution in original post

2 REPLIES 2
rayIII
SAS Employee

Hi.

 

Add a CLASS statement to your PROC MI call, like:

 

proc mi...;

CLASS att9;

var...

run; 

 

Actually, all categorical variables should be included in the CLASS statement, whether they are character or numeric. 

 

You may also need to add an FCS or MONOTONE statement. I haven't used MI in a while so please consult the examples here:

 

http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_mi_sect041.h...

 

Hope this helps. 

 

Ray

Rebecca1
Calcite | Level 5

In this case, all of the variables are continuous, not categorical. I thought it might be something about the variable that was generating the message, but the ninth variable seems to generate the error regardless of which variable I have in that position.  I tried the other options, but didn't have any success.  Any other suggestions?  

Thanks.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2184 views
  • 0 likes
  • 2 in conversation