Re: [R] the Surv function

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

2007/5/2, Jennifer Dillon <jdillon_at_hsph.harvard.edu>:
> 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.

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.