Computes sufficient statistics for a dataset with an arbitrary missing response pattern.

suff_stat_NA_pattern(dat)

Arguments

dat

Numeric data frame

Value

A list with following entries

nobs

List with number of observations for each missing response pattern

M

List with mean vectors

S

List with covariance matrices

varindex

List with indices of observed variables

NP

Number of missing data patterns

N

Total sample size

Examples

if (FALSE) {

#############################################################################
# EXAMPLE 1: Toy example for computation of sufficient statistics
#############################################################################

library(STARTS)

data(data.starts01b, package="STARTS")
dat <- data.starts01b
dat1 <- dat[, paste0("E",1:3)]

#-- compute sufficient statistics
res <- LAM::suff_stat_NA_pattern(dat1)
str(res)
}