dot-sort_group_sizes: Orders rows by similarity to expected group size proportions.

Description Usage Arguments

Description

Orders rows by similarity to expected group size proportions.

Usage

1
.sort_group_sizes(grpsizes, grpnames, props)

Arguments

grpsizes

A data.table with the columns containing the group names, and the rows containing a particular setup of group sizes. All rows are expected to have the same sum (not checked).

grpnames

The group names (specified because the table can have other columns as well).

props

Either the desired proportions (percentage) of the sample for each condition as a named vector, or the names of the conditions for which we prefer to preserve the subjects, in decreasing order of preference. If not specified, the (full) sample proportions are used. This is preferred among configurations with the same taken into account by the other methods to some extent. For example, c(A = 0.4, B = 0.4, C = 0.2) means that we would like the number of subjects in groups A, B, and C to be around 40%, 40%, and 20% of the total number of subjects, respectively. Whereas c("A", "B", "C") means that if possible, we would like to keep all subjects in group A, and prefer keeping subjects in B, even if it results in losing more subjects from C.


ldamatch documentation built on May 23, 2021, 5:06 p.m.