how to use MLE function to estimate parameters using cdf and pdf
9 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Probability Distributions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!