SprErr {s2dv} | R Documentation |
Compute the ratio between the ensemble spread and RMSE
Description
Compute the ratio between the spread of the members around the ensemble mean in experimental data and the RMSE between the ensemble mean of experimental and observational data. The p-value and/or the statistical significance is provided by a two-sided Fisher's test.
Usage
SprErr(
exp,
obs,
dat_dim = NULL,
memb_dim = "member",
time_dim = "sdate",
pval = TRUE,
sign = FALSE,
alpha = 0.05,
na.rm = FALSE,
ncores = NULL
)
Arguments
exp |
A named numeric array of experimental data with at least two dimensions 'memb_dim' and 'time_dim'. |
obs |
A named numeric array of observational data with at least two dimensions 'memb_dim' and 'time_dim'. It should have the same dimensions as parameter 'exp' except along 'dat_dim' and 'memb_dim'. |
dat_dim |
A character string indicating the name of dataset (nobs/nexp) dimension. The default value is NULL (no dataset). |
memb_dim |
A character string indicating the name of the member dimension. It must be one dimension in 'exp' and 'obs'. The default value is 'member'. |
time_dim |
A character string indicating the name of dimension along which the ratio is computed. The default value is 'sdate'. |
pval |
A logical value indicating whether to compute the p-value of the test Ho : SD/RMSE = 1 or not. The default value is TRUE. |
sign |
A logical value indicating whether to retrieve the statistical significance of the test Ho: ACC = 0 based on 'alpha'. The default value is FALSE. |
alpha |
A numeric indicating the significance level for the statistical significance test. The default value is 0.05. |
na.rm |
A logical value indicating whether to remove NA values. The default value is FALSE. |
ncores |
An integer indicating the number of cores to use for parallel computation. The default value is NULL. |
Value
A list of two arrays with dimensions c(nexp, nobs, the rest of
dimensions of 'exp' and 'obs' except memb_dim and time_dim), which nexp is
the length of dat_dim of 'exp' and nobs is the length of dat_dim of 'obs'.
If dat_dim is NULL, nexp and nobs are omitted.
$ratio |
The ratio of the ensemble spread and RMSE. |
$p_val |
The p-value of the two-sided Fisher's test with Ho: Spread/RMSE = 1. Only
present if |
Examples
exp <- array(rnorm(30), dim = c(lat = 2, sdate = 3, member = 5))
obs <- array(rnorm(30), dim = c(lat = 2, sdate = 3))
sprerr1 <- SprErr(exp, obs)
sprerr2 <- SprErr(exp, obs, pval = FALSE, sign = TRUE)
sprerr3 <- SprErr(exp, obs, pval = TRUE, sign = TRUE)