Since my coding philosophy is "why compute something that is not needed" I 
don't have timing data comparing coxph.fit to the stripped down version. I will 
try to come up with a test suite.

I do work under Linux (the initial Windows output was because I had both 3.3.1 
and 3.4.0 on that machine). So I can get the source code and build the 
necessary parts into my function/package, but doesn't it defeat the purpose of 
reusable code?

Thanks,
Venkat

-----Original Message-----
From: Therneau, Terry M., Ph.D. [mailto:thern...@mayo.edu] 
Sent: Thursday, April 27, 2017 11:41 AM
To: Seshan, Venkatraman E./Epidemiology-Biostatistics; Therneau, Terry M., 
Ph.D.; r-help
Cc: murdoch.dun...@gmail.com
Subject: Re: survival package can't find Ccoxfit6



On 04/27/2017 09:53 AM, sesh...@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.

=====================================================================

     Please note that this e-mail and any files transmitted from
     Memorial Sloan Kettering Cancer Center may be privileged, confidential,
     and protected from disclosure under applicable law. If the reader of
     this message is not the intended recipient, or an employee or agent
     responsible for delivering this message to the intended recipient,
     you are hereby notified that any reading, dissemination, distribution,
     copying, or other use of this communication or any of its attachments
     is strictly prohibited.  If you have received this communication in
     error, please notify the sender immediately by replying to this message
     and deleting this message, any attachments, and all copies and backups
     from your computer.
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to