bootCI {extremefit} | R Documentation |
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 |
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- |
type |
type is either "quantile" or "survival". |
CritVal |
a critical value associated to the kernel function given by |
gridlen , initprop , r1 , r2 |
parameters used in the function hill.adapt (see |
plot |
If |
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.
Value
LowBound |
the lower bound of the bootstrap (1- |
UppBound |
the upper bound of the bootstrap (1- |
See Also
hill.adapt
,CriticalValue
,predict.hill.adapt
Examples
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)
## End(Not run)