Re: [R] the Surv function

From: Armin Goralczyk <>
Date: Thu, 03 May 2007 19:15:54 +0200

2007/5/2, Jennifer Dillon <>:
> Hi,
> I'm trying to do a simple survival analysis on some data, and I'm having the
> following problem (here's my code and the error message):
> out <- Surv(fup,event=status)
> Error in Surv(fup, event = status) : argument "time2" is missing, with no
> default

I am not very familiar with this, but shouldn' t it be:

out <- Surv(fup, status==1)

where fup is your vector of time differences and status your vector to denote censored events (e.g. 1 is an uncensored event and 2 for a censored events). Have a look at section 12.2 of "introductory statistics with R" by P. Dalgaard

A. Goralczyk
Göttingen, Ger.

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 03 May 2007 - 17:24:28 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 May 2007 - 17:31:22 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.