Construct blocks from
This helper function attempts to find blocks of variables in the
specification of the
objects. Blocks specified by
formulas may consist of
multiple variables. Blocks specified by
assumed to consist of single variables. Any duplicates in names are
removed, and the formula specification is preferred.
formulas. When both arguments
specify models for the same block, the model for the
predictMatrix is removed, and priority is given to the
specification given in
A named list of formula's, or expressions that can be converted into formula's by
as.formula. List elements correspond to blocks. The block to which the list element applies is identified by its name, so list names must correspond to block names. The
formulasargument is an alternative to the
predictorMatrixargument that allows for more flexibility in specifying imputation models, e.g., for specifying interaction terms.
A numeric matrix of
ncol(data)columns, containing 0/1 data specifying the set of predictors to be used for each target column. Each row corresponds to a variable block, i.e., a set of variables to be imputed. A value of
1means that the column variable is used as a predictor for the target block (in the rows). By default, the
predictorMatrixis a square matrix of
ncol(data)rows and columns with all 1's, except for the diagonal. Note: For two-level imputation models (which have
"2l"in their names) other codes (e.g,
-2) are also allowed.