Use fitdistrplus package to fit an exponential distribution with error code 100

481 Views Asked by At

I'm fitting an Exponential distribution using Fitdistcens function from distrplus package. my dataset contain complete data and suspension data. however, "exp" give me an error message below:

<simpleError in optim(par = vstart, fn = fnobjcens, fix.arg = fix.arg, 
gr = gradient, 
rcens = rcens, lcens = lcens, icens = icens, ncens = ncens, 
ddistnam = ddistname, pdistnam = pdistname, hessian = TRUE, 
method = meth, lower = lower, upper = upper, ...): non-finite finite- 
difference value [1]>

Error in fitdistcens(dataset1, "exp") : 
  the function mle failed to estimate the parameters, 
        with the error code 100

here are my code:

dataset1<-dataset[1:2]

library(fitdistrplus)

fitexp <- fitdistcens(dataset1,"exp")

can somebody help me resolve this error code? i can share my dataset.

0

There are 0 best solutions below