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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 144 views
  • 1 like
  • 3 in conversation