--- begin included message ---
...
I am trying to perform survival analysis but continually get errors
when extracting from this data.frame:

attempt 1:
> X <- Surv(B27.vec$AgeOn,B27.vec$UV)
> survdiff(X,rho=0,data=uvf)
Error in x$terms : $ operator is invalid for atomic vectors

...
--------- end inclusion ----

As should be apparent from Gerrit Eichner's response, your problem is
that survdiff expects a formula as the first argument and you gave it a
survival object instead.
  However, the error message you got is really not helpful.  I've now
added a check to survreg that will result in a more apropos response
from the routine.

Terry Therneau

______________________________________________
R-help@r-project.org 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.

Reply via email to