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!

sas-innovate-2024.png

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.

 

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
  • 3 replies
  • 747 views
  • 0 likes
  • 3 in conversation