MATLAB Answers

how to use MLE function to estimate parameters using cdf and pdf

3 views (last 30 days)
shalini sharma
shalini sharma on 18 Jan 2021
Answered: Puru Kathuria on 2 May 2021
fault data
dat =[6;10;17;20;29;34;38;41;50;55;69;98;102;108;117;118;163;177;186;192;201;204;209;232;235;240;248;262;284;289];
cdf= x*(1-exp(-y*289))+a*^b + z*289
pdf= x*y*exp(-y*dat)+a*b*dat.^(b-1)+z;
anyone can please help me in using mle for parameters x,y,z,a,b estimation.i tried but its giving error every time.
thanks in advance

Answers (1)

Puru Kathuria
Puru Kathuria on 2 May 2021
Below is the mentioned example that illustrates the working of mle (maximux likelihood estimates), here mle returns parameter estimates for a custom distribution specified by the probability density function pdf and custom cumulative distribution function cdf.
%load sample data which contains variables "Age, Censored, Sex, Smoker,
%Weight, ReadmissionTime" that have information about 100 patients.
%The data includes ReadmissionTime, which has readmission times for 100 patients.
% The column vector Censored has the censorship information for each patient,
% where 1 indicates a censored observation, and 0 indicates the exact readmission
% time is observed. This is simulated data.
%Define a custom probability density and cumulative distribution function.
custpdf = @(data,lambda) lambda*exp(-lambda*data);
custcdf = @(data,lambda) 1-exp(-lambda*data);
%Estimate the parameter, lambda, of the custom distribution for the censored sample data.
phat = mle(ReadmissionTime,'pdf',custpdf,'cdf',custcdf,'start',0.05,'Censoring',Censored)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!