make.method | R Documentation |
method
argumentThis helper function creates a valid method
vector. The
method
vector is an argument to the mice
function that
specifies the method for each block.
make.method(
data,
where = make.where(data),
blocks = make.blocks(data),
defaultMethod = c("pmm", "logreg", "polyreg", "polr")
)
data |
A data frame or a matrix containing the incomplete data. Missing
values are coded as |
where |
A data frame or matrix with logicals of the same dimensions
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 |
defaultMethod |
A vector of length 4 containing the default
imputation methods for 1) numeric data, 2) factor data with 2 levels, 3)
factor data with > 2 unordered levels, and 4) factor data with > 2
ordered levels. By default, the method uses
|
Vector of length(blocks)
element with method names
mice
make.method(nhanes2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.