boot_p: boot_p generic.

Description Usage Arguments Details Examples

View source: R/boot_far.R

Description

Compute the confidence intervales for the probability of exceeding xp at time t using resampling bootstrap.

Usage

1
2
3
4
5
boot_p(object, ...)

## Default S3 method:
boot_p(object, xp, t, ci_p = 0.95, use_init = TRUE,
  R = 250, ...)

Arguments

object

an object of class gauss_fit, gev_fit, gpd_fit or of class trans. If object is of class trans, the argument y_fit must be passed.

...

Arguments to be passed to methods,

xp

the threshold used to compute the probability of exeeding that threshold.

t

the time t to compute the probability of exeeding xp. If the time t0 is not present in dataset used for fitting the model, the closes time of the dataset is used.

ci_p

the confidence level of the confidence intervals (between 0 and 1).

use_init

whether to use the parameters fitted in object of class gauss_fit, gev_fit, or gpd_fit, to initialize the fir on the bootstrap sample.

R

the number of bootstrap samples.

Details

Resamplin bootstrap is done by drawing with replacement points (which are at least pairs of date and time serie value) to reconstruct a bootstrap time series. Thus, in the bootstraped sample, there might be dates with no points and dates with several points.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(tas)

ge_fit <- gev_fit(eur_tas, data=tas, mu_mod=~gbl_tas, sig_mod=~gbl_tas, time_var="year")
gp_fit <- gpd_fit(eur_tas, data=tas, mu_mod=~gbl_tas, sig_mod=~gbl_tas, time_var="year", qthreshold=0.9)
ga_fit <- gauss_fit(eur_tas, data=tas, mu_mod=~gbl_tas, sig_mod=~gbl_tas, time_var="year")

t1 <- 2003
t0 <- 1990
xp <- 1.6
b_gpd <- boot_p(gp_fit, xp, t0, ci_p=0.95, under_threshold=TRUE)
b_gev <- boot_p(ge_fit, xp, t0, ci_p=0.95)
b_gauss <- boot_p(ga_fit, xp, t0, ci_p=0.95)

thaos/FARg documentation built on May 25, 2019, 8:18 a.m.