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
|
Anyone any idea?
Thanks!
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.
NIV users
The FREQ Procedure
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.
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.
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!
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.
Ready to level-up your skills? Choose your own adventure.