Function to apply a calibration to a matrix of ternary forecasts.
tcalibrate(tv, p)
Arguments
tv: An object of class tverify, for example produced by tgetcal.
p: An n-by-3 matrix of ternary forecasts which will be calibrated according to the calibration function embedded in dat.
Returns
An n-by-3 array of calibrated ternary forecasts.
References
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.
# get football betting datadata(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 forecasttplot(p)# plot the calibrated forecast tplot(pcal,col="blue",newpage=FALSE,bg="transparent")