Mathangi Gopalakrishnan
2010-Dec-05 13:10 UTC
[R] Help with time varying covariate-unfold function
Hello All, I am trying to use the unfold function in RcmdrPlugin.survival library, which converts the survival data with time varying covariates to the counting process notation. The problem is somehow, the event indicator created is not correct. Below is the data, I am trying to convert: CASE TRT FAILTIME FAILCENS SEX AGE IGG0 IGG28 IGG42 IGG84 IGG364 26003 A 11.2033 2 1 43.9535 0 80 80 320 NA IGG0 to IGG364 are my time varying covariates and FAILCENS = 2 indicates observed times. So, when I tried to use, igg2.long<-unfold(igg.2[3,],time="FAILTIME",event="FAILCENS",cov=9:13,cov.na mes="iggtitre"), I obtained the following output: start stop FAILCENS.time CASE TRT FAILTIME FAILCENS SURVTIME SURVCENS SEX 3.1 0 1 0 26003 A 11.2033 1 17.5441 1 1 3.2 1 2 0 26003 A 11.2033 1 17.5441 1 1 3.3 2 3 0 26003 A 11.2033 1 17.5441 1 1 3.4 3 4 0 26003 A 11.2033 1 17.5441 1 1 AGE IGGrel iggtitre 3.1 43.9535 NA 0 3.2 43.9535 NA 80 3.3 43.9535 NA 80 3.4 43.9535 NA 320>As it can be seen, this data was observed, but my censoring indicator (FAILCENS.time) for the last start stop line should have been one, which is not. Could somebody help me with this problem? I did try using the Rossi data also, which is an example in the unfold function. Even there, the arrest.time are all zero, even when the event happened. Thanks a lot for your time. Mathangi [[alternative HTML version deleted]]