I am running proc phreg with ties = exact; however, floating point zero divide error occurs. While the error can be eliminated if I change ties handling method to Efron or Breslow, I am wondering if this is due to the structure of my data that truly can't be handled by the exact method.
I have only 200 over subjects with 9 categorical variables ( A - I) , 2 continuous variables (J - H ) and 2 strata (L-M). One categorical variable has really sparse data in one of the categories and strangely, if I remove that variable completely from the model, ties=exact works.
proc phreg data = Data
class A B C D E F G H I ;
model time*event(0) = A B C D E F G H I J K / ties = exact ;
strata L M;
run;
I would really like to find out the true cause of this error THANK YOU!
run;
See this thread for a discussion of this problem. The OP there was using an old version of SAS. What version are you using?
Also in that thread is a link to SAS Technical Support. If you are getting a floating point zero divide error in a modern version of PROC PHREG, please submit a report to SAS Technical Support.
Since you mention the "sparse level" issue, I wonder if that might be related to the FP divide issue. When you open a track, you might want to show the results of PROC PRINT or PROC FREQ when you restrict to the sparse level. Something like
proc print data=Data;
where Cat_Var_with_Sparse_Data = 'Sparse Level';
run;
My concern is that if there are only one or two observations in that level, and there are ties among some of the other categorical variables, it might make the parameter estimation for that level degenerate and lead to the FP zero divide.
See this thread for a discussion of this problem. The OP there was using an old version of SAS. What version are you using?
Also in that thread is a link to SAS Technical Support. If you are getting a floating point zero divide error in a modern version of PROC PHREG, please submit a report to SAS Technical Support.
Since you mention the "sparse level" issue, I wonder if that might be related to the FP divide issue. When you open a track, you might want to show the results of PROC PRINT or PROC FREQ when you restrict to the sparse level. Something like
proc print data=Data;
where Cat_Var_with_Sparse_Data = 'Sparse Level';
run;
My concern is that if there are only one or two observations in that level, and there are ties among some of the other categorical variables, it might make the parameter estimation for that level degenerate and lead to the FP zero divide.
I have read the thread you mentioned and some other documents by SAS regarding floating point. I know this problem used to be in SAS 9.2 but I am using SAS 9.4.
I will submit a report to SAS Technical Support accordingly.
Thank you!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.