Description Usage Arguments Details Value See Also Examples
diagMAAR.cop
takes a preprocessed data matrix test the MAAR assumption
using a Gaussian copula approach - as outlined in our paper.
1 2 | diagMAAR.cop(prep, alpha = 0.05, nburn = 500, n.samples = 2000,
verbose = FALSE)
|
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. |
nburn |
A numeric value indicating the number of burn in samples for the MCMC (passed to sbgcop). The default is set to 500. |
n.samples |
A numeric value indicating the number of samples to keep from the MCMC (passed to sbgcop). The default is set to 2000. |
verbose |
A logical variable indicating if sbgcop should print it's output. The default is set to FALSE. |
diagMAAR.cop
is part of the diagnostic tools functions used for
diagnosing for the MAAR assumption. This particular one assumes that the
correlation between the (data, missingness indicators) can be modeled using a
Gaussian copula. This function utilizes the sbgcop
package to sample
from the posterior distribution of the copula. The code then looks for
conditional dependencies between the partially observed outcome and the
different missingness indicators.
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.
Other diagnostic: diagMAAR.ccm
,
diagMAAR.dtmm
, diagMAAR
1 2 3 4 5 6 7 8 9 | # 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.mvn <- MANAR_mechanism(samples = samples.mvn, miss.coef = 0.2,
miss.nvar = 1, miss.var = 1,
prob.coef = matrix(c(-1, 0.5, 0.7,0.2, - 0.2),
1, 5))
Y.cop <- prep.cop(obs.mvn)
diagMAAR.cop(Y.cop)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.