% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CST_MultivarRMSE.R
\name{CST_MultivarRMSE}
\alias{CST_MultivarRMSE}
\title{Multivariate Root Mean Square Error (RMSE)}
\usage{
CST_MultivarRMSE(data, weight = NULL)
}
\arguments{
\item{data}{a list of s2dverification objects (lists) as output by the \code{Load} function from the s2dverification package, one for each variable.}

\item{weight}{(optional) a vector of weight values to assign to each variable. If no weights are defined, a value of 1 is assigned to every variable.}
}
\value{
\code{$mvrmse} {An array with dimensions: c(number of exp, number of obs, 1 (the multivariate RMSE value), number of lat, number of lon)}
}
\description{
This function calculates the RMSE from multiple variables, as the mean of each variable's RMSE scaled by its observed standard deviation. Variables can be weighted based on their relative importance (defined by the user).
}
\examples{
# Creation of sample s2dverification objects. These are not complete
# s2dverification objects though. The Load function returns complete objects.

# Example with 2 variables
mod1 <- 1 : (1 * 3 * 4 * 5 * 6 * 7)
mod2 <- 1 : (1 * 3 * 4 * 5 * 6 * 7)
dim(mod1) <- c(dataset = 1, member = 3, sdate = 4, ftime = 5, lat = 6, lon = 7)
dim(mod2) <- c(dataset = 1, member = 3, sdate = 4, ftime = 5, lat = 6, lon = 7)
obs1 <- 1 : (1 * 1 * 4 * 5 * 6 * 7)
obs2 <- 1 : (1 * 1 * 4 * 5 * 6 * 7)
dim(obs1) <- c(dataset = 1, member = 1, sdate = 4, ftime = 5, lat = 6, lon = 7)
dim(obs2) <- c(dataset = 1, member = 1, sdate = 4, ftime = 5, lat = 6, lon = 7)
lon <- seq(0, 25, 5)
lat <- seq(0, 30, 5)
data1 <- list(mod = mod1, obs = obs1, lat = lat, lon = lon)
data2 <- list(mod = mod2, obs = obs2, lat = lat, lon = lon)
data <- list(data1, data2)
weight <- c(1, 2)
a <- CST_MultivarRMSE(data, weight)
str(a)
}
\author{
Deborah Verfaillie, \email{deborah.verfaillie@bsc.es}
}
