rdistributionfitdistrplus

`fitdist` error message: the function mle failed to estimate the parameters, with the error code 1


I am trying to use the fitdist function from the fitdistrplus package to fit my data to Burr distribution.

library(fitdistrplus)     
library(actuar)

fit_bur <- fitdist(data=c(6,8,6,3,3,6,6,6,7,8,4,5,1,4,4,0,0,0,0,7,5,6,6,5,3,4,8,6,5,6,3,6,5,4,3,9,4,2,4), method = "mle",distr="burr", 
               start = list(shape1 = 0.3, shape2 = 1, rate = 1))

Then an error occurs: enter image description here

Inspired by the question posted here, I notice that the error may be that my data contain 0 values, so I add 0.1 to all 0 values.

fit_bur <- fitdist(data=c(6,8,6,3,3,6,6,6,7,8,4,5,1,4,4,0.1,0.1,0.1,0.1,7,5,6,6,5,3,4,8,6,5,6,3,6,5,4,3,9,4,2,4),  method = "mle",distr="burr", 
               start = list(shape1 = 0.3, shape2 = 1, rate = 1))

However, a different error occurs: enter image description here

Is there any solution to this problem? Thanks for any help.


Solution

  • Try this code even though it will give you NA for standard errors:

    data_you <- c(6,8,6,3,3,6,6,6,7,8,4,5,1,4,4,0.1,0.1,0.1,0.1,7,5,6,6,5,3,4,8,6,5,6,3,6,5,4,3,9,4,2,4)
    
    fit_bur <- fitdist(data_you,"burr", start = list(shape1 = 0.3, shape2 = 1, rate = 1),lower=c(0,0))