How to perform extreme value distribution in Matlab?
6 ビュー (過去 30 日間)
古いコメントを表示
%Water level observations
WL=[ 6.79 6.89 6.38 5.67 6.91 7.66 6.41 6.04 6.41 5.55 6.93 5.67 6.69 6.51 6.32 7.33 6.43 6.52 6.13 6.72 6.7 7.78 6.18 5.41 6.94 6.51 6.02 5.94 6.08 ];
Now i want to apply gumble distribution for that data which will give me several return period values(50,100,150) along with the probability plot(confidence limit line should be visible on the plot). Gumbel distribution of same data gave 8.27 for 100 year return period with another software whereas matlab gives 8.54 for same return period.In that case i use the following coding,
WL= [ 6.79 6.89 6.38 5.67 6.91 7.66 6.41 6.04 6.41 5.55 6.93 5.67 6.69 6.51 6.32 7.33 6.43 6.52 6.13 6.72 6.7 7.78 6.18 5.41 6.94 6.51 6.02 5.94 6.08 ];
p = fitdist(-WL','ev')
p = extreme value distribution
mu = -6.19143
sigma = 0.512164
val100yr=-evinv(0.01,-6.19143,0.512164)
val100yr = 8.5475
Is there any error here? why this difference? pls help me out
0 件のコメント
採用された回答
José-Luis
2013 年 5 月 2 日
Hard to say without looking at the i) the formulas, ii) how the formulas are implemented in the code. It could be numerical precision, but it is very difficult to be sure without looking at the implementations. Another alternative is that you are not using the necessary precision when feeding data to evinv(). You could try:
evinv(0.01,mu,sigma)
instead of typing in numerical values, and if that solves the problem, then you should be aware that the value displayed in the screen is usually different from the internal representation (what is stored in memory).
What is "another sofware"?
3 件のコメント
José-Luis
2013 年 5 月 2 日
What has this got to do with your original question? If you have a new question, please ask another one and accept/ask for clarifications in your original question. Note that I have no idea what the different variables in your code are. That being said, copy/pasting from the documentation:
probplot(ax,fun,params) takes a function fun and a set of parameters, params, and adds fitted lines to the axes of an existing probability plot specified by ax. fun is a function handle to a cdf function, specified with @ (for example, @wblcdf). params is the set of parameters required to evaluate fun, and is specified as a cell array or vector. The function must accept a vector of X values as its first argument, then the optional parameters, and must return a vector of cdf values evaluated at X.
ci() are values needed to evaluate normcdf. Please read the documentation and feel free to ask more questions if it is still unclear.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!