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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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