prep.ccm: Prepare for comparison of conditional means

Description Usage Arguments Details Value See Also Examples

Description

prep.ccm takes a data frame, or matrix and prepares it to be analyzed by diagMAAR.ccm.

Usage

1

Arguments

dt

A numeric matrix, data frame or data table.

Details

prep.ccm is part of the data preparation functions used to pre-process data sets so that diagnostic tests for the MAAR assumption can be ran.

Value

prep A prep S3 object that contains the original data, the desired diagnostic test to use, the sample size, the number of missing variables, the location of the missing variables, the number of variables and a data set that has the missingness indicators appended.

See Also

Other prep: prep.cop, prep.dtmm, prep

Examples

1
2
3
4
5
6
7
8
# Generate 100 iid samples from a MVN with correlation equal to 0.3
samples.mvn <- sample_mvn(5, 0.3, 100)
# Take the Gaussian data and and delete some values from the fourth row.
obs.nvmn <- MAAR_mechanism(samples = samples.mvn, miss.coef = 0.2, 
                           miss.nvar = 1, miss.var = 4, 
                           prob.coef = matrix(c(-1, 0.5, 0.7, - 0.2), 1, 4))
dt.prep <- prep.ccm(obs.mvn)
print(dt.prep)

bojinov/diagMAAR documentation built on May 22, 2019, 2:22 p.m.