[R] Error in Surv(time, status)

Terry Therneau therneau at mayo.edu
Tue Jan 27 15:33:15 CET 2009


 I used following command:
> frailtyPenal(Surv(time, status) ~var1 + cluster(family), Frailty=TRUE
> ,n.knots=8, kappa1=1500,
+ cross.validation=FALSE)

And got this error :
Error in Surv(time, status) : Time variable is not numeric
In addition: Warning message:
In is.na(time) : is.na() applied to non-(list or vector) of type 'closure'

-----------

  It looks like you forgot data= in your model statement, which makes 'time' 
refer to the function of that name.
  
  	Terry T.




More information about the R-help mailing list