suff_stat_NA_pattern: Sufficient Statistics for Dataset with Missing Response...

View source: R/suff_stat_NA_pattern.R

suff_stat_NA_patternR Documentation

Sufficient Statistics for Dataset with Missing Response Pattern

Description

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

Usage

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

## Not run: 

#############################################################################
# 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)

## End(Not run)

LAM documentation built on May 18, 2022, 5:17 p.m.