Usage
block(data, vcov.data = NULL, groups = NULL, n.tr = 2, id.vars,
block.vars = NULL, algorithm = "optGreedy", distance = "mahalanobis",
row.sort = NULL, level.two = FALSE, valid.var = NULL,
valid.range = NULL, seed, verbose = TRUE, ...)
Arguments
data
a dataframe or matrix, with units in rows and variables in
columns.
vcov.data
an optional matrix of data used to estimate the
variance-covariance matrix for calculating multivariate distance.
groups
an optional column name from data
, specifying subgroups
within which blocking occurs.
n.tr
the number of treatment conditions per block.
id.vars
a required string or vector of two strings specifying which
column(s) of data
contain identifying information.
block.vars
an optional string or vector of strings specifying which
column(s) of data
contain the blocking variables.
algorithm
a string specifying the blocking algorithm.
"optGreedy"
, "naiveGreedy"
, "randGreedy"
, and
"sortGreedy"
algorithms are currently available. See Details
for more information.
distance
either a) a string defining how the multivariate
distance used for blocking is calculated (options include
"mahalanobis"
, "mcd"
, and "mve"
), or b) a
user-defined $kk$ matrix, where $k$ is the numbe