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.
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:
Hope this helps.
Ray
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:
Hope this helps.
Ray
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.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.
Ready to level-up your skills? Choose your own adventure.