View source: R/functions_other_mcv_all_one_par.R
e_mcv | R Documentation |
Calculates the estimators with respective (1-α)-confidence intervals for the four different variants of the multivariate coefficients (MCV) and their reciprocals by Reyment (1960), Van Valen (1974), Voinov and Nikulin (1996) and Albert and Zhang (2010).
e_mcv(x, conf_level = 0.95)
x |
a matrix of data of size n\times d. |
conf_level |
a confidence level. By default, it is equal to 0.95. |
The function e_mcv()
calculates four different variants of multivariate coefficient of variation for d-dimensional data. These variant were introduced by
by Reyment (1960, RR), Van Valen (1974, VV), Voinov and Nikulin (1996, VN) and Albert and Zhang (2010, AZ):
{\widehat C}^{RR}=√{\frac{(\det\mathbf{\widehatΣ})^{1/d}}{\boldsymbol{\widehatμ}^{\top}\boldsymbol{\widehatμ}}},\ {\widehat C}^{VV}=√{\frac{\mathrm{tr}\mathbf{\widehatΣ}}{\boldsymbol{\widehatμ}^{\top}\boldsymbol{\widehatμ}}},\ {\widehat C}^{VN}=√{\frac{1}{\boldsymbol{\widehatμ}^{\top}\mathbf{\widehatΣ}^{-1}\boldsymbol{\widehatμ}}},\ {\widehat C}^{AZ}=√{\frac{\boldsymbol{\widehatμ}^{\top}\mathbf{\widehatΣ}\boldsymbol{\widehatμ}}{(\boldsymbol{\widehatμ}^{\top}\boldsymbol{\widehatμ})^2}},
where n is the sample size, \boldsymbol{\widehatμ} is the empirical mean vector and \mathbf{\widehat Σ} is the empirical covariance matrix:
\boldsymbol{\widehatμ}_i = \frac{1}{n}∑_{j=1}^{n} \mathbf{X}_{j},\; \mathbf{\widehat Σ} =\frac{1}{n}∑_{j=1}^{n} (\mathbf{X}_{j} - \boldsymbol{\widehat μ})(\mathbf{X}_{j} - \boldsymbol{\widehat μ})^{\top}.
In the univariate case (d=1), all four variants reduce to coefficient of variation. Furthermore, their reciprocals, the so-called standardized means, are determined:
{\widehat B}^{RR}=√{\frac{\boldsymbol{\widehatμ}^{\top}\boldsymbol{\widehatμ}}{(\det\mathbf{\widehatΣ})^{1/d}}},\ {\widehat B}^{VV}=√{\frac{\boldsymbol{\widehatμ}^{\top}\boldsymbol{\widehatμ}}{\mathrm{tr}\mathbf{\widehatΣ}}},\ {\widehat B}^{VN}=√{\boldsymbol{\widehatμ}^{\top}\mathbf{\widehatΣ}^{-1}\boldsymbol{\widehatμ}},\ {\widehat B}^{AZ}=√{\frac{(\boldsymbol{\widehatμ}^{\top}\boldsymbol{\widehatμ})^2}{\boldsymbol{\widehatμ}^{\top}\mathbf{\widehatΣ}\boldsymbol{\widehatμ}}}.
In addition to the estimators, the respective confidence intervals [C_lwr
, C_upr
] for a given confidence level 1-α are calculated by the e_mcv()
function.
These confidence intervals are based on an asymptotic approximation by a normal distribution, see Ditzhaus and Smaga (2023) for the technical details. These approximations
do not rely on any specific (semi-)parametric assumption on the distribution and are valid nonparametrically, even for tied data.
When d>1 (respectively d=1) a data frame with four rows (one row) corresponding to the four MCVs (the univariate CV)
and six columns containing the estimators C_est
for the MCV (CV) and the estimators B_est
for their reciprocals as well as the upper and lower bounds of the corresponding
confidence intervals [C_lwr
, C_upr
] and [B_lwr
, B_upr
].
Albert A., Zhang L. (2010) A novel definition of the multivariate coefficient of variation. Biometrical Journal 52:667-675.
Ditzhaus M., Smaga L. (2023) Inference for all variants of the multivariate coefficient of variation in factorial designs. Preprint https://arxiv.org/abs/2301.12009.
Reyment R.A. (1960) Studies on Nigerian Upper Cretaceous and Lower Tertiary Ostracoda: part 1. Senonian and Maastrichtian Ostracoda, Stockholm Contributions in Geology, vol 7.
Van Valen L. (1974) Multivariate structural statistics in natural history. Journal of Theoretical Biology 45:235-247.
Voinov V., Nikulin M. (1996) Unbiased Estimators and Their Applications, Vol. 2, Multivariate Case. Kluwer, Dordrecht.
# d > 1 (MCVs) data_set <- lapply(list(iris[iris$Species == "setosa", 1:3], iris[iris$Species == "versicolor", 1:3], iris[iris$Species == "virginica", 1:3]), as.matrix) lapply(data_set, e_mcv) # d = 1 (CV) data_set <- lapply(list(iris[iris$Species == "setosa", 1], iris[iris$Species == "versicolor", 1], iris[iris$Species == "virginica", 1]), as.matrix) lapply(data_set, e_mcv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.