compute_forall: Compute the FAR for all the models

Description Usage Arguments Value Examples

Description

compute_forall computes the FAR evolution for all models according to the compute_far function taken as an argument. if the argument p is provided, it also computes the evolution of the corresponding quantile.

Usage

1
2
3
compute_forall(compute_far, l_models = NULL, xp = 1.6, p = NULL,
  y = "eur_tas", x = "gbl_tas", time = "year", ci_p = 0.9,
  res_folder = deparse(substitute(compute_far)), ...)

Arguments

compute_far

a function used to compute the FAR

l_models

a character vectors giving the list of models for which the FAR needs to be computed. by default all models present in this packages are used

xp

the selected threshold used to define the FAR

p

the selected probability of exceedance to define the corresponding quantile

y

the name of the variable that will be used as y in the compute_far function

x

the name of the variable that will be used as the covariate x in the compute_far function

time

the name of the variable that will be used as the time variable in the compute_far function

ci_p

the level of the confidence intervals

res_folder

the folder where the results of compute_far for each model are saved as .rds. By default, creates a folder the name of which is the name of the function compute_far

...

additional parameters needed in the compute_far function if required

Value

return a dataframe with the confidence intervals for the FAR and all the other computed parameters (e.g, p and q) at each time

Examples

1
2
3
4
5
# compute the FAR for the CNRM and the IPSL GCMs using a  gam decomposition
# and a gaussian fit with only three bootstrap samples
ans <- compute_forall(compute_far.default, stat_model=gauss_fit, p=0.01, R=3)
# same with ebm decompositon and a gpd fit over the 90% quantil
ans <- compute_forall(compute_far.dx_ebm_fit, l_models=c("cnrm", "ipsl"), stat_model=gpd_fit, qthreshold =0.90, p=0.01, R=3)

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