Open w1806291 opened 3 years ago
Dear Wahid,
cox.zph is a function from the survival package, so to get what you want, try
fit <- survival::coxph(....) prop.full <- survival::cox.zph(fit)
and you should be fine.
Best, Göran
I have loaded the survival and eha packages.
I don't have a problem with coxph, just cox.zph
the error message is...
Error in cox.zph(fit) : unexpected assign component
On 2021-06-30 16:06, w1806291 wrote:
I have loaded the survival and eha packages.
I don't have a problem with coxph, just cox.zph
the error message is...
Error in cox.zph(fit) : unexpected assign component
Still after my suggestion, i.e.
fit <- coxph(...) cox.zph(fit)
?
Then you should ask the maintainer of 'survival', not me.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/goranbrostrom/eha/issues/11#issuecomment-871435888, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7LHZ2GCRULAD6M57IMYF3TVMQFNANCNFSM47SATU4Q.
ok i'll try that thanks
BTW is there any way of getting all the R code from the book already inputted into R?
fert2 <- fert[fert$parity == 2, ] fit <- coxreg(Surv(next.ivl, event) ~ ses + age + year + parish, data = fert2) prop.full <- cox.zph(fit)
Error in cox.zph(fit) : unexpected assign component