[R] survfit
gb
gb at stat.umu.se
Mon Feb 26 21:31:09 CET 2001
I have two problems with 'survfit' in survival5; R-1.2.1, RH7.0:
------------------------------------------------------------
> ls()
character(0)
> tid <- c(1,2,3)
> eve <- c(1,1,1)
> x <- c(1,0,1)
> library(survival5)
> fit <- coxph(Surv(tid, eve) ~ x)
> s.fit <- survfit(fit)
Error in model.frame(formula, rownames, variables, varnames, extras,
extranames, :
variable lengths differ
-------------------------------------------------------------
Putting these statements in a function generates on the other hand:
'Error in Surv(tid, cens) : Object "cens" not found'
(from survfit) when executing the function.
What am I doing wrong?
Göran
--
Göran Broström tel: +46 90 786 5223
professor fax: +46 90 786 6614
Department of Statistics http://www.stat.umu.se/egna/gb/
Umeå University
SE-90187 Umeå, Sweden e-mail: gb at stat.umu.se
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list