On Mar 8, 2009, at 1:34 PM, murphy82nd wrote:
>
> 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.
>
David Winsemius, MD
Heritage Laboratories
West Hartford, CT