Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

prelim.norm

Preliminary manipulations for a matrix of incomplete continuous data.


Description

Sorts rows of x by missingness patterns, and centers/scales columns of x. Calculates various bookkeeping quantities needed for input to other functions, such as em.norm and da.norm.

Usage

prelim.norm(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.

Value

a list of thirteen components that summarize various features of x after the data have been 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. This vector has names that correspond to the column names of x, if any.

r

matrix of response indicators showing the missing data patterns in x. Dimension is (S,p) where S is the number of distinct missingness patterns in the rows of x, and p is the number of columns 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 column names correspond to the column names of x.

References

See Section 5.3.1 of Schafer (1996).

Examples

data(mdata)
s <- prelim.norm(mdata)  #do preliminary manipulations 
s$nmis[s$co] #look at nmis 
s$r #look at missing data patterns

norm

Analysis of Multivariate Normal Datasets with Missing Values

v1.0-10.0
GPL (>= 2)
Authors
Ported to R by Alvaro A. Novo <alvaro@novo-online.net>. Original by Joseph L. Schafer <jls@stat.psu.edu>.
Initial release
2022-04-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.