Displaying 1 result from an estimated 1 matches for "fitagecovari".
2007 Feb 05
2
Two ways to deal with age in Cox model
...including age as a covariate, or to include age as part of the
follow-up time, viz,
Age as a covariate:
tetest1 <- list(time= c(4, 3,1,1,2,2,3),
status=c(1,NA,1,0,1,1,0),
age= c(0, 2,1,1,1,0,0),
riskfactor= c(0, 0,0,0,1,1,1))
fitagecovariate<-coxph( Surv(time, status) ~ age +riskfactor, test1)
fitagecovariate
Age included as part of follow-up time:
test2<-test1
test2$timeplusage<-test2$time+test2$age
fitagefollowup<-coxph( Surv(timeplusage, status) ~ riskfactor, test2)
fitagefollowup
I would appreciate any thoug...