Learn R Programming

verification (version 1.42)

multi.cont: Multiple Contingency Table Statistics

Description

Provides a variety of statistics for a data summarized in a contingency table. This will work for a 2 by 2 table, but is more useful for tables of greater dimensions.

Usage

multi.cont(DAT, baseline = NULL)

Value

pc

Percent correct - events along the diagonal.

bias

Bias

ts

Threat score a.k.a. Critical success index (CSI)

hss

Heidke Skill Score

pss

Peirce Skill Score

gs

Gerrity Score

pc2

Percent correct by category (vector)

h

Hit Rate by category (vector)

false.alarm.ratio

False alarm ratio by category (vector)

Arguments

DAT

A contingency table in the form of a matrix. It is assumed that columns represent observation, rows represent forecasts.

baseline

A vector indicating the baseline probabilities of each category. By default, it the baseline or naive forecasts is based on teh

Author

Matt Pocernich

References

Gerrity, J.P. Jr (1992). A note on Gandin and Murphy's equitable skill score. Mon. Weather Rev., 120, 2707-2712.

Jolliffe, I.T. and D.B. Stephenson (2003). Forecast verification: a practitioner's guide in atmospheric science. John Wiley and Sons. See chapter 4 concerning categorical events, written by R. E. Livezey.

See Also

binary.table

Examples

Run this code
DAT<- matrix(c(7,4,4,14,9,8,14,16,24), nrow = 3) # from p. 80 - Jolliffe
multi.cont(DAT)

DAT<- matrix(c(3,8,7,8,13,14,4,18,25), ncol = 3) ## Jolliffe JJA
multi.cont(DAT)

DAT<- matrix(c(50,47,54,91,2364,205,71,170,3288), ncol = 3) # Wilks p. 245
multi.cont(DAT)

DAT<- matrix(c(28, 23, 72, 2680 ), ncol = 2) ## Finley
multi.cont(DAT)
## Finnish clouds
DAT<- matrix(c(65, 10, 21, 29,17,48, 18, 10, 128), nrow = 3, ncol = 3, byrow = TRUE)
multi.cont(DAT)  
 ### alternatively, the verify function and summary can be used.
 
 mod <- verify(DAT, frcst.type = "cat", obs.type = "cat")
 summary(mod)
 
 

Run the code above in your browser using DataLab