independence_test: Calculate the correlation between each unique pair of...

Description Usage Arguments Value Warning

View source: R/independence_testing.R

Description

Calculate the correlation between each unique pair of ensemble members.

Usage

1
2
3
4
5
6
7
8
9
independence_test(
  ensemble,
  n_ensembles = 25,
  n_lds = 5,
  detrend = TRUE,
  var_name = "tprate",
  ens_name = "number",
  ld_name = "leadtime"
)

Arguments

ensemble

The UNSEEN ensemble. This function expects a dataframe with the columns variable (precipitation), ensemble (number), leadtime. It expects that the first member is 0 (as used in CDS) and that the first lead time is 2 (first month shows dependence and is therefore removed). See for example the SEAS5_UK dataset using '?SEAS5_UK'

n_ensembles

The number of ensemble members (not including pooled leadtimes) in the UNSEEN ensemble. Defaults to 25.

n_lds

The number of leadtimes in the UNSEEN ensemble. Defaults to 5.

detrend

Should the trend in the data be removed? By default, the data is detrended by differencing.

var_name

The column name containing the variable to be analyzed. Defaults to "tprate".

ens_name

The column name containing the ensemble members. Defaults to "number".

ld_name

The column name containing the leadtimes. Defaults to "leadtime".

Value

A plot showing the boxplot of the pairwise correlations for each leadtime. See Kelder et al. 2020.

Warning

The confidence intervals are based on a bootstrap test with n_ensembles = 25. These are now pre-computed and therefore will not give the right CI bounds for different ensemble sizes. The bootstrapping test is included in the documentation in data_raw, but might be included in the future as a function of n_ensembles and n_lds.


timokelder/UNSEEN documentation built on June 1, 2021, 2:30 a.m.