Calculate the Generalized discrimination score from a data.table with data belonging to a single group (as defined by the
by variable in the DISS function), for example a single location and month.
Formula (5a) from Mason&2018 is used in the calculation. Mostly auxiliary function for the DISS function.
Usage
disc_score_dt(year, obs, pB, pN, pA)
Value
A data table with the scores
Arguments
year
a vector of pool variables, typically year.
obs
a vector of observations the observation column, needs to contain -1 if it falls into the first category,
0 for the second and 1 for the third category.
pB
a vector of probabilities for the first category.
pN
a vector of probabilities for the second category.