Description Usage Arguments Value Examples
Adds a parameter to the the array containing the bootstrap results. The added parameters if computed as a function of the parameters amready presents. The function uses non-standard evaluation to compute the new parameters. For instance, the FAR could be computed from the probabilities p_all and p_nat.
1 |
b_onperiod |
array containing the estimates from the bootstrap samples. |
operation |
an expression telling how to compute the new parameter from the others parameters. |
name |
the name of the new parameters as it appears in the boootstrap array |
returns the bootstrap array with the additional row containg the new parameters computed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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)
# get bootstrap samples of p_all p_nat and p_ant
bp <- ans$allp
# compute the evolution of p_all relatively to its value in 1850
bp <- add_param(bp, operation=p_all/p_all[time==1850], name="p_all_rel")
# create the 0.95 confidence intervals data.frame
ic <- get_ic_onperiod(bp, ci=0.95)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.