confint.boot_FARfit: Compute confidence intervals from bootstrap samples of the...

Description Usage Arguments Details Value Examples

View source: R/bigFAR_nonpara_sthao.R

Description

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

Usage

1
2
3
## S3 method for class 'boot_FARfit'
confint(object, parm = dimnames(object)$u,
  level = 0.95, ...)

Arguments

object

an object with the class boot_FARfit. It is a matrix containing the bootstrap samples of the far. Each line of this matrix represent the estimated far for different thresholds u and colum corresponds to a differents bootstrap samples of the data.

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 rownames(object).

level

a numerical value between 0 and 1 corresponding to the confidence level of the confidence intervals.

...

not used.

Details

This function returns a two-column matrix that contains the confidence intervals for the FAR computed empirically from the bootstrap estimates of the FAR.

Value

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

Examples

 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)

thaos/farr documentation built on May 28, 2019, 8:42 a.m.