[R] survival package can't find Ccoxfit6
Therneau, Terry M., Ph.D.
therneau at mayo.edu
Thu Apr 27 17:41:16 CEST 2017
On 04/27/2017 09:53 AM, SeshanV at mskcc.org wrote:
> Thank you Drs. Therneau and Murdoch.
>
> "Why not use coxph.fit?" -- My use case scenario is that I needed the Cox model coefficients for resampled data. I was trying to reduce the computational overhead of coxph.fit (since it will repeated a large number of times) by stripping all the parts that I don't need such as sorting of the data prior to coxfit6.c call and Martingale residual and concordance computations after the parameters are estimated.
That is an interesting use case which I had not thought about. The first question is just
how much slower coxph.fit is than the stripped down version (I'd guess about 1/2 but that
is just a guess), and whether that makes a real difference to your code. If it is
spending 10% of its time in the coxph calculation a change to 5% isn't that much, but 90%
is something else. The next is what is the main impediment (I'd guess concordance, but
again just a guess.) Perhaps I could add concordance= and/or resid= flags to the fitting
routine.
>
> Under the R v3.4.0 model one cannot create any modified form of coxph.fit and expect it to work. Worse yet is the following where I copy "coxph.fit" to my workspace as "mycoxph.fit" (works initially because the environment is namespace:survival and fails when environment changed to R_GlobalEnv)
>
If you were under linux another solution would be to grab the source from github, add your
routine to the R/ directory, then R CMD build followed by R CMD INSTALL. Macintosh is
essentially as easy, though you need to install Xcode for the compilers. The compile
toolchain for windows is outside my ken.
Let's keep talking.
Terry T.
More information about the R-help
mailing list