Set thinning and thickening caps for full matchingSource:
Functions to find the largest value of min.controls, or the smallest value of max.controls, for which a full matching problem is feasible. These are determined by constraints embedded in the matching problem's distance matrix.
maxControlsCap(distance, min.controls = NULL, solver = "") minControlsCap(distance, max.controls = NULL, solver = "")
Either a matrix of non-negative, numeric discrepancies, or a list of such matrices. (See
Optionally, set limits on the minimum number of controls per matched set. (Only makes sense for
Choose which solver to use. See
Optionally, set limits on the maximum number of controls per matched set. (Only makes sense for
The largest values of the
min.controlsthat yield a full match;
max.controlsargument given to
minControlsCapor, if none was given, a vector of
min.controlsargument given to
maxControlsCapor, if none was given, a vector of
The smallest values of the
max.controlsthat yield a full match.
The function works by repeated application of full matching, so on large problems it can be time-consuming.
Essentially this is just a line search. I've done several
things to speed it up, but not everything that might be done.
At present, not very thoroughly tested either: you might check
the final results to make sure that
works with the values of
max.controls) suggested by these functions, and that it
ceases to work if you increase (decrease) those values.
Hansen, B.B. and S. Olsen Klopfer (2006), ‘Optimal full matching and related designs via network flows’, Journal of Computational and Graphical Statistics 15, 609--627.