combinations: Compute the number of possible subtest combinations

View source: R/combinations.R

combinationsR Documentation

Compute the number of possible subtest combinations

Description

Used to compute the number of possible subtest constellations prior to performing item selection.

Usage

combinations(
  data,
  factor.structure,
  capacity = NULL,
  repeated.measures = NULL,
  mtmm = NULL,
  use.order = FALSE,
  ...
)

Arguments

data

A data.frame containing all relevant data.

factor.structure

A list linking factors to items. The names of the list elements correspond to the factor names. Each list element must contain a character-vector of item names that are indicators of this factor.

capacity

A list containing the number of items per subtest. This must be in the same order as the factor.structure provided. If a single number, it is applied to all subtests. If NULL all items are evenly distributed among the subtests.

repeated.measures

A list linking factors that are repeated measures of each other. Repeated factors must be in one element of the list - other sets of factors in other elements of the list. When this is NULL (the default) a cross-sectional model is estimated.

mtmm

A list linking factors that are measurements of the same construct with different methods. Measurements of the same construct must be in one element of the list - other sets of methods in other elements of the list. When this is NULL (the default) a single method model is estimated.

use.order

A logical indicating whether or not to take the selection order of the items into account. Defaults to FALSE.

...

Other arguments normally provided to mmas, which will be ignored.

Value

Returns the number of possible subtest constellations.

Author(s)

Martin Schultze

See Also

bruteforce, mmas, gene

Examples


# Determine number of combinations in a simple situation
data(fairplayer)
fs <- list(si = names(fairplayer)[83:92])
combinations(fairplayer, fs, 4)

# Number of combinations with repeated measures
data(fairplayer)
fs <- list(si1 = names(fairplayer)[83:92],
  si2 = names(fairplayer)[93:102],
  si3 = names(fairplayer)[103:112])
repe <- list(si = c('si1', 'si2', 'si3'))
combinations(fairplayer, fs, 4, repeated.measures = repe)


stuart documentation built on June 7, 2023, 6:12 p.m.