Rindex: A function computing the incompatibility index

View source: R/Rindex.R

RindexR Documentation

A function computing the incompatibility index

Description

A function solving a linear program to compute the incompatibility index R() defined in \insertCiteBS2022;textualMCARtest, in the case of having discrete random variables. Uses Amatrix to define to constraint matrix and lpSolve to implement the linear optimisation.

Usage

Rindex(pS, bS, M)

Arguments

pS

A sequence of probability mass functions on the marginal spaces.

bS

A binary matrix specifying the set of observation patterns. Each row encodes a single pattern.

M

A vector of positive integers giving the alphabet sizes of the discrete variables.

Value

The value of R(), in the interval [0,1].

References

\insertRef

BS2022MCARtest

Examples

bS=matrix(c(1,1,0, 1,0,1, 0,1,1),byrow=TRUE,ncol=3)
M=c(2,2,2)

pS=rep(0.25,12)
Rindex(pS,bS,M)

pS=c(0.125,0.375,0.375,0.125,0.250,0.250,0.250,0.250,0.100,0.400,0.400,0.100)
Rindex(pS,bS,M)

MCARtest documentation built on Oct. 29, 2024, 5:08 p.m.

Related to Rindex in MCARtest...