Description Usage Arguments Details Value Examples
View source: R/bigFAR_nonpara_sthao.R
confint.boot_FARfit
returns an matrix that contains the confidence interval
for the far computed empirically from the bootstrap estimates of the far
for different exceedance thresholds u
1 2 3 |
object |
an object with the class |
parm |
a vector of thresholds for which to compute the confidence interval for the FAR.
The thresholds 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 column 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 threshold u
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)
u = qgev(1 - (1 / rp),loc = muF, scale = xiF, shape = xiF)
# Resampling bootstrap for the empirical estimation of the FAR
boot_FAR.emp <- boot_FAR_fit.emp(x = x, z = z, u = u, B = 10)
print(boot_FAR.emp)
confint(boot_FAR.emp)
ylim <- range(boundFrechet, boot_FAR.emp)
plot(boot_FAR.emp, ylim = ylim, main = "boot FAR empirical")
# Theoretical FAR for in this case (Z = sigmaF * X with X ~ Frechet)
lines(rp, frechet_FAR(u = u, 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.