
Begin a Search for Binary Matching Followed by Greedy Switch Designs
Source:R/binary_match_followed_by_greedy_search.R
initBinaryMatchFollowedByGreedyExperimentalDesignSearchObject.RdThis method creates an object of type binary_then_greedy_experimental_design and will find optimal matched pairs which
are then greedily switched in order to further minimize a balance metric. You can then
use the function resultsBinaryMatchThenGreedySearch to obtain the randomized allocation vectors. For one column
in X, the matching just sorts the values to find the pairs trivially.
Usage
initBinaryMatchFollowedByGreedyExperimentalDesignSearchObject(
X,
diff_method = FALSE,
compute_dist_matrix = NULL,
verbose = TRUE,
...
)Arguments
- X
The design matrix with $n$ rows (one for each subject) and $p$ columns (one for each measurement on the subject). This is the design matrix you wish to search for a more optimal design.
- diff_method
Once the subjects (i.e. row vectors) are paired, do we create a set of $n$/2 difference vectors and feed that into greedy? If
TRUE, this technically breaks the objective function, but it is shown to have better performance. The default is thusFALSE.- compute_dist_matrix
The function that computes the distance matrix between every two observations in
X, its only argument. The default isNULLsignifying euclidean squared distance optimized in C++.- verbose
Should the algorithm emit progress output? Default is
TRUE.- ...
Arguments passed to
initGreedyExperimentalDesignObject. It is recommended to setmax_designsotherwise it will default to 10,000.