How do I fix the following error: Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,: 'start' should not have NA or NaN values

Viewed 1478

I want to fit a variable on different distributions (gamma, weibull, exp, etc.) However, I continuously get the following error:

Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg, : 'start' should not have NA or NaN values.

However, my datafile does not consists of any errors.

My database is called "dts" and the variable I want to check the distribution is "interarrival"

fw <- fitdist(dts$interarrival, "weibull")

I also tried this:

fitdist(c(na.exclude(dts$interarrival)), "weibull")

but then i receive the following error: Error in fitdist(c(na.exclude(dts$interarrival)), "gamma") : the function mle failed to estimate the parameters, with the error code 100

Can anyone help me? :)

1 Answers

Sorry, I know this is a bit late to be of use but I have recently encountered the same problem; hence in trying to resolve it I came across this post.

For me, the issue was that I had people in my data that had a length of stay of 0 days (ie left=0, and right=0). When I filtered these people out the error went away.

Related