resultsBinaryMatchThenRerandomizationSearch: Returns unique allocation vectors that are binary matched

View source: R/binary_match_followed_by_rerandomization_search.R

resultsBinaryMatchThenRerandomizationSearchR Documentation

Returns unique allocation vectors that are binary matched

Description

Returns unique allocation vectors that are binary matched

Usage

resultsBinaryMatchThenRerandomizationSearch(
  obj,
  num_vectors = NULL,
  compute_obj_vals = FALSE,
  form = "one_zero",
  use_safe_inverse = FALSE
)

Arguments

obj

The binary_then_greedy_experimental_design object where the pairs are computed.

num_vectors

How many random allocation vectors you wish to return. The default is NULL indicating you want all of them.

compute_obj_vals

Should we compute all the objective values for each allocation? Default is FALSE.

form

Which form should it be in? The default is one_zero for 1/0's or pos_one_min_one for +1/-1's.

use_safe_inverse

Should a regularized inverse be used for the Mahalanobis objective? Default is FALSE.

Author(s)

Adam Kapelner

Examples

## Not run: 
set.seed(1)
X = matrix(rnorm(16), nrow = 8)
obj = initBinaryMatchFollowedByRerandomizationDesignSearchObject(
  X,
  max_designs = 4,
  num_cores = 1,
  objective = "abs_sum_diff",
  obj_val_cutoff_to_include = Inf,
  start = TRUE,
  wait = TRUE,
  verbose = FALSE
)
res = resultsBinaryMatchThenRerandomizationSearch(obj, num_vectors = 3, form = "one_zero")
dim(res$indicTs)

## End(Not run)

GreedyExperimentalDesign documentation built on Jan. 9, 2026, 5:07 p.m.