Learn R Programming

ldamatch (version 0.6.3)

ldamatch: Creates a matched group via backward selection.

Description

Creates a matched group via backward selection.

Usage

ldamatch(condition, covariates, halting_test, thresh = 0.2,
  method = c("heuristic", "montecarlo", "exhaustive"), props = NULL,
  replicates = NULL, print_info = get("PRINT_INFO", .ldamatch_globals))

Arguments

condition
A factor vector containing condition labels.
covariates
A vector or columnwise matrix containing covariates to match the conditions on.
halting_test
A function to apply to `covariates` (in matrix form) which is TRUE iff the conditions are matched.
thresh
The statistical threshold to pass onto the aforementioned test.
method
The choice of search method. The "heuristic" method deploys the table of desired proportions (see below) to structure search. The "montecarlo" method randomly generates subspaces of decreasing
props
The desired proportions (percentage) of the sample for each condition; if not specified, the (full) sample proportions are used. This is used for the "heuristic" and "exhaustive" methods.
replicates
The maximum number of Monte Carlo replications to be performed. This is only used for the "montecarlo" method.
print_info
If TRUE, prints summary information on the input and the results, as well as progress information for the exhaustive search algorithm. Default: TRUE; can be changed using set_param("PRINT_INFO

Value

  • A logical vector, TRUE iff row is in the match, or a list of such vectors for the exhaustive search.

    The exhaustive search method uses the foreach package to parallelize computation. To take advantage of this, you must register a cluster. For example, to use all but one of the CPU cores: doMC::registerDoMC(max(1, parallel::detectCores() - 1)) To use sequential processing: foreach::registerDoSEQ()