measure.cm: Cramer von Misses

View source: R/measure.cm.R

measure.cmR Documentation

Cramer von Misses

Description

Function to compare the observed and predicted distribution using the Cramer von Misses index.

Usage

measure.cm(indexObs = NULL, indexPrd = NULL, obs = NULL, prd = NULL,
  dates, Nbins = 100, what = c("CvM", "pval", "KSdiff"), threshold = NULL)

Arguments

indexObs

index computed from the observations

indexPrd

index computed from the predictions

obs

A vector of observations

prd

A vector of predictions

dates

dates

Nbins

Number of bins used for discretization. Default to 100.

what

Measure to be returned. This can be the Cramer von Misses index ("CvM"), the p-value ("pvalue") of the test or the maximum absolute difference between the observed and predicted distributions ("KSdiff"). Default to "CvM".

threshold

Optional. Numeric value indicating the threshold above which to compute the measure. Mainly used for precipitation, tipically to use only the wet days in the analysis (i.e.: threshold = 1).

Value

A floating number with the measure indicated in what argument.

Author(s)

Ole Roessler ole.roessler@giub.unibe.ch, J. Bedia, D. San-Mart\'in, S. Herrera

Source

L. Sachs and J. Hedderich (2006). Angewandte Statistik. Springer.


SantanderMetGroup/R_VALUE documentation built on July 4, 2023, 4:27 a.m.