get_ic_onperiod: Compute confidence intervals from the bootstrap samples

Description Usage Arguments Value Examples

Description

get_ic_onperiod Compute the confidences intervals for each parameters of the bootstrap samples and at each time. Compute the confidences intervals at confidence level ci_p for each parameters of the bootstrap samples and at each time. By default, it computes 90 bootstrap estimates.

Usage

1
get_ic_onperiod(b_onperiod, method_name = NULL, ci_p = 0.95, ...)

Arguments

b_onperiod

array containing the estimates from the bootstrap samples.

method_name

adds a columns method to the results with value given by method_name

ci_p

the level of confidence

...

additional parameters for the aggregate function use to compute the bootstrap confidence intervales array

Value

returns a data.frame with columns, method, param, IC_inf, Estim (best estimate), IC_sup .

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)
# To be done

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