The problem:
In PROC MIXED, I defined several classes under 'class'.
One of them, called 'Status', has two levels, coded as '1' and '2' (i.e. the column for these data consists of ones and twos).
When I run the program, the output states that the class 'Status' has one level, and that it's value is '2'
This happens even though I have several other classes with two levels coded as '1' and '2', (i.e., as for Status, the data are columns of ones and twos), for which the output correctly states that each of these classes has two levels, with the values '1' and '2'.
Anyone know how I can fix this?
PS: The data come from an Excel file, which I opened in SPSS and then saved with the .sas7bdat extension
PPS: I've already tried removing the entire 'Status' column in Excel and rewriting it. I've also tried coding the levels as letters (e.g. 'C' and 'P'), but the problem remains.
Many of the modeling procs will exclude records if any of the independent variables are missing. By any chance are other variables, alone or in combination, in the model missing for all of records with Status=2?
One of the output tables should also mention how many records were used. Does this match the number in your input data set?
One quick check would be to do a proc freq and see if it gives two values. My initial guess is that all of one category is being excluded, either in a data step prior to analysis or by use of a WHERE statement.
Steve Denham
Many of the modeling procs will exclude records if any of the independent variables are missing. By any chance are other variables, alone or in combination, in the model missing for all of records with Status=2?
One of the output tables should also mention how many records were used. Does this match the number in your input data set?
"By any chance are other variables, alone or in combination, in the model missing for all of records with Status=2?"
This was indeed the case. Thanks!
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.