Hi all,




I have a dataset which includes 84 rows and 4313 columns. Starting from the
2nd row, each row represents
a patient. The 1st column is for "arrayID"
                     2nd column is for "time"
                     3rd column is for "cancer"
                     4th column is for "patientID"
                     Starting for the 5th columns, each column's ID is like
"CTC_232B23", "RP11_181G12", "RP11_62M23"...

I extract first 5 rows and 7 columns and get the data in below:

 arrayID   time cancer patientID CTC_232B23 RP11_181G12 RP11_62M23
X1747_4224 37.633      0     30635   -0.02665    -0.02665  -0.038025
X1750_4214 89.300      0     22158   -0.02665    -0.02665  -0.038025
X1751_4208 53.333      0     31669   -0.02665    -0.02665  -0.038025
X1754_4194 39.467      0     32849   -0.02665    -0.02665  -0.038025
X1775_4497 84.900      0     33563   -0.02665    -0.02665  -0.038025

Finally I would like to build the cox model for each column (starting from
the 5th column). The code would be like:

mod.allison <-  coxph( Surv(time, cancer) ~ CTC_232B23 , data=Rossi2)
mod.allison <-  coxph( Surv(time, cancer) ~ RP11_181G12 , data=Rossi2)
mod.allison <-  coxph( Surv(time, cancer) ~ RP11_62M23 , data=Rossi2)

I have no problem getting the result. However, since there are 4309 columns
(counted begining at the 5th column), I decide to make a 4309*1 matrix
(called "BACs") to store the name of each column. Then run a loop like:

for (i in 1:4309){

mod.allison <-  coxph( Surv(time, cancer) ~ BAC[i,1], data=Rossi2)
}

mod.allison


However, I got the error. Would you like to give me some suggestions about
this?


Many thanks in advance!

	[[alternative HTML version deleted]]


