I need help,
the codes below estimates the weibull parameters with complete failure, my 
question is how do i change the state to include
some censoring (may be right, type-I or type-II) to generate and estimate the 
parameters.
thank you

x=rweibull(10,2,2)
library(survival)
d<-data.frame(ob=c(x),state=1)
s <- Surv(d$ob,d$state)
sr <- survreg(s~1,dist="weibull")
print(paste("beta =",1/sr$scale))
print(paste("eta =",exp(sr$coefficients[1])))

or


library(MASS)
set.seed(123)
m <- replicate(1000, coef(fitdistr(rweibull(50, 0.8, 2), "weibull")))
summary(t(m))

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to