This helper function generates a list of the type needed for
blocks argument in the
make.blocks( data, partition = c("scatter", "collect", "void"), calltype = "pred" )
data.frame, character vector with variable names, or
listwith variable names.
A character vector of length 1 used to assign variables to blocks when
"scatter"(default) will assign each column to it own block. Value
"collect"assigns all variables to one block, whereas
"void"produces an empty list.
A character vector of
length(block)elements that indicates how the imputation model is specified. If
calltype = "pred"(the default), the underlying imputation model is called by means of the
typeargument for block
his equivalent to row
predictorMatrix. The alternative is
calltype = "formula". This will pass
formulas[[h]]to the underlying imputation function for block
h, together with the current data. The
calltypeof a block is set automatically during initialization. Where a choice is possible, calltype
"formula"is preferred over
"pred"since this is more flexible and extendable. However, what precisely happens depends also on the capabilities of the imputation function that is called.
"collect" represent to two
extreme scenarios for assigning variables to imputation blocks.
"scatter" to create an imputation model based on
fully conditionally specification (FCS). Use
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.
"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.
make.blocks(nhanes) #> $age #>  "age" #> #> $bmi #>  "bmi" #> #> $hyp #>  "hyp" #> #> $chl #>  "chl" #> #> attr(,"calltype") #> age bmi hyp chl #> "pred" "pred" "pred" "pred" make.blocks(c("age", "sex", "edu")) #> $age #>  "age" #> #> $sex #>  "sex" #> #> $edu #>  "edu" #> #> attr(,"calltype") #> age sex edu #> "pred" "pred" "pred"