rmv: Root Mean Variance

View source: R/rmv.R

rmvR Documentation

Root Mean Variance

Description

This function calculates the Root Mean Variance (RMV) given samples of a predictive distribution.

Usage

rmv(x, na.action = na.omit)

Arguments

x

vector of variances or matrix of samples of a predictive distribution (see details)

na.action

function to handle the NA's. Default: na.omit.

Details

If x is provided as matrix, it should contain the the samples of a predictive distribution in each row. Consequently, the variances are calculated row-wise by its sample version. If x is provided as vector, it should contain the variances of a predictive distribution.

A lower RMV indicates a sharper forecast, subject to calibration.

Value

Vector of score value(s).

Author(s)

David Jobst

References

Gneiting, T. and Ranjan, R. (2013). Combining predictive distributions. Electronic Journal of Statistics, 7, 1747-1782.

Examples

# simulated data
n <- 30
m <- 50
x1 <- matrix(rnorm(n*m), ncol = m)
x2 <- apply(x1, 1, var)

# rmv calculation
rmv(x = x1)
rmv(x = x2)


jobstdavid/eppverification documentation built on May 13, 2024, 5:20 p.m.