Learn R Programming

⚠️There's a newer version (1.3) of this package.Take me there.

MCARtest (version 1.2.2)

Optimal Nonparametric Testing of Missing Completely at Random

Description

Provides functions for carrying out nonparametric hypothesis tests of the MCAR hypothesis based on the theory of Frechet classes and compatibility. Also gives functions for computing halfspace representations of the marginal polytope and related geometric objects.

Copy Link

Version

Install

install.packages('MCARtest')

Monthly Downloads

205

Version

1.2.2

License

MIT + file LICENSE

Maintainer

Thomas Berrett

Last Published

October 29th, 2024

Functions in MCARtest (1.2.2)

row_index

A function indexing the rows of A
infoS2

Calculates the individual cardinalities of the sample spaces.
get_SigmaS

Computes the sequence of patterns, means, variances, covariance and correlation matrices for a given dataset with missing values.
compute_av

Compute the columnwise average of means/variances
loglik1

Compute the log likelihood of a probability mass function, without assuming MCAR, given complete and incomplete data
margProj

Internal function multiplying a mass function by the sparse matrix A.
loglik0

Compute the log likelihood of a probability mass function, under MCAR, given complete and incomplete data
V

Computes an inconsistency index for sequences of variances.
RoundErrors

Round errors in halfspace representations
little_test

Carry out Little's test of MCAR
col_index

A function indexing the columns of A
computeR

A function computing the incompatibility index for sequences of correlation matrices
AmatrixSparse

Generate the matrix A, whose columns are the vertices of the marginal polytope, as a sparse matrix.
Amatrix

Generate the matrix A, whose columns are the vertices of the marginal polytope.
Cimproved

Calculate the critical value for our improved test
EquivalenceClass

Simplifies H-representation by exploiting symmetry
EMiteration

Perform one step of the EM algorithm for finding the MLE under MCAR in a contingency table.
InconsMinkSumHrep

Calculate the H-representation of the general (possibly inconsistent) Minkowski sum
ConsMinkSumHrep

Calculate the H-representation of the consistent Minkowski sum
Csimple

Calculate the critical value for our simple test
M

Computes an inconsistency index for sequences of means.
MCAR_meancovTest

Carry out a test of MCAR using first and second moments.
MargPolyHrep

Calculate the H-representation of the marginal polytope
FuchsTest

Carry out Fuchs's test of MCAR in a contingency table, given complete and incomplete observations.
ProjectionTest

Carry out a test of MCAR in a contingency table, given incomplete observations.
MLE

Compute the MLE under MCAR in a contingency table using the EM algorithm, given complete and incomplete observations.
Rindex

A function computing the incompatibility index
RindexDual

A function computing the incompatibility index and associated closest joint mass function using the dual formulation
infoS

Calculates the total cardinality of the sample spaces.
aMatrixSparseRevLex

Generates the row indices used internally to generate the sparse matrix A.
colVector

Generates the column indices used internally to generate the sparse matrix A.