Hello
I am trying to estimate the 3 parameters of a Weibull PDF on a series of positive values (n=934). My custom pdf is
custpdf=@(data,a,b,c) (a/b).*(((data-c)./b).^(a-1)).*(exp((-(data-c)./b).^(a)));
phat=mle(data,'pdf',custpdf,'start',[1 1 1]);
Error using mlecustom>llf_pdfcdf (line 440) The PDF function returned negative or zero values.
Error in fminsearch (line 200) fv(:,1) = 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 245) phat = mlecustom(data,varargin{:});
I tested also
phat=mle(data,'wblpdf',custpdf,'start',[1 1 1]);
But I get only two parameters
Vincent
Any idea about what is wrong ?
Best Answer