Creates a blocks argument
This helper function generates a list of the type needed for
blocks
argument in the [=mice]{mice}
function.
make.blocks( data, partition = c("scatter", "collect", "void"), calltype = "type" )
data |
A |
partition |
A character vector of length 1 used to assign
variables to blocks when |
calltype |
A character vector of |
Choices "scatter"
and "collect"
represent to two
extreme scenarios for assigning variables to imputation blocks.
Use "scatter"
to create an imputation model based on
fully conditionally specification (FCS). Use "collect"
to
gather all variables to be imputed by a joint model (JM).
Scenario's in-between these two extremes represent
hybrid imputation models that combine FCS and JM.
Any variable not listed in will not be imputed.
Specification "void"
represents the extreme scenario that
skips imputation of all variables.
A variable may be a member of multiple blocks. The variable will be re-imputed in each block, so the final imputations for variable will come from the last block that was executed. This scenario may be useful where the same complete background factors appear in multiple imputation blocks.
A variable may appear multiple times within a given block. If a univariate imputation model is applied to such a block, then the variable is re-imputed each time as it appears in the block.
A named list of character vectors with variables names.
make.blocks(nhanes) make.blocks(c("age", "sex", "edu"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.