Learn R Programming

SpatialVx (version 1.0-2)

abserrloss: Loss functions for 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, ...)

Value

numeric m by 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).

Arguments

x,y

m by 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 lossdiff). For corrskill, these are optional arguments to sd. For distmaploss, these are optional arguments to the distmap function from pacakge spatstat.

Author

Eric Gilleland

Details

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

The distance map loss function does not zero-out well as the other loss functions do. Therefore, zero.out should be FALSE in the call to lossdiff. Further, as pointed out in Gilleland (2013), the distance map loss function can easily be hedged by having a lot of correct negatives. The image warp loss function is probably better for this purpose if, e.g., there are numerous zero-valued grid points in all fields.

References

Gilleland, E. (2013) Testing competing precipitation forecasts accurately and efficiently: The spatial prediction comparison test. Mon. Wea. Rev., 141, (1), 340--355.

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

See Also

lossdiff, vgram.matrix, vgram

Examples

Run this code
# See help file for lossdiff for examples.

Run the code above in your browser using DataLab