Finds the discrepancy between the proportion of data in each level of a weighted vector and a set of targets for each level of that same vector. Used as part of anesrake
.
discrep(datavec, targetvec, weightvec)
Vector of values for a particular variable.
Vector of targets with a single item per level of that variable.
Weighting vector to be applied to datavec
.
Vector of discrepancies at each level.