The optimal design of single-level experiments detecting
equivalence of two-group means is to choose the optimal sample
allocation that minimizes the variance of a treatment effect under
a fixed budget, which is approximately the optimal
sample allocation that maximizes statistical power under a fixed budget.
The optimal design parameter is
the proportion of individuals to be assigned to treatment (p
).
od.eq.2group(
p = NULL,
r12 = NULL,
c1 = NULL,
c1t = NULL,
m = NULL,
plots = TRUE,
plim = NULL,
varlim = NULL,
plab = NULL,
varlab = NULL,
vartitle = NULL,
verbose = TRUE
)
Unconstrained or constrained optimal sample allocation (p
).
The function also returns function name, design type,
and parameters used in the calculation.
The proportion of individuals to be assigned to treatment.
The proportion of outcome variance explained by covariates.
The cost of sampling one unit in the control condition.
The cost of sampling one unit in the treated condition.
Total budget, default value is the total costs of sampling 600 individuals across treatment conditions.
Logical, provide variance plots if TRUE, otherwise not; default value is TRUE.
The plot range for p, default value is c(0, 1).
The plot range for variance, default value is c(0, 0.05).
The plot label for p
,
default value is "Proportion of Units in Treatment: p".
The plot label for variance, default value is "Variance".
The title of variance plot, default value is NULL.
Logical; print the value of p
if TRUE,
otherwise not; default value is TRUE.
# Unconstrained optimal design #---------
myod <- od.eq.2group(r12 = 0.5, c1 = 1, c1t = 50)
myod$out # output
Run the code above in your browser using DataLab