imputeData: Missing Data Imputation via the 'mix' package

Description Usage Arguments Value References See Also Examples

Description

Imputes missing data using the mix package.

Usage

1
imputeData(x, categorical = NULL, seed = NULL)

Arguments

x

A numeric vector, matrix, or data frame of observations containing missing values. Categorical variables are allowed. If a matrix or data frame, rows correspond to observations and columns correspond to variables.

categorical

A logical vectors whose ith entry is TRUE if the ith variable or column of x is to be interpreted as categorical and FALSE otherwise. The default is to assume that a variable is to be interpreted as categorical only if it is a factor.

seed

A seed for the function rngseed that is used to initialize the random number generator in mix. By default, a seed is chosen uniformly in the interval (.Machine$integer.max/1024, .Machine$integer.max).

Value

A dataset of the same dimensions as x with missing values filled in.

References

J. L. Schafer, Analysis of Imcomplete Multivariate Data, Chapman and Hall, 1997.

See Also

imputePairs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Note that package 'mix' must be installed.
## Not run: 

# impute the continuos variables in the stlouis data
stlimp <- imputeData(stlouis[,-(1:3)])

# plot imputed values
imputePairs(stlouis[,-(1:3)], stlimp)

## End(Not run)


Search within the mclust package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.