Use the survreg function. There are many different ways to parameterize a Weibull. The survreg function imbeds it a general location-scale familiy, which is a different parameterization than the rweibull function. > y <- rweibull(1000, shape=2, scale=5) > survreg(Surv(y)~1, dist="weibull")
Coefficients: (Intercept) 1.592543 Scale= 0.5096278 Loglik(model)= -2201.9 Loglik(intercept only)= -2201.9 ---- survreg's scale = 1/(rweibull shape) survreg's intercept = log(rweibull scale) For the log-likelihood all parameterizations lead to the same value. There is not "right" or "wrong" parameterization for a Weibull (IMHO), but there certainly is a lot of room for confusion. This comes up enough that I have just added it as an example in the survreg help page, which will migrate to the general R distribution in due course. 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.