get_SigmaS {MCARtest} | R Documentation |
Computes the sequence of patterns, means, variances, covariance and correlation matrices for a given dataset with missing values.
Description
Using the same the notation of Bordino and Berrett (2024), computes
the sequence of patterns \mathbb{S}
, means \mu_\mathbb{S}
, variances
\sigma^2_\mathbb{S}
, and correlation matrices \Sigma_\mathbb{S}
for a dataset with missing values.
Usage
get_SigmaS(X)
Arguments
X |
The dataset with incomplete data. |
Value
patterns
The sequence of patterns \mathbb{S}
.
n_pattern
The cardinality of \mathbb{S}
.
data_pattern
A vector where the data are grouped according to \mathbb{S}
.
muS
The sequence of means.
C_S
The sequence of covariance matrices.
sigma_squared_S
The sequence of variances.
SigmaS
The sequence of correlation matrices.
ambient_dimension
The dimension d
of the data.
References
Bordino A, Berrett TB (2024). “Tests of Missing Completely At Random based on sample covariance matrices.” arXiv preprint arXiv:2401.05256.
Examples
library(copula)
library(missMethods)
library(misty)
n = 1000
cp = claytonCopula(param = c(1), dim = 5)
P = mvdc(copula = cp, margins = c("exp", "exp", "exp", "exp", "exp"),
paramMargins = list(list(1), list(1), list(1), list(1), list(1)))
X = rMvdc(n, P)
X = delete_MCAR(X, 0.1, c(1,4,5))
get_SigmaS(X)