prelim.mix: Preliminary Manipulations on Matrix of Incomplete Mixed Data
Description
This function performs grouping and sorting operations on a mixed
dataset with missing values. It creates a list that is
needed for input to em.mix, da.mix,
imp.mix, etc.
Usage
prelim.mix(x, p)
Value
a list of twenty-nine (!) components that summarize various features
of x after the data have been collapsed, centered, scaled, and sorted
by missingness patterns. Components that might be of interest to the
user include:
nmis
a vector of length ncol(x) containing the number of
missing values for each variable in x.
r
matrix of response indicators showing the missing data patterns in
x.
Observed values are indicated by 1 and missing values by 0. The row
names give the number of observations in each pattern, and the columns
correspond to the columns of x.
Arguments
x
data matrix containing missing values. The rows of x correspond to
observational units, and the columns to variables. Missing values are
denoted by NA. The categorical variables must be in
the first p columns
of x, and they must be coded with consecutive positive integers
starting with 1. For example, a binary variable must be coded as 1,2
rather than 0,1.
p
number of categorical variables in x
References
Schafer, J. L. (1996) Analysis of Incomplete Multivariate Data.
Chapman & Hall, Chapter 9.