Chooses rows with best test statistic.
.choose_best_test_statistic(
dat,
condition,
covariates,
halting_test,
thresh,
tiebreaker
)
A data.table containing only the rows of dat with for best test statistic values (decided primarily by halting_test, then by tiebreaker).
A data.table with an ind column with indices for items to consider dropping.
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.
NULL, or a function similar to halting_test, used to decide between cases for which halting_test yields equal values.