[R] survreg help in R

murphy82nd murphy82nd at gmail.com
Sun Mar 8 18:34:09 CET 2009


Hey all,
I am trying to use the survreg function in R to estimate the mean and
standard deviation to come up with the MLE of alpha and lambda for the
weibull distribution.  I am doing the following:
times<-c(10,13,18,19,23,30,36,38,54,56,59,75,93,97,104,107,107,107)
censor<-c(1,0,0,1,0,1,1,0,0,0,1,1,1,1,0,1,0,0)
survreg(Surv(times,censor),dist='weibull')
and I get the following error:
> survreg(Surv(times,censor),dist='weibull')
Error in x$terms : $ operator is invalid for atomic vectors

I am fairly new to R and don't understand what I am doing wrong.  Any help
would be great.
-- 
View this message in context: http://www.nabble.com/survreg-help-in-R-tp22400405p22400405.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list