Re: [R] Time dependent Cox model

2010-05-21 Thread Terry Therneau
... interactions between covariables and time. A model such as coxph(Surv(ptime, pstat) ~ age + age*ptime, is invalid -- it is not at all what you think. If cph flags this as an error that is a good thing: I should probably add the same message to coxph. Is is somewhat sensible to

Re: [R] Time dependent Cox model

2010-05-21 Thread Marco Barbàra
... interactions between covariables and time. A model such as coxph(Surv(ptime, pstat) ~ age + age*ptime, is invalid -- it is not at all what you think. Actually what i'm trying to fit is coxph(Surv(start,end,event)~age+age:start) to model a time-varying effect

Re: [R] Time Dependent Cox Model

2009-10-14 Thread quaildoc
Does anyone have suggestions? Thanks! quaildoc wrote: I am having trouble formatting some survival data to use in a time dependent cox model. My time dep. variable is habitat and I have it recorded for every day (with some NAs). I think it is working properly except for calculating the

Re: [R] Time Dependent Cox Model

2009-10-14 Thread joris meys
Well, it might be wise to elaborate a bit more about the variables and what exactly you want e.g. death-time to be. I'd interprete it as time of death, but the fact that it is 0/1, means it is a logical (?) binary variable of some sort. Please ask your question in such a way that somebody who

Re: [R] Time Dependent Cox Model

2009-10-14 Thread quaildoc
Some suggested that go into more detail on what I wanted to accomplish and the rest of my code. I want to accomplish exactly what Fox did in this article( http://www.nabble.com/file/p25897307/appendix-cox-regression.pdf appendix-cox-regression.pdf ) (starting with page 7), except using habitat

Re: [R] Time Dependent Cox Model

2009-10-14 Thread joris meys
On Wed, Oct 14, 2009 at 9:19 PM, quaildoc just.strut...@gmail.com wrote: Some suggested that go into more detail on what I wanted to accomplish and the rest of my code.  I want to accomplish exactly what Fox did in this article( http://www.nabble.com/file/p25897307/appendix-cox-regression.pdf

[R] Time Dependent Cox Model

2009-10-13 Thread quaildoc
I am having trouble formatting some survival data to use in a time dependent cox model. My time dep. variable is habitat and I have it recorded for every day (with some NAs). I think it is working properly except for calculating the death.time. This column should be 1s or 0s and as I have it