[R] longitudinal study

Rich Shepard rshepard at appl-ecosys.com
Fri Jan 18 18:18:53 CET 2013


On Fri, 18 Jan 2013, bibek sharma wrote:

> I have a data set from a longitudinal study ( sample below) where subjects
> are followed over time. Second column (status) contains info about if
> subject is dead or still in the study and third column is time measured in
> the week. Here is what I need: if status is not dead or unknown take the
> last week, if status is dead or unknown I need to have corresponding week.
>
> Desired resulst:
>
> 1	no	7
> 2	yes	5
> 3	Unknown	4

   Looks like a survival analysis situation. I know there are R packages for
this.

Rich



More information about the R-help mailing list