BrierScoreDecomposition(p, y, calibration=list(method="bin", bins=10),
probs=NA, n.boot=0)
Br = E[(y-p)^2]
Define the calibration function F and the climatological probability C as
F(p) = P(y=1|p), and C = P(y=1).
Then the decomposition into the three nonnegative terms REL, RES and UNC is written as
Br = REL - RES + UNC
where
REL = E[(p - F(p))^2] RES = E[(F(p) - C)^2] UNC = C*(1-C)
The calibration function F(p) must be estimated from the data `y` and `p`, for which the following methods are implemented:
"bin": The standard method of dividing the unit interval into a number of bins and estimating F(p) by `NumberOf(y==1 and p in bin i) / NumberOf(p in bin i)`. If `calibration=list(method="bin",bins=10)` (the default), the unit interval is divided into 10 equidistant bins. The argument `bins` can also be a vector of break points of the desired bins, such as `calibration=list(method=bin, bins=c(0, 0.2, 0.6, 1)`. For the latter, the first and last element of `bins` have to be 0 and 1, respectively.
"logistic": The calibration function is estimated by fitting a logistic regression model to the binary verifications `y`, using `p` as the predictor.
J. Broecker. Reliability, sufficiency, and the decomposition of proper scores. Q. J. Roy. Met. Soc., 135(643):1512--1519, 2009. doi: 10.1002/qj.456.
0595:anvpot> # Example:
p <- rbeta(n=100, shape1=1, shape2=3)
y <- rbinom(n=100, size=1, prob=p^0.9)
BrierScoreDecomposition(p, y, calibration=list(method="bin", bins=5))
Run the code above in your browser using DataLab