[R] Schoenfeld Residuals

Laura Bonnett l.j.bonnett at googlemail.com
Fri Apr 3 13:57:54 CEST 2009


Dear All,

Sorry to bother you again.

I have a model:
coxfita=coxph(Surv(rem.Remtime/365,rem.Rcens)~all.sex,data=nearma)
and I'm trying to do a plot of Schoenfeld residuals using the code:
plot(cox.zph(coxfita))
abline(h=0,lty=3)

The error message I get is:
Error in plot.window(...) : need finite 'ylim' values
In addition: Warning messages:
1: In sqrt(x$var[i, i] * seval) : NaNs produced
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf

My data (nearma) has a lot of rem.Remtime entries which are equal i.e
large amounts of tied data.  If I remove the entries where this is the
case from the dataset I get the results I want!

Please can someone explain why removing paients with tied remission
time has such an effect on the code and also how to remedy the problem
without removing patients?

Thank you very much,

Laura.




More information about the R-help mailing list