Thank you everyone for all your help. Dr. Therneau and I had some offline email
exchange and he offered to add resid= and concordance= options which will
reduce the computational overhead in resampling scenarios such as mine. It will
also avoid having to access unexported internals.
Thanks,
Ven
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).
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
Attaching the code that generates the error. The function phcoefs in the
attached was modeled after coxph.fit from which all the preprocessing has been
stripped so that just coxfit6 (C code) can be called to estimate the
coefficients.
> library(survival)
> source("coxfit6-issue.R")
Error in .Ca
Thanks to Henrik Bengtsson I found a work around which is to use
environment(phcoefs) <- asNamespace("survival")
It seems like the symbols that are accessed using .Call are not accessible from
outside the package that defines it.
> phcoefs(stim[ii], sts[ii], as.matrix(as.double(cvt[ii])), oo$co
5 matches
Mail list logo