This helper function creates a valid visitSequence
. The
visitSequence
is an argument to the mice
function that
specifies the sequence in which blocks are imputed.
make.visitSequence(data = NULL, blocks = NULL)
data | A data frame or a matrix containing the incomplete data. Missing
values are coded as |
---|---|
blocks | List of vectors with variable names per block. List elements
may be named to identify blocks. Variables within a block are
imputed by a multivariate imputation method
(see |
Vector containing block names
make.visitSequence(nhanes)#> [1] "age" "bmi" "hyp" "chl"