diagMAAR.dtmm: Directly testing a postulated missingness mechanism.

Description Usage Arguments Details Value See Also Examples

Description

diagMAAR.dtmm takes a preprocessed data matrix test the MAAR assumption using a logistic regression as the response propensity model.

Usage

1
diagMAAR.dtmm(prep, alpha = 0.05, verbose = FALSE)

Arguments

prep

A preprocessed S3 class that contains the data that is going to be tested.

alpha

A numeric value indicating the level of the test. The default is set to 0.05.

Details

diagMAAR.dtmm is part of the diagnostic tools functions used for diagnosing for the MAAR assumption. This function tests if the response propensity in one variable depends on partially observed outcome variables. To perform the likelihood ratio test, the function first imputes the missing values - using default mice settings.

Note: In simulation studies this test has low power for sample sizes < 100.

Value

diagMAAR A S3 object that contains: reject, a logical indicating if the test rejected; res, the results from the likelihood ratio test; which.reject, a vector indicating which variables were reject; method, a string indicating the diagnostic method used.

See Also

Other diagnostic: diagMAAR.ccm, diagMAAR.cop, diagMAAR

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.nvm <- 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))
Y.dtmm <- prep.dtmm(obs.mvn)
diagMAAR.dtmm(Y.dtmm)

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