BookmarkSubscribeRSS Feed
fouke_o
Fluorite | Level 6

Hi all, 

 

I am trying to fit a frailty model in my survival analysis using this code:

 

PROC PHREG data=DataSurvival ;
CLASS Riluzol Center;
MODEL timeM*Deceased(0)=Riluzol ALSFRSRdecline Diagnosticdelay ;
RANDOM Center / noclprint;
HAZARDRATIO 'Frailty Model Analysis' Riluzol;
Format Center Sites.;
RUN;

And keep getting the error: 
ERROR: Variable Center in the RANDOM statement has only one level.

 

My center variable for riluzol looks like this: 

Table of Riluzol by CenterRiluzol Center1 2 3 4 Total01TotalFrequency Missing = 639
195
13.72
3
0.32
1030
35.99
181
12.46
1409
 
1226
86.28
926
99.68
1832
64.01
1272
87.54
5256
 
1421
929
2862
1453
6665

Anyone any idea? 

 

Thanks!

4 REPLIES 4
PaigeMiller
Diamond | Level 26

Could you please re-format the table so I can read it and understand it? And also please explain what this table is and how it was created.

--
Paige Miller
fouke_o
Fluorite | Level 6

NIV users

The FREQ Procedure

Sorry, it did something with the table, here you go: 
Knipsel.PNG
ballardw
Super User

I think that you may want to examine a few more variables in combination. I think that you can get a message like that when considering the DEPENDENT variable(s) if there is only one value of the random variable associated with a given outcome.

 

You might try:

proc freq data=datasurvival;
  table deceased*Riluzol*center / list ;
run;

And see if a combination of deceased and riluzol only have one value of Center .

From your table I suspect Center=Tours and Riluzol=0 all have the same value for Deceased.

PaigeMiller
Diamond | Level 26

ERROR: Variable Center in the RANDOM statement has only one level.

 

When SAS says there is only one level, I believe SAS. It may be that because of missing values somewhere in your data set, the model winds up with only a single level of CENTER. Anyway, given the model you are fitting, we would need to see frequency tables on all variables in the model, not just the one you show.

--
Paige Miller

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 739 views
  • 1 like
  • 3 in conversation