Learn R Programming

nestedRanksTest (version 0.2)

nestedRanksTest_weights: Calculates weights for nestedRanksTest based on group sizes.

Description

ntestedRanksTest_weights is used by nestedRanksTest to calculate group weights based on group sizes. The number of group members in each of the two treatment levels is determined (n1 and n2) together with their product (n1.n2), and the group-specific weight is calculated by dividing n1.n2 by the sum of n1.n2 for all groups.

Usage

nestedRanksTest_weights(x, groups)

Arguments

x
Treatments, coerced to factor. Must contain two levels.
groups
Groups, coerced to factor, with elements in the same order as for x.

Value

data.frame containing weights and other information for each group: columns group, a factor of group names, also used for row names; n1, n2, and n1.n2 for integer group sizes in the first and second treatment levels and their product; and numeric weights for the calculated weights.

See Also

nestedRanksTest