I'm trying to run the following code, but I got this error Error in unclass(x)[i, , drop = FALSE] : (subscript) logical subscript too long
library ( survival )
library(KMsurv)
data("tongue")
tongue
Weibull.1<-survreg(Surv(times,censor)~1, data=tongue, subset=(group==1),scale=1,dist="weibull")
Weibull.2<-survreg(Surv(times,censor)~1, data=tongue, subset=(group==2),scale=1,dist="weibull")
How can I avoid this error?
Error: object 'times' not found
. (change to time) .....Error: object 'censor' not found
. (change to delta) ....Error: object 'group' not found
. Sigh – EdwardWarning message: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control, : Ran out of iterations and did not converge
– Dana