% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RMSSS.R
\name{RMSSS}
\alias{.RMSSS}
\alias{RMSSS}
\title{Computes Root Mean Square Skill Score}
\usage{
RMSSS(exp, obs, sdate_dim = "sdate", memb_dim = "member", pval = TRUE)

.RMSSS(exp, obs, pval = TRUE)
}
\arguments{
\item{exp}{A named numeric array of experimental data which contains at least two
dimensions for memb_dim and sdate_dim.}

\item{obs}{A named numeric array of observational data which contains at least two
dimensions for memb_dim and sdate_dim. The dimensions should be the same 
as paramter 'exp' except the length of 'memb_dim' dimension. The order of  
dimension can be different.}

\item{sdate_dim}{A character string indicating the name of dimension along which the 
RMSSS are computed. The default value is 'sdate'.}

\item{memb_dim}{A character string indicating the name of member (nobs/nexp) 
dimension. The default value is 'member'.}

\item{pval}{A logical value indicating whether to compute or not the p-value 
of the test Ho: RMSSS = 0. If pval = TRUE, the insignificant RMSSS will 
return NA. Set TRUE as default.}
}
\value{
An array with dimensions:\cr
 c(n_exp, n_obs, stats, all other dimensions of exp except sdate_dim).\cr
 If \code{pval = FALSE}, the length of the 3rd dimension 'stats' is 1, 
 the RMSSS; if \code{pval = TRUE}, the length is 2, the RMSSS and the 
 corresponding p-value.
}
\description{
Computes the root mean square error skill score between an array of 
forecasts 'exp' and an array of observations 'obs'. The two array should 
have the same dimensions except along memb_dim, where the length can be 
different, with the number of experiments/models for exp (nexp) and 
the number of obserational datasets for obs (nobs).\cr
RMSSS computes the Root Mean Square Skill Score of each jexp in 1:nexp 
against each jobs in 1:nobs which gives nexp x nobs RMSSS for each other 
grid point of the matrix (each latitude/longitude/level/leadtime).\cr
The RMSSS are computed along the sdate_dim dimension which should correspond
to the startdate dimension.\cr
.RMSSS provides the same functionality but taking a matrix of ensemble 
members as input (exp).
}
\examples{
set.seed(1)
exp <- array(rnorm(15), dim = c(dat = 1, time = 3, member = 5))
set.seed(2)
obs <- array(rnorm(6), dim = c(time = 3, member = 2, dat = 1))
res <- RMSSS(exp, obs, sdate_dim = 'time')

}
\author{
History:\cr
0.1  -  2012-04  (V. Guemas, \email{vguemas@bsc.es})  -  Original code\cr
1.0  -  2013-09  (N. Manubens, \email{nicolau.manubens@bsc.es})  -  Formatting to R CRAN\cr
1.1  -  2017-02  (A. Hunter, \email{alasdair.hunter@bsc.es})  -  Adapted to veriApply()
3.0  -  2019-12  (A. Ho, \email{an.ho@bsc.es})  -  Adapted to multiApply
}
\keyword{datagen}

