mardi 2 décembre 2014

cox regression with R atomic vectors error


Vote count:

0




I have a dataset imported into R. I sucessfully ran survfit on the data set. I have one column with the periods survived by the patient and one column with (0/1) outcome whether the patient survived. I am know trying to do coxph on the data and am using the following.


coxph <- coxph(Surv(mydata$V11, mydata$event), method ="breslow")


However, I keep getting the following error. I have tried using as.numeric on the variables but this still does not fix the problem. I have also tried removing mydata$ from each variable in the line of code above. Thank you.


Error: $ operator is invalid for atomic vectors



asked 38 secs ago







cox regression with R atomic vectors error

Aucun commentaire:

Enregistrer un commentaire