sandboxMaxSplit {AssocBin} | R Documentation |
Bivariate score maximizing splitting
Description
A function which splits a bin based on the location maximizing a score function.
Usage
sandboxMaxSplit(
bin,
scorer,
ties = halfCutTie,
minExp = 5,
pickMax = which.max,
...
)
Arguments
bin |
a bin to be split with elements 'x', 'y', 'depth', 'bnds' (list with elements 'x' and 'y'), 'expn', 'n' |
scorer |
function which accepts a numeric vector of potential split coordinates and the bounds of 'bin' and returns a numeric vector of scores for each |
ties |
function which is called to break ties when all splits generate the same score |
minExp |
value giving the smallest expected count allowed for bin splits |
pickMax |
function which accepts a list of scores and returns the element of the largest score according to some rule |
... |
optional additional arguments to 'scorer' |
Details
This function serves as a wrapper which manages the interaction of a score function, marginal splitting functions, tie breaking function, and a maximum selection function to split a bin at the observation coordinate which maximizes the score function.
Value
A list of two bins resulting from the split of 'bin' along the corresponding margin at the maximum location
Author(s)
Chris Salahub