Learn R Programming

⚠️There's a newer version (1.0.3) of this package.Take me there.

ldamatch (version 1.0.2)

Selection of Statistically Similar Research Groups

Description

Select statistically similar research groups by backward selection using various robust algorithms, including a heuristic based on linear discriminant analysis, multiple heuristics based on the test statistic, and parallelized exhaustive search.

Copy Link

Version

Install

install.packages('ldamatch')

Monthly Downloads

245

Version

1.0.2

License

MIT + file LICENSE

Maintainer

Kyle Gorman

Last Published

May 23rd, 2021

Functions in ldamatch (1.0.2)

ad_halt

A univariate halting test using the Anderson-Darling test.
calc_p_value

Calculates p-value using specified halting test.
.apply_crit_to_condition_pairs

Returns smallest value from .apply_crit for all condition pairs.
compare_ldamatch_outputs

Compares outputs of ldamatch runs.
U_halt

A univariate halting test using the Wilcoxon test, which must be satisfied for all condition pairs.
calc_metrics

Calculates basic metrics about ldamatch search result.
create_halting_test

Creates halting test from multiple tests.
.ad_crit

Criterion function for ad_halt.
.U_crit

Criterion function for U_halt.
.apply_crit

Returns smallest halting_test-threshold ratio, or 0 if less than 1.
.choose_most_frequently_chosen_subject_from_subject_tuples

Chooses best one(s) of a set of subjects having the best p-value(s).
.combine_sets

Combines current best and candidate sets, keeping the highest metric value.
.get_halting_test

Returns halting tests for names, or checks if pass functions are suitable.
.recycle

Recycles threshold values for halting tests.
.choose_subject_with_best_p_value_from_subject_tuples

Chooses best one(s) of a set of subjects having the best p-value(s).
.normalize_max_removed_per_cond

Normalizes max_removed_per_cond parameter for match_groups() and estimate_exhaustive().
.check_subspaces_for_group_size_setup

Searches over all possible subspaces for specified group size setup.
.calc_subject_balance_divergence

Characterizes closeness of actual group sizes to what is expected.
.normalize_props

Normalizes the props parameter for match_groups().
.get_human_readable

Returns human readable format for number of seconds.
.get_if_args_are_missing

Determines which arguments for a function, which is its caller by default.
nondeterministic_matching_methods

The available nondeterministic methods for matching.
.internally_compare_ldamatch_outputs

Compares outputs of ldamatch runs using internally normalized parameters.
.vector_list_to_string

Creates string from list of vectors.
.f_crit

Criterion function for f_halt.
.tolerance

An infinitesimally small amount, used to check if values are approximately the same.
.decrease_group_sizes

Creates all group sizes by reducing one group in all rows of grpsizes.
.create_Cartesian_iterable

Creates Cartesian product of iterators.
.unique_list

Uniquifies a list.
match_groups

Creates a matched group via backward selection.
.search_heuristic_with_lookahead

Finds matching using depth-first search, looking ahead n steps.
.warn_about_extra_params

Warns about extra (i.e. unused) parameters.
parallelized_matching_methods

The available parallelized methods for matching.
t_halt

A univariate halting test using the t-test, which must be satisfied for all condition pairs.
.choose_best_test_statistic

Chooses rows with best test statistic.
wilks_halt

A multivariate halting test appropriate for more than two condition levels.
.choose_best_subjects

Chooses best set of subjects in a set.
get_param

Gets value for ldamatch global parameter.
.calc_p_thresh_ratio

Calculates p-value-threshold ratio.
.l_crit

Criterion function for l_halt.
.calc_multipliers

Calculates multipliers used in search_random.
.ks_crit

Criterion function for ks_halt.
ks_halt

A univariate halting test using the Kolmogorov-Smirnov Test, which must be satisfied for all condition pairs.
estimate_exhaustive

Estimates the maximum number of cases to be checked during exhaustive search.
.foreach

Wrapper to foreach::foreach called from .choose_best_subjects.
.flip_ind

Flips logical vector at specified indices
.sort_group_sizes

Orders rows by similarity to expected group size proportions.
matching_methods

The available methods for matching.
.t_crit

Criterion function for t_halt.
l_halt

A univariate halting test using Levene's test.
search_exhaustive

Searches the space backwards, prefering more subjects and certain group size proportions.
search_heuristic4

Finds matching using depth-first search, looking ahead n steps.
f_halt

A univariate halting test using Fisher's exact test.
search_heuristic2

OBSOLETE: Finds matching using depth-first search recursively.
ldamatch

ldamatch: Selection of Statistically Similar Research Groups.
search_heuristic3

Finds matching using depth-first search, looking ahead n steps.
search_random

Searches by randomly selecting subspaces with decreasing expected size.
set_param

Sets value for ldamatch global parameter.