make.visitSequence: Creates a 'visitSequence' argument

View source: R/visitSequence.R

make.visitSequenceR Documentation

Creates a visitSequence argument

Description

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.

Usage

make.visitSequence(data = NULL, blocks = NULL)

Arguments

data

A data frame or a matrix containing the incomplete data. Missing values are coded as NA.

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 method argument). By default each variable is placed into its own block, which is effectively fully conditional specification (FCS) by univariate models (variable-by-variable imputation). Only variables whose names appear in blocks are imputed. The relevant columns in the where matrix are set to FALSE of variables that are not block members. A variable may appear in multiple blocks. In that case, it is effectively re-imputed each time that it is visited.

Value

Vector containing block names

See Also

mice

Examples

make.visitSequence(nhanes)

mice documentation built on June 7, 2023, 5:38 p.m.