Description Usage Arguments Value Author(s) References Examples
View source: R/fsm_without_strata.R
Generates a randomized assignment of a group of units to multiple groups of pre-determined sizes using the Finite Selection Model (FSM).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
data_frame |
A data frame containing a column of unit indices (optional) and covariates (or transformations thereof). |
SOM |
A selection order matrix. |
s_function |
Specifies a selection function, a string among |
Q_initial |
A (optional) non-singular matrix (called 'initial matrix') that is added the (X^T X)
matrix of the choosing treatment group at any stage, when the (X^T X) matrix of that treatment group
at that stage is non-invertible. If |
eps |
Proportionality constant for |
ties |
Specifies how to deal with ties in the values of the selection function. If |
intercept |
if |
standardize |
if |
units_print |
if |
index_col |
if |
Pol_mat |
Policy matrix. Applicable only when |
w_pol |
A vector of policy weights. Applicable only when |
A list containing the following items.
data_frame_allocated
: The original data frame augmented with the column of the treatment indicator.
som_appended
: The SOM with augmented columns for the indices and covariate values for units selected.
som_split
: som_appended, split by the levels of the treatment.
crit_print
: The value of the objective function, at each stage of build up process. At each stage,
the unit that maximizes the objective function is selected.
Ambarish Chattopadhyay, Carl N. Morris and Jose R. Zubizarreta
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. (1979), “A finite selection model for experimental design of the health insurance study”, Journal of Econometrics, 11(1), 43–61.
Morris, C., Hill, J. (2000), “The health insurance experiment: design using the finite selection model”, Public policy and statistics: case studies from RAND, Springer Science & Business Media, 29–53.
1 2 3 4 5 6 7 8 9 | # Load the data.
df_sample = data.frame(index = 1:12, x = c(20,30,40,40,50,60,20,30,40,40,50,60))
# Generate an SOM with N = 12, n1 = n2 = 6.
som_sample = som(n_treat = 2, treat_sizes = c(6,6), method = 'SCOMARS', control = TRUE,
marginal_treat = rep(6/12,12))
# Assign units given the SOM.
f = fsm(data_frame = df_sample, SOM = som_sample, s_function = 'Dopt',
eps = 0.001, ties = 'random', intercept = TRUE, standardize = TRUE, units_print = TRUE,
index_col = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.