Learn R Programming

SpatialVx (version 0.1-2)

abserrloss: Loss functions for applying the spatial prediction comparison test (SPCT)

Description

Loss functions for applying the spatial prediction comparison test (SPCT) for competing forecasts.

Usage

abserrloss(x, y, ...)
corrskill(x, y, ...)
sqerrloss(x, y, ...)
distmaploss(x, y, threshold = 0, const = Inf, ...)

Arguments

x,y
m X n numeric matrices against which to calculate the loss (or skill) functions.
threshold
numeric giving the threshold over which (and including) binary fields are created from x and y in order to make a distance map.
const
numeric giving the constant beyond which the differences in distance maps between x and y are set to zero. If 'Inf' (default), then no cut-off is taken. The SPCT is probably not powerful for large values of const.
...
Not used by abserrloss or sqerrloss (there for consistency only, and in order to work with spatMLD). For corrskill, these are optional arguments to sd. For distmaploss, these

Value

  • numeric m X n matrices containing the value of the loss (or skill) function at each location i of the original set of locations (or grid of points).

Details

These are simple loss functions that can be used in conjunction with spatMLD to carry out the spatial prediction comparison test (SPCT) as introduced in Hering and Genton (2011); see also Gilleland (2012) in particular for details about the distance map loss function.

References

Gilleland, E., 2012: Testing competing precipitation forecasts accurately and efficiently: The spatial prediction comparison test. Submitted to Mon. Wea. Rev.

Hering, A. S. and M. G. Genton, 2011: Comparing spatial predictions. Technometrics 53, (4), 414 - 425.

See Also

spatMLD, vgram.matrix, vgram

Examples

Run this code
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x, y, ...) 
return(abs(x - y))

Run the code above in your browser using DataLab