Help using Base SAS procedures

Proc MI variable list

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Proc MI variable list

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.


Accepted Solutions
Solution
‎07-08-2016 08:10 AM
SAS Employee
Posts: 106

Re: Proc MI variable list

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


All Replies
Solution
‎07-08-2016 08:10 AM
SAS Employee
Posts: 106

Re: Proc MI variable list

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

New Contributor
Posts: 3

Re: Proc MI variable list

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.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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