search for: sleepfit

Displaying 1 result from an estimated 1 matches for "sleepfit".

2014 Mar 06
1
Survfit Error
Hi everyone, I am not new to R, but new to running survival models in R. I am trying to create some basic KM curves, using the following code: library(survival) library(KMsurv) (import data etc - basic right censored, with continuously observed time of death) sleepfit <- survfit(Surv(timeb, death), data = sleep) Here timeb is measured is survival in years, death is a 1/0 indicator (1 = event = death), and the dataset is called sleep. But I get the following error Error in UseMethod("survfit", formula) : no applicable method for 'survfit...