Description Usage Arguments Details Value Examples
View source: R/smallfar_para_sthao.R
confint.boot_farrfit
returns an matrix that contains the confidence interval
for the far computed empirically from the bootstrap estimates of the far
for different return periods rp
1 2 3 |
object |
an object with the class |
parm |
a vector of return levels for which to compute the confidence interval for the far.
The return levels have to be selected from the one present in |
level |
a numerical value between 0 and 1 corresponding to the confidence level of the confidence intervals. |
... |
not used. |
This function returns a two-column matrix that contains the confidence intervals for the far computed empirically from the bootstrap estimates of the far.
A two-column matrix that contains the confidence interval
for the far computed empirically from the bootstrap estimates of the far.
The first colum is for the lower bound of the confidence interval and the second one
for the upper bound. Each line of the matrix represents the condidence interval for a
different return period rp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | library(evd)
muF <- 1; xiF <- .15; sigmaF <- 1.412538 # cst^(-xiF) # .05^(-xi1);
# asymptotic limit for the far in this case with a Frechet distributiom
boundFrechet <- frechet_lim(sigma = sigmaF, xi = xiF)
# sample size
size <- 100
# level=.9
set.seed(4)
z = rgev(size, loc = (sigmaF), scale = xiF * sigmaF, shape = xiF)
x = rgev(length(z), loc=(1), scale = xiF, shape=xiF)
rp = seq(from = 2, to = 30, length = 200)
# Resampling bootstrap for estimation of far assuming an exponential distribution for theta
theta_boot.exp <- boot_theta_fit.wexp(x = x, z = z, B = 10)
# Estimate the far from the bootstrap samples of theta
boot_farr.exp <- boot_farr_fit.wexp(theta_boot = theta_boot.exp$theta_boot , rp = rp)
confint(boot_farr.exp)
print(boot_farr.exp)
ylim <- range(boundFrechet, boot_farr.exp)
plot(boot_farr.exp, ylim = ylim, main = "boot far exponential")
# Theoretical for in this case (Z = sigmaF * X with X ~ Frechet)
lines(rp, frechet_farr(r = rp, sigma = sigmaF, xi = xiF), col = "red", lty = 2)
abline(h = boundFrechet, col = "red", lty = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.