Re: [R] How to do survival analysis with time-related IVs?

From: Tianxu <tc332_at_drexel.edu>
Date: Mon, 21 Apr 2008 13:49:39 -0700 (PDT)

Thanks. The first two links are helpful.

For the log-reg, I was initially thinking that we need to re-arrange the dataset to make ID-Year observations (I think some books are suggesting this), and then run regression on "hazard rate". I did not know whether we should write code to calculate the hazard rate by ourselves. However, the paper solved my puzzle. Thanks!

Tianxu wrote:
>
> Hello folks,
>
>
>
> I am wondering how to do survival analysis with time-related IVs in R. For
> example,
>
>
>

>> > If we have time-related variables, such as the Overall Condition of

> 1990, 1991 etc., how can we include these variables in coxph model?
>
>> > 

>
>> > If we can not use coxph model, do we need to rearrange the dataset to

> make it something like:
>
>> >      ID time age drug censor     Year   Overall Condition 

>
>> > 1 1 5 46 1 0 1990 XXX
>
>> > 2 1 5 35 1 0 1991 XXX1
>
>> > 3 1 6 35 1 1 1992 XXX2
>
>> > 4 2 5 46 1 0 1990 XXX
>
>> > 5 2 6 35 1 1 1991 XXX1
>
>> > 6 3 6 35 1 1 1990 XXX2

>
>
>
> And then run logistic regression using "censor" as the DV?
>
>
>
>
>
>
>
> Tianxu Chen
>
> 101 N. 33rd Street
> Academic Building, 3FL
> Drexel University
> Philadelphia, PA 19104
> Phone: 1-215-895-2884(O)
> Email: tc332_at_drexel.edu
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> 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.
>
>
-- 
View this message in context: http://www.nabble.com/How-to-do-survival-analysis-with-time-related-IVs--tp16801272p16812343.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
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.
Received on Mon 21 Apr 2008 - 21:33:28 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 Apr 2008 - 22:30:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive