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

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.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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?

View solution in original post

3 REPLIES 3
SteveDenham
Jade | Level 19

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

ballardw
Super User

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?

Reshi
Calcite | Level 5

"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!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 1283 views
  • 0 likes
  • 3 in conversation