sreg.rgen {sreg} | R Documentation |
The function generates the observed outcomes, treatment assignments, strata indicators, cluster indicators, cluster sizes, and covariates for estimating the treatment effect within the context of a stratified block randomization design under the covariate-adaptive randomization (CAR).
sreg.rgen(
n,
Nmax = 50,
n.strata,
tau.vec = c(0),
gamma.vec = c(0.4, 0.2, 1),
cluster = TRUE,
is.cov = TRUE
)
n |
a total number of observations in a sample |
Nmax |
a maximum size of generated clusters (maximum number of observations in a cluster) |
n.strata |
an integer specifying the number of strata |
tau.vec |
a numeric |
gamma.vec |
a numeric |
cluster |
a |
is.cov |
a |
An object that is a 'data.frame' with n
observations containing the generated values of the following variables:
Y
: a numeric n \times 1
vector
of observed outcomes
S
: a numeric n \times 1
vector
of strata indicators
D
: a numeric n \times 1
vector
of treatments indexed by \{0, 1, 2, \ldots\}
, where \code{D} = 0
denotes the control
G.id
: a numeric n \times 1
vector
of cluster indicators
X
: a data.frame
with columns representing the covariate values for every observation
data <- sreg.rgen(n = 1000, tau.vec = c(0), n.strata = 4, cluster = TRUE)