Function to apply a calibration to a matrix of ternary forecasts.
An object of class tverify, for example produced by
An n-by-3 matrix of ternary forecasts which will be calibrated according to the calibration function embedded in dat.
An n-by-3 array of calibrated ternary forecasts.
Jupp TE, Lowe R, Stephenson DB, Coelho CAS (2012) On the visualization, verification and recalibration of ternary probabilistic forecasts, Philosophical Transactions of the Royal Society, volume 370, pages 1100-1120.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# get football betting data data(foot) # get verification info for these data tv <- tverify(p=foot$p,o=foot$o) # get a linear calibration based on verification info lc <- tgetcal(tv) # consider an uncalibrated forecast p p <- cbind(0,0,1) # see where p is mapped by this calibration pcal <- tcalibrate(lc,cbind(0,0,1)) # plot the uncalibrated forecast tplot(p) # plot the calibrated forecast tplot(pcal,col="blue",newpage=FALSE,bg="transparent")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.