Learn R Programming

robCompositions (version 1.9.1)

missPatterns: missing or zero pattern structure.

Description

Analysis of the missing or zero patterns structure of a data set.

Usage

missPatterns(x)
zeroPatterns(x)

Arguments

x
a data frame or matrix.

Value

  • groupsList of the different patterns and the observation numbers for each pattern
  • cnthe names of the patterns coded as vectors of 0-1's
  • tabcombthe pattern structure - all combinations of zeros or missings in the variables
  • tabcombPlusthe pattern structure - all combinations of zeros or missings in the variables including the size of those combinations/patterns, i.e. the number of observations that belongs to each pattern.
  • rsumthe number of zeros or missing values in each row of the data set

Details

Here, one pattern defines those observations that have the same structure regarding their missingness or zeros. For all patterns a summary is calculated.

See Also

aggr

Examples

Run this code
data(expenditures)
## set NA's artificial:
expenditures[expenditures < 300] <- NA
## detect the NA structure:
missPatterns(expenditures)

Run the code above in your browser using DataLab