som: Selection Order Matrix (SOM)

Description Usage Arguments Value Author(s) References Examples

View source: R/fsm_without_strata.R

Description

Generates a Selection Order Matrix (SOM) in a deterministic/random manner.

Usage

1
2
3
4
5
6
7
8
9
som(
  data_frame = NULL,
  n_treat,
  treat_sizes,
  include_discard = FALSE,
  method = "SCOMARS",
  control = FALSE,
  marginal_treat = NULL
)

Arguments

data_frame

A (optional) data frame corresponding to the full sample of units. Required if include_discard = TRUE.

n_treat

Number of treatment groups.

treat_sizes

A vector of treatment group sizes. If control = TRUE, the first element of treat_sizes should be the control group size.

include_discard

TRUE if a discard group is considered.

method

Specifies the selection strategy used among 'global percentage', 'randomized chunk', 'SCOMARS'. 'SCOMARS' is applicable only if n_treat = 2.

control

If TRUE, treatments are labeled as 0,1,...,g-1 (0 representing the control group). If FALSE, they are labeled as 1,2,...,g.

marginal_treat

A vector of marginal probabilities, the jth element being the probability that treatment group (or treatment group 2 in case control = FALSE) gets to choose at the jth stage given the total number of choices made by treatment group upto the (j-1)th stage. Only applicable when method = 'SCOMARS'.

Value

A data frame containing the selection order of treatments, i.e. the labels of treatment groups at each stage of selection. If method = 'SCOMARS', the data frame contains an additional column of the conditional selection probabilities.

Author(s)

Ambarish Chattopadhyay, Carl N. Morris and Jose R. Zubizarreta.

References

Chattopadhyay, A., Morris, C. N., and Zubizarreta, J. R. (2020), “Randomized and Balanced Allocation of Units into Treatment Groups Using the Finite Selection Model for R”.

Morris, C. (1983), “Sequentially controlled Markovian random sampling (SCOMARS)”, Institute of Mathematical Statistics Bulletin,12(5), 237.

Examples

1
2
3
# Generate an SOM with N = 12, n1 = n2 = 6.
som_sample = som(data_frame = NULL, n_treat = 2, treat_sizes = c(6,6), include_discard = FALSE, 
method = 'SCOMARS', control = FALSE, marginal_treat = rep(6/12,12))

FSM documentation built on March 11, 2021, 1:06 a.m.

Related to som in FSM...