Learn R Programming

extremefit (version 1.0.2)

bootCI: Pointwise confidence intervals by bootstrap

Description

Pointwise quantiles and survival probabilities confidence intervals using bootstrap.

Usage

bootCI(X, weights = rep(1, length(X)), probs = 1:(length(X) -
  1)/length(X), xgrid = sort(X), B = 100, alpha = 0.05,
  type = "quantile", CritVal = 10, initprop = 1/10, gridlen = 100,
  r1 = 1/4, r2 = 1/20, plot = F)

Arguments

X

a numeric vector of data values.

weights

a numeric vector of weights.

probs

used if type = "quantile", a numeric vector of probabilities with values in \([0,1]\).

xgrid

used if type = "survival", a numeric vector with values in the domain of X.

B

an integer giving the number of bootstrap iterations.

alpha

the type 1 error of the bootstrap (1-\(alpha\))-confidence interval.

type

type is either "quantile" or "survival".

CritVal

a critical value associated to the kernel function given by CriticalValue. The default value is 10 corresponding to the rectangular kernel.

gridlen, initprop, r1, r2

parameters used in the function hill.adapt (see hill.adapt).

plot

If TRUE, the bootstrap confidence interval is plotted.

Value

LowBound

the lower bound of the bootstrap (1-\(alpha\))-confidence interval.

UppBound

the upper bound of the bootstrap (1-\(alpha\))-confidence interval of level.

Details

Generate B samples of \(X\) with replacement to estimate the quantiles of orders \(probs\) or the survival probability corresponding to \(xgrid\). Determine the bootstrap pointwise (1-\(alpha\))-confidence interval for the quantiles or the survival probabilities.

See Also

hill.adapt,CriticalValue,predict.hill.adapt

Examples

Run this code
# NOT RUN {
X <- abs(rcauchy(400))
hh <- hill.adapt(X)
probs <- probgrid(0.1, 0.999999, length = 100)
B <- 200
# }
# NOT RUN {
 #For computing time purpose
  bootCI(X, weights = rep(1, length(X)), probs = probs, B = B, plot = TRUE)
  xgrid <- sort(sample(X, 100))
  bootCI(X, weights = rep(1, length(X)), xgrid = xgrid, type = "survival", B = B, plot = TRUE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab