I'm trying to fit a numeric vector with the fitdist() function (included in fitdistrplus package) to several distributions: weibull 2-P, weibull 3-P, gamma, lognormal, exponential, gumbel, normal, loglogistic, logistic, and generalized lambda.
Some of them are included in the same package that 'fitdist()', others are included in different packages, and I create gumbel distribution. I have no problem with any of them, only with the GLD. I've tried all the methods of the fitdist function (mle, mme...), and the packages "gld" and "GLDEX" to create the distribution function.
fitdist(example$`TTF MIN`, "gl", start=list(12139.06, 0.000434674, 0.2, -1.5), method="mle", control=list(trace=1, REPORT=1))
Error in fitdist(example$`TTF MIN`, "gl", start = list(12139.06, 0.000434674, :
the function mle failed to estimate the parameters,
with the error code 100
And...
memp <- function(x, order) mean(x^order)
fgl <- fitdist(example$`TTF MIN`, "gl", method="mme",order=c(1, 2, 3, 4), memp="memp", start=c(10, 10), lower=1, upper=Inf)
Error in mmedist(data, distname, start = start, fix.arg = fix.arg, ...) :
wrong dimension for the moment order to match
Data basic statistics:
min(example$`TTF MIN`)
[1] 1338.149
max(example$`TTF MIN`)
[1] 27485.42
median(example$`TTF MIN`)
[1] 12555.87
mean(example$`TTF MIN`)
[1] 13983.5
sd(example$`TTF MIN`)
[1] 4220.227
skewness(example$`TTF MIN`)
[1] 0.7572039
kurtosis(example$`TTF MIN`)
[1] -0.1358661
quantile(example$`TTF MIN`, probs = c(0.25, 0.5, 0.75, 1))
25% 50% 75% 100%
11006.06 12555.87 17037.58 27485.42