Rindex: A function computing the incompatibility index
Description
A function solving a linear program to compute the incompatibility index \(R()\) defined in BS2022;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)
Value
The value of \(R()\), in the interval \([0,1]\).
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.