Displaying 1 result from an estimated 1 matches for "coxenv".
2024 Sep 15
0
Possible update to survival
...als= ?strata?). The code runs, and gives the wrong answer (group is treated as an ordinary covariate).
The solution
1. Add code very early that rewrites the formula without the offendinge survival:: string
2. Before calling model.frame(), insert my copy of strata into the calling chain
coxenv <- new.env(parent= environment(formula))
assign("strata", survival::strata, envir= coxenv)
environment(formula) <- coxenv
The second part of this deals with those who want to use survival functions but not use library(survival).
Now to the question.
I had always (naively)...