I tried your code, but it's giving the following error.. Error in match.fun(FUN) : argument "FUN" is missing, with no default
sorry (need a data.frame) : lapply(split(as.data.frame(mat), gl(nrow(mat)/4, 4, nrow(mat))), cov) ------------------------------------------------------------------- Jacques VESLOT CNRS UMR 8090 I.B.L (2?me ?tage) 1 rue du Professeur Calmette B.P. 245 59019 Lille Cedex Tel : 33 (0)3.20.87.10.44 Fax : 33 (0)3.20.87.10.31 http://www-good.ibl.fr ------------------------------------------------------------------- SUMANTA BASAK a ?crit :> I tried your code, but it's giving the following > error.. > Error in match.fun(FUN) : argument "FUN" is missing, > with no default > > > > __________________________________________________________ > Yahoo! India Answers: Share what you know. Learn something new. > http://in.answers.yahoo.com >
Berta
2006-May-03 11:46 UTC
[R] survival analysis with right and left censoring and time-dependent covariates
Hi R-users,
I have a data set with a particular type of interval-censored data: right
and left censored data, but no other type of interval censoring. I need to
fit a model with covariates to evaluate the influence of them on the
survival time.
First: I use Surv of library(survival) to create my survival object. I have
two possibilities:
Surv(c(1,1,NA,3),c(1,NA,2,3),type="interval2")
# 1 1+ 2- 3 , I do not [a,b] in
any case.
Surv(c(1,1,2,3),c(1,2,2,3),c(1,0,2,1),type="interval")
1 1+ 2- 3
Second:Given that coxph is not valid for interval-censored type of data, I
use survreg with covariates.
survreg(Surv(c(1,1,NA,3),c(1,NA,2,3),type="interval2") ~covariate)
Third: Now I need to fit a model with time-dependent covariates, but I only
find examples of how to include time-dependent covariates when using coxph
without left censoring (data=Rossi.txt, Jhon Fox), and therfore the
"event"
in Surv is 0 until the event occurrs:
http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-cox-regression.pdf
My question is: How could I fit a survival model that include right-left
censoring and time-dependent covariates?
Thanks a lot in advance,
Berta.
Thomas Lumley
2006-May-03 14:25 UTC
[R] survival analysis with right and left censoring and time-dependent covariates
On Wed, 3 May 2006, Berta wrote:> > My question is: How could I fit a survival model that include right-left > censoring and time-dependent covariates? >Not with anything in the survival package, unfortunately. -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle