# MLE parameter estimation error in R for Exponential Distribution

#### mohsenhs82

##### New Member
I am doing a statistical modeling and doing right and left censoring. I have difficulty to fit my data to exponential distribution as I am getting the following error in R:

the function mle failed to estimate the parameters, with the error code 100

I do not want to shift or rescale my data as I need to do further analysis on my data. I tried to use lower to limit the starting point of Optim as a temporary solution. I have two issues that I can not use lower as a permanent solution:

1. I have thousand of datasets and I can not do this for each data set individually.

2. Might not be very accurate.

This is one of my dataset and the code that I am using and appreciate any help.

Code:
    library(fitdistrplus)

left=c(NA,NA,NA,NA,NA,NA,163.0,181.0,203.0,228.0,275.0,321.0,353.0,378.0,470.0,603.0,640.0,717.0,724.0,783.0,920.0,930.0,1027.0,1033.0,1098.0,1184.0,1212.0,1512.0,1530.0,1754.0,2114.0,2305.0,2961.0,3288.0,3309.0,3332.4,3332.4)

right=c(60,60,60,60,60,60,163,181,203,228,275,321,353,378,470,603,640,717,724,783,920,930,1027,1033,1098,1184,1212,1512,1530,1754,2114,2305,2961,3288,3309,NA,NA)

datar=data.frame(left=left,right=right)
fit=fitdistcens( datar,'exp') # This one returns error as I explanied above
fit=fitdistcens( datar,'exp',lower=0.0112)
I really appreciate any kind of support.

Many thanks