Learn R Programming

ldamatch (version 1.0.3)

.check_subspaces_for_group_size_setup: Searches over all possible subspaces for specified group size setup.

Description

Results are optimized for the following, in decreasing order of preference: number of subjects; proportion of group sizes close to props; p-value as large as possible.

Usage

.check_subspaces_for_group_size_setup(
  best,
  grpsize_setup,
  sspace,
  condition,
  covariates,
  halting_test,
  thresh,
  print_info
)

Value

A list of logical vectors for the best matched groups.

Arguments

best

The best matched groups so far together with its p-value / thresh ratio; a list containing ratio and sets (a list of subject index vectors).

grpsize_setup

A set of group sizes as a data.table row (also a list).

sspace

An ordered subject subspace: a list of vectors, with one vector per group containing the corresponding subject indices.

condition

A factor vector containing condition labels.

covariates

A 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. Signature: halting_test(condition, covariates, thresh). The following halting tests are part of this package: t_halt, U_halt, l_halt, ad_halt, ks_halt, wilks_halt, f_halt. You can create the intersection of two or more halting tests using create_halting_test.

thresh

The return value of halting_test has to be greater than or equal to thresh for the matched groups.

print_info

If TRUE, prints summary information on the input and the results, as well as progress information for the exhaustive search and random algorithms. Default: TRUE; can be changed using set_param("PRINT_INFO", FALSE).