boot_far: boot_far generic.

Description Usage Arguments Details Examples

View source: R/boot_far.R

Description

Compute the confidence intervales for the FAR using resampling bootstrap.

Usage

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

## Default S3 method:
boot_far(object, xp, t0, t1, 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.

t0

the time t0 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.

t1

the time t1 to compute the probability of exeeding xp. If the time t1 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_far(gp_fit, xp, t0, t1, ci_p=0.95, under_threshold=TRUE)
b_gev <- boot_far(ge_fit, xp, t0, t1, ci_p=0.95)
b_gauss <- boot_far(ga_fit, xp, t0, t1, ci_p=0.95)

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