Calculate the sample correlation matrix based on the covariance matrix.
Usage
int_cor(
data = NULL,
sigma_cc = NULL,
sigma_rr = NULL,
sigma_cr = NULL,
LatentParam = NULL,
LatentCase = c("U_id_symmetric", "U_id", "General"),
cov = NULL
)Arguments
- data
An
intDataobject containing the macrodata/interval data. Ifcovis not provided butdatais provided, the covariance matrix is calculated based on the the sample covariance of the centers and ranges and the sample covariance between centers and ranges, and the parameters of the latent variables contained in theintDataobject. Ifcovanddataare not provided, the covariance matrix is calculated based onsigma_cc,sigma_rr,sigma_cr,LatentParam, andLatentCase.- sigma_cc
Covariance matrix of the centers.
- sigma_rr
Covariance matrix of the ranges.
- sigma_cr
Covariance matrix between the centers and ranges.
- LatentParam
A list with the parameters of the latent variables. Expects a list with a single number if
LatentCaseis"U_id_symmetric", a list of two numbers ifLatentCaseis"U_id", and a list of two matrices ifLatentCaseis"General", as in:"U_id_symmetric": The latent variables are identically distributed and symmetric, so its parameters are:\(\delta=\mathbb{E}(U^2)/4\)
"U_id": The latent variables are identically distributed, so its parameters are:\(\delta=\mathbb{E}(U^2)/4\)
\(\mathbb{E}(U)\)
"General": The latent variables do not have any nice properties, so its parameters are:\([\boldsymbol{\mathfrak{E}}_{UU}]_{j\ell}=\mathcal{E}(U_j,U_\ell)\), \(j\neq \ell\), with \(\mathcal{E}(U_j,U_\ell)=\int_0^1 F_{U_j}^{-1}(t) F_{U_\ell}^{-1}(t) \, dt\), and \([\boldsymbol{\mathfrak{E}}_{UU}]_{jj}=\mathbb{E}(U_j^2)\), \(j,\ell=1,\dots,p\)
\(\boldsymbol{\Psi}=\text{Diag}(\mathbb{E}(U_1),\dots,\mathbb{E}(U_p))\)
- LatentCase
A string specifying which of the three scenarios applies to the latent variables:
"U_id_symmetric": The case where the latent variables are identically distributed and symmetric."U_id": The case where the latent variables are identically distributed."General": The case where the latent variables do not have any nice properties.
Defaults to
"U_id_symmetric".- cov
Covariance matrix of the interval-valued data. If
covis provided, the correlation matrix is calculated based on it. Ifcovis not provided, the correlation matrix is calculated based on the data or the covariance matrices of the centers and ranges.
Details
This function calculates the correlation matrix based on the covariance matrix using the cov2cor function. The correlation matrix can be calculated either based on the data, the symbolic covariance matrix, or the covariance matrices of the centers and ranges.
For more details, see int_cov.
References
Oliveira, M. R., Pinheiro, D., & Oliveira, L. (2025). Location and association measures for interval-valued data based on Mallows' distance. arXiv preprint arXiv:2407.05105. https://arxiv.org/abs/2407.05105
Examples
data(creditcard)
credit_card_cor <- int_cor(creditcard$intData)