Displaying 1 result from an estimated 1 matches for "hiwang".
Did you mean:
jiwang
2014 Mar 06
1
Survfit Error
...p.
But I get the following error
Error in UseMethod("survfit", formula) :
no applicable method for 'survfit' applied to an object of class "Surv"
I'm not sure what I'm doing wrong, as I followed the example from
the following paper http://anson.ucdavis.edu/~hiwang/teaching/10fall/R_tutorial%201.pdf , page 4 as a guide.
I also tried
sleepfit <- survfit(Surv(timeb, death==1), data = sleep)
and
sleepfit <- survfit(Surv(starttime, endtime, death), data = sleep)
Can anyone tell me what I might be doing wrong?
Thanks,
Lucy
[[alternative HTML ver...