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.
.check_subspaces_for_group_size_setup(
best,
grpsize_setup,
sspace,
condition,
covariates,
halting_test,
thresh,
print_info
)
A list of logical vectors for the best matched groups.
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).
A set of group sizes as a data.table row (also a list).
An ordered subject subspace: a list of vectors, with one vector per group containing the corresponding subject indices.
A factor vector containing condition labels.
A columnwise matrix containing covariates to match the conditions on.
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
.
The return value of halting_test has to be greater than or equal to thresh for the matched groups.
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)
.