for a given dataset i need to calculate parameters value using mle where cdf = a*(1-exp(-b*A)) and pdf = a*b*exp(-b*A),if i use following code
A=[6 10 17 20 29 34 38 41 50 55 ];[phat,pci] = mle(A,'pdf',@(A,x,y) x*y*exp(-y*A),'start',[1,1])
i get
Error using mlecustom>llf_pdfcdf(line 440)The PDF function returned negativeor zero values.Error in fminsearch (line 330) x(:) = xe; fxe = funfcn(x,varargin{:});Error in mlecustom (line 184) fminsearch(llf,start,opts,uncensData,censData,uncensFreq,censFreq,fun1Args,fun2Args,checkFunVals,lb,ub);Error in mle (line 247) [phat, pci] = mlecustom(data,varargin{:});
I am not able to understand what is wrong and how to rectify it as i am new to matlab.Please help how sholud i evaluate parameters a and b using mle function in matlab.
Best Answer