Halabi, Anan
2010-Sep-21 15:50 UTC
[R] when i create data.frame is time variable and Censor variable should be equal?
Error in data.frame(times = NonCensored.data, censor = Censored.data) : arguments imply differing number of rows: 14, 6 Anan Halabi Reliability Eng, R&D HP Scitex Tel: 972-9-8924648 mobil: 972-52-6624231
Marc Schwartz
2010-Sep-21 16:02 UTC
[R] when i create data.frame is time variable and Censor variable should be equal?
On Sep 21, 2010, at 10:50 AM, Halabi, Anan wrote:> Error in data.frame(times = NonCensored.data, censor = Censored.data) : > arguments imply differing number of rows: 14, 6Yes. There should be one row for each observation, with a time and an event status flag for each. For typical right censored data, 'times' should be the time to the event of interest or the time to censoring. The 'censor' column should be the event status indicator (normally called 'event' by default). Your use of 'censor' as a variable name may result in some confusion relative to how to code the variable. See: require(survival) ?Surv for more information. HTH, Marc Schwartz