View source: R/suff_stat_NA_pattern.R
suff_stat_NA_pattern | R Documentation |
Computes sufficient statistics for a dataset with an arbitrary missing response pattern.
suff_stat_NA_pattern(dat)
dat |
Numeric data frame |
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 |
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.