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

조회 수: 22(최근 30일)
shalini sharma
shalini sharma 2021년 1월 18일
답변: Puru Kathuria 2021년 5월 2일
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

답변(1개)

Puru Kathuria
Puru Kathuria 2021년 5월 2일
Hi,
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.
load('readmissiontimes.mat');
%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!

Translated by