Plot the Weibull Distribution Hazard Function
2 ビュー (過去 30 日間)
古いコメントを表示
Dear Sirs, I hope you are well. I have set of data in Excel and I want to plot the Weibull distribution function. In the following link, we have an example which is available online. https://www.mathworks.com/examples/statistics/mw/stats-ex39027752-plot-the-weibull-distribution-hazard-function As you can see here the code is: t = 0:0.1:4.5; h1 = exppdf(t,0.8862)./(1-expcdf(t,0.8862)); h2 = wblpdf(t,1,2)./(1-wblcdf(t,1,2)); plot(t,h1,'--',t,h2,'-') My question is about the number 0.8862 in the exponential distribution. How can it be calculated for a set of data to put it in the code? I think this number in h1 is teta, 1 in h2 is alpha and 2 is beta in weibull distribution. I can import the data from excell to matlab instead of t in this code, but I want a help if someone has experience in plotting hazard function for the set of data. Thank you so much for your help and consideration.
0 件のコメント
回答 (1 件)
Star Strider
2018 年 5 月 9 日
According to the documentation for the exppdf (link) function, the second parameter (here 0.8862) is the mean of the data used to calculate it. See the documentation for the Exponential Distribution (link) for details.
2 件のコメント
Star Strider
2018 年 5 月 9 日
As I understand it, both. Note that ‘mu’ is the mean survival time, since that is what the exponential distribution is describing.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!