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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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