compute_far_simple.default: function to compute the FAR

Description Usage Arguments Examples

Description

compute_far_simple.default Function to compute the FAR from annual time-series

Usage

1
2
compute_far_simple.default(mdata, y = "y", x = "x", time = "time",
  xp = 1.6, R = 3, stat_model = gauss_fit, ci_p = 0.9, ...)

Arguments

mdata,

a data.frame containing the variables whose names are given by x, y and time

y,

the name of variable that will be used as the variable of interest y

x,

the name of variable that will be used as the covariate x

time,

the name of variable that will be used as the as the time variable

xp,

the threshold used to define the FAR

R,

the number of bootstrap samples

stat_model

the statistical model to explain y in function of x, either gauss_fit, gev_fit, or gpd_fit from the FARg package

ci_p

the level of the confidence intervals

...

additional arguments if required by the stat_model function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(FARg)
model <- "cnrm"
#load data from the package
data(list=model)
# formating data, e.g passing from temperature to anomalie, keep only hist
# and rcp runs
mdata <- format_data(get(model))
if(model != "obs") mdata <- select_continuous_run(mdata)
ans <- compute_far_simple.default(mdata,
 y="eur_tas", x="gbl_tas", time="year",
  xp=1.6, stat_model=gauss_fit, ci_p=0.9)

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