What steps will reproduce the problem?
1. Fit GPD with
phat = fitgenpar(data,options)
2. Calculation of CI by [x,xlo,xup] = invgenpar(F,phat,options)
What is the expected output? What do you see instead?
I want to calculate return levels and the corresponding CI bounds.
First, I do a GPD fit with phat = fitgenpar(data,options).
that gives me:
1. the array with gpd-distribution phat.params
2. the upper and lower CI phat.upperbound and phat.lowerbound
Now, I calculate the return level for Tr (first approach):
xr = invgenpar(1/(lambda*Tr), phat.params(1), phat.params(2), phat.params(3), 'lowertail',false);
The CI bounds are:
xru = invgenpar(1/(lambda*Tr), phat.upperbound(1), phat.upperbound(2), phat.upperbound(3), 'lowertail',false);
xru = invgenpar(1/(lambda*Tr), phat.lowerbound(1), phat.lowerbound(2), phat.lowerbound(3), 'lowertail',false);
The same could be done (if I understand right) with (second approach):
[xr,xrl,xru] = invgenpar(1/(lambda*Tr, phat, 'lowertail',false)
Now, as expected, the values for xr are the same in the first and in the second approach. But, the values xru and xrl (CI bounds) differ. The second appoach produces very wide bands.
How comes? To me, it seems that the first approach is correct.
What version of the product are you using? On what operating system?
Newest WAFO 2.5 on MATLAB R2012a on Win7.