Fitting a 3 parameter Weibull distribution

Viewed 15868

I have been doing some data analysis in R and I am trying to figure out how to fit my data to a 3 parameter Weibull distribution. I found how to do it with a 2 parameter Weibull but have come up short in finding how to do it with a 3 parameter.

Here is how I fit the data using the fitdistr function from the MASS package:

y <- fitdistr(x[[6]], 'weibull')

x[[6]] is a subset of my data and y is where I am storing the result of the fitting.

2 Answers

An alternative: package "lmom". The estimative by L-moments technique

library(lmom)
thres <- 60
x <- rweibull(200, 3, 1) + thres
moments = samlmu(x, sort.data = TRUE)
log.moments <- samlmu( log(x), sort.data = TRUE )
weibull_3parml <- pelwei(moments)
weibull_3parml
zeta      beta     delta 
59.993075  1.015128  3.246453  

But I don´t know how to do some Goodness-of-fit statistics in this package or in the solution above. Others packages you can do Goodness-of-fit statistics easily. Anyway, you can use alternatives like: ks.test or chisq.test

Related