% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Bias.R
\name{Bias}
\alias{Bias}
\title{Compute the Mean Bias}
\usage{
Bias(
  exp,
  obs,
  time_dim = "sdate",
  memb_dim = NULL,
  na.rm = FALSE,
  ncores = NULL
)
}
\arguments{
\item{exp}{A named numerical array of the forecast with at least time 
dimension.}

\item{obs}{A named numerical array of the observation with at least time 
dimension. The dimensions must be the same as 'exp' except 'memb_dim' and 
'dat_dim'.}

\item{time_dim}{A character string indicating the name of the time dimension.
The default value is 'sdate'.}

\item{memb_dim}{A character string indicating the name of the member dimension
to compute the ensemble mean; it should be set to NULL if the parameter 'exp'
is already the ensemble mean. The default value is NULL.}

\item{na.rm}{A logical value indicating if NAs should be removed (TRUE) or
kept (FALSE) for computation. The default value is FALSE.}

\item{ncores}{An integer indicating the number of cores to use for parallel 
computation. The default value is NULL.}
}
\value{
A numerical array of bias with dimensions of 'exp' except 'time_dim' and 
'memb_dim' dimensions.
}
\description{
The Mean Bias or Mean Error (Wilks, 2011) is defined as the mean difference 
between the ensemble mean forecast and the observations. It is a deterministic
metric. Positive values indicate that the forecasts are on average too high
and negative values indicate that the forecasts are on average too low.
However, it gives no information about the typical magnitude of individual 
forecast errors.
}
\examples{
exp <- array(rnorm(1000), dim = c(dat = 1, lat = 3, lon = 5, member = 10, year = 50))
obs <- array(rnorm(1000), dim = c(dat = 1, lat = 3, lon = 5, year = 50))
bias <- Bias(exp = exp, obs = obs, time_dim = 'year', memb_dim = 'member', na.rm = FALSE, ncores = 1)

}
\references{
Wilks, 2011; https://doi.org/10.1016/B978-0-12-385022-5.00008-7
}
