diagMAAR.ccm: Comparison of Conditional Means

Description Usage Arguments Details Value See Also Examples

Description

diagMAAR.ccm takes a preprocessed data matrix test the MAAR assumption by comparing the conditional means.

Usage

1
diagMAAR.ccm(prep, alpha = 0.05)

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.ccm is part of the diagnostic tools functions used for diagnosing for the MAAR assumption. This function looks for a difference in the conditional means for a variable. This test assume that the data are MAAR, the columns of the missingness indicators are mutually conditionally independent given the outcome matrix, and the rows are exchangeable. Consider three variables; Y_{1} and Y_{2} can have missing values, and Y_{3} is always fully observed. Then conditional expectation of Y_{1} given Y_{3} is the same for the two partitions induced by R_{2},

E[Y_{i,1} | Y_{i,3} = y_{i,3}, R_{i,2} = 0] = E[Y_{i,1} | Y_{i,3} = y_{i,3}, R_{i,2} = 1] = E[Y_{i,1} | Y_{i,3} = y_{i,3}].

Then, we can test if Y_1 depends on R_2 given Y_3. Similarly we can test if Y_2 depends on R_1 given Y_3. The test is assumes that the variables with missing values are Gaussian and performs a likelihood ratio test between the model that includes only the fully observed variables and a model that has an interaction between the fully observed variables and the missingness indicators. Future version will include other models.

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

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