Type: | Package |
Title: | Affine Invariant Tests of Multivariate Normality |
Version: | 1.3 |
Description: | Various affine invariant multivariate normality tests are provided. It is designed to accompany the survey article Ebner, B. and Henze, N. (2020) <doi:10.48550/arXiv.2004.07332> titled "Tests for multivariate normality – a critical review with emphasis on weighted L^2-statistics". We implement new and time honoured L^2-type tests of multivariate normality, such as the Baringhaus-Henze-Epps-Pulley (BHEP) test, the Henze-Zirkler test, the test of Henze-Jiménes-Gamero, the test of Henze-Jiménes-Gamero-Meintanis, the test of Henze-Visage, the Dörr-Ebner-Henze test based on harmonic oscillator and the Dörr-Ebner-Henze test based on a double estimation in a PDE. Secondly, we include the measures of multivariate skewness and kurtosis by Mardia, Koziol, Malkovich and Afifi and Móri, Rohatgi and Székely, as well as the associated tests. Thirdly, we include the tests of multivariate normality by Cox and Small, the 'energy' test of Székely and Rizzo, the tests based on spherical harmonics by Manzotti and Quiroz and the test of Pudelko. All the functions and tests need the data to be a n x d matrix where n is the samplesize (number of rows) and d is the dimension (number of columns). |
License: | CC BY 4.0 |
Encoding: | UTF-8 |
LazyData: | true |
Author: | Lucas Butsch [aut], Bruno Ebner [aut, cre], Jaco Visagie [ctb], Johann Siemens [ctb] |
RoxygenNote: | 7.1.0 |
Imports: | MASS, pracma, utils |
Maintainer: | Bruno Ebner <bruno.ebner@kit.edu> |
Depends: | R (≥ 3.5.0) |
NeedsCompilation: | no |
Packaged: | 2020-07-31 12:42:43 UTC; ebner |
Repository: | CRAN |
Date/Publication: | 2020-07-31 13:20:09 UTC |
Statistic of the BHEP-test
Description
This function returns the value of the statistic of the Baringhaus-Henze-Epps-Pulley (BHEP) test as in Henze and Wagner (1997).
Usage
BHEP(data, a = 1)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
a |
positive numeric number (tuning parameter). |
Details
The test statistic is
BHEP_{n,\beta}=\frac{1}{n} \sum_{j,k=1}^n \exp\left(-\frac{\beta^2\|Y_{n,j}-Y_{n,k}\|^2}{2}\right)- \frac{2}{(1+\beta^2)^{d/2}} \sum_{j=1}^n \exp\left(- \frac{\beta^2\|Y_{n,j}\|^2}{2(1+\beta^2)} \right) + \frac{n}{(1+2\beta^2)^{d/2}}.
Here, Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, j=1,\ldots,n
, are the scaled residuals, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error.
Value
value of the test statistic.
References
Henze, N., and Wagner, T. (1997), A new approach to the class of BHEP tests for multivariate normality, J. Multiv. Anal., 62:1–23, DOI
Epps T.W., Pulley L.B. (1983), A test for normality based on the empirical characteristic function, Biometrika, 70:723-726, DOI
Examples
BHEP(MASS::mvrnorm(50,c(0,1),diag(1,2)))
Statistic of the test of Cox and Small
Description
This function returns the (approximated) value of the test statistic of the test of Cox and Small (1978).
Usage
CS(data, Points = NULL)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
Points |
points for approximation of the maximum on the sphere. |
Details
The test statistic is T_{n,CS}=\max_{b\in\{x\in\mathbf{R}^d:\|x\|=1\}}\eta_n^2(b)
,
where
\eta_n^2(b)=\frac{\left\|n^{-1}\sum_{j=1}^nY_{n,j}(b^\top Y_{n,j})^2\right\|^2-\left(n^{-1}\sum_{j=1}^n(b^\top Y_{n,j})^3\right)^2}{n^{-1}\sum_{j=1}^n(b^\top Y_{n,j})^4-1-\left(n^{-1}\sum_{j=1}^n(b^\top Y_{n,j})^3\right)^2}
.
Here, Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, j=1,\ldots,n
, are the scaled residuals, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error. Note that the maximum functional has to be approximated by a discrete version, for details see Ebner (2012).
Value
approximation of the value of the test statistic of the test of Cox and Small (1978).
References
Cox, D.R. and Small, N.J.H. (1978), Testing multivariate normality, Biometrika, 65:263–272.
Ebner, B. (2012), Asymptotic theory for the test for multivariate normality by Cox and Small, Journal of Multivariate Analysis, 111:368–379.
Examples
CS(MASS::mvrnorm(50,c(0,1),diag(1,2)))
Statistic of the DEH test based on harmonic oscillator
Description
Computes the test statistic of the DEH test.
Usage
DEHT(data, a = 1)
Arguments
data |
a n x d numeric matrix of data values. |
a |
positive numeric number (tuning parameter). |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
The value of the test statistic.
References
Dörr, P., Ebner, B., Henze, N. (2019) "Testing multivariate normality by zeros of the harmonic oscillator in characteristic function spaces" arXiv:1909.12624
Examples
DEHT(MASS::mvrnorm(50,c(0,1),diag(1,2)),a=1)
Statistic of the DEH test based on a double estimation in PDE
Description
Computes the test statistic of the DEH based on a double estimation in PDE test.
Usage
DEHU(data, a)
Arguments
data |
a (d,n) numeric matrix containing the data. |
a |
positive numeric number (tuning parameter). |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
The value of the test statistic.
References
Dörr, P., Ebner, B., Henze, N. (2019) "A new test of multivariate normality by a double estimation in a characterizing PDE" arXiv:1911.10955
Statistic of the EHS test based on a multivariate Stein equation
Description
Computes the test statistic of the EHS test based on a multivariate Stein equation.
Usage
EHS(data, a = 1)
Arguments
data |
a (d,n) numeric matrix containing the data. |
a |
positive numeric number (tuning parameter). |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Note that a=Inf
returns the limiting test statistic with value 2*MSkew + MRSSkew
and a=0
returns the value of the limit statistic
T_{n,0}=\frac{d}{2}-2^{\frac{d}{2}+1}\frac{1}{n}\sum_{j=1}^n\|Y_{n,j}\|^2\exp(-\frac{\|Y_{n,j}\|^2}{2}).
Value
The value of the test statistic.
References
Ebner, B., Henze, N., Strieder, D. (2020) "Testing normality in any dimension by Fourier methods in a multivariate Stein equation" arXiv:2007.02596
Henze-Jiménes-Gamero test statistic
Description
Computes the test statistic of the Henze-Jimenes-Gamero test.
Usage
HJG(data, a = 5)
Arguments
data |
a n x d numeric matrix of data values. |
a |
positive numeric number (tuning parameter). |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error.
Value
The value of the test statistic.
References
Henze, N., Jiménez-Gamero, M.D. (2019) "A new class of tests for multinormality with i.i.d. and garch data based on the empirical moment generating function", TEST, 28, 499-521, DOI
Examples
HJG(MASS::mvrnorm(50,c(0,1),diag(1,2)),a=5)
statistic of the Henze-Jiménes-Gamero-Meintanis test
Description
Computes the test statistic of the Henze-Jiménes-Gamero-Meintanis test.
Usage
HJM(data, a)
Arguments
data |
a n x d numeric matrix of data values. |
a |
positive numeric number (tuning parameter). |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error.
Value
The value of the test statistic.
References
Henze, N., Jiménes-Gamero, M.D., Meintanis, S.G. (2019), Characterizations of multinormality and corresponding tests of fit, including for GARCH models, Econometric Th., 35:510–546, DOI.
Examples
HJM(MASS::mvrnorm(20,c(0,1),diag(1,2)),a=2.5)
statistic of the Henze-Visagie test
Description
Computes the test statistic of the Henze-Visagie test.
Usage
HV(data, a = 5)
Arguments
data |
a n x d numeric matrix of data values. |
a |
numeric number greater than 1 (tuning parameter). |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error.
Note that a=Inf
returns the limiting test statistic with value 2*MSkew + MRSSkew
.
Value
The value of the test statistic.
References
Henze, N., Visagie, J. (2019) "Testing for normality in any dimension based on a partial differential equation involving the moment generating function", to appear in Ann. Inst. Stat. Math., DOI
Examples
HV(MASS::mvrnorm(50,c(0,1),diag(1,2)),a=5)
HV(MASS::mvrnorm(50,c(0,1),diag(1,2)),a=Inf)
Statistic of the Henze-Zirkler test
Description
This function returns the value of the statistic of the BHEP
test as in Henze and Zirkler (1990). The difference to the BHEP
test is in the choice of the tuning parameter \beta
.
Usage
HZ(data)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
Details
A BHEP
test is performed with tuning parameter \beta
chosen in dependence of the sample size n and the dimension d, namely
\beta=\frac{((2d+1)n/4)^(1/(d+4))}{\sqrt{2}}.
Value
value of the test statistic.
References
Henze, N., and Zirkler, B. (1990), A class of invariant consistent tests for multivariate normality, Commun.-Statist. – Th. Meth., 19:3595–3617, DOI
See Also
Examples
HZ(MASS::mvrnorm(50,c(0,1),diag(1,2)))
Koziols measure of multivariate sample kurtosis
Description
This function computes the invariant measure of multivariate sample kurtosis due to Koziol (1989).
Usage
KKurt(data)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
Details
Multivariate sample kurtosis due to Koziol (1989) is defined by
\widetilde{b}_{n,d}^{(2)}=\frac{1}{n^2}\sum_{j,k=1}^n(Y_{n,j}^\top Y_{n,k})^4,
where Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, j=1,\ldots,n
, are the scaled residuals, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error. Note that for d=1
, we have a measure proportional to the squared sample kurtosis.
Value
value of sample kurtosis in the sense of Koziol.
References
Koziol, J.A. (1989), A note on measures of multivariate kurtosis, Biom. J., 31:619–624.
Examples
KKurt(MASS::mvrnorm(50,c(0,1),diag(1,2)))
multivariate kurtosis in the sense of Malkovich and Afifi
Description
This function computes the invariant measure of multivariate sample kurtosis due to Malkovich and Afifi (1973).
Usage
MAKurt(data, Points = NULL)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
Points |
points for approximation of the maximum on the sphere. |
Details
Multivariate sample skewness due to Malkovich and Afifi (1973) is defined by
b_{n,d,M}^{(1)}=\max_{u\in \{x\in\mathbf{R}^d:\|x\|=1\}}\frac{\left(\frac{1}{n}\sum_{j=1}^n(u^\top X_j-u^\top \overline{X}_n )^3\right)^2}{(u^\top S_n u)^3},
where \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error.
Value
value of sample kurtosis in the sense of Malkovich and Afifi.
References
Malkovich, J.F., and Afifi, A.A. (1973), On tests for multivariate normality, J. Amer. Statist. Ass., 68:176–179.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467–506.
Examples
MAKurt(MASS::mvrnorm(50,c(0,1),diag(1,2)))
multivariate skewness in the sense of Malkovich and Afifi
Description
This function computes the invariant measure of multivariate sample skewness due to Malkovich and Afifi (1973).
Usage
MASkew(data, Points = NULL)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
Points |
points for approximation of the maximum on the sphere. |
Details
Multivariate sample skewness due to Malkovich and Afifi (1973) is defined by
b_{n,d,M}^{(1)}=\max_{u\in \{x\in\mathbf{R}^d:\|x\|=1\}}\frac{\left(\frac{1}{n}\sum_{j=1}^n(u^\top X_j-u^\top \overline{X}_n )^3\right)^2}{(u^\top S_n u)^3},
where \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error.
Value
value of sample skewness in the sense of Malkovich and Afifi.
References
Malkovich, J.F., and Afifi, A.A. (1973), On tests for multivariate normality, J. Amer. Statist. Ass., 68:176–179.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467–506.
Examples
MASkew(MASS::mvrnorm(50,c(0,1),diag(1,2)))
Mardias measure of multivariate sample kurtosis
Description
This function computes the classical invariant measure of multivariate sample kurtosis due to Mardia (1970).
Usage
MKurt(data)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
Details
Multivariate sample kurtosis due to Mardia (1970) is defined by
b_{n,d}^{(2)}=\frac{1}{n}\sum_{j=1}^n\|Y_{n,j}\|^4,
where Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
.To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error.
Value
value of sample kurtosis in the sense of Mardia.
References
Mardia, K.V. (1970), Measures of multivariate skewness and kurtosis with applications, Biometrika, 57:519–530.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467–506.
Examples
MKurt(MASS::mvrnorm(50,c(0,1),diag(1,2)))
first statistic of Manzotti and Quiroz
Description
This function returns the value of the first statistic of Manzotti and Quiroz (2001).
Usage
MQ1(data)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
Value
Value of the test statistic
References
Manzotti, A., and Quiroz, A.J. (2001), Spherical harmonics in quadratic forms for testing multivariate normality, Test, 10:87–104, DOI
Examples
MQ1(MASS::mvrnorm(50,c(0,1),diag(1,2)))
second statistic of Manzotti und Quiroz
Description
This function returns the value of the second statistic of Manzotti und Quiroz (2001).
Usage
MQ2(data)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
Value
Value of the test statistic
References
Manzotti, A., and Quiroz, A.J. (2001), Spherical harmonics in quadratic forms for testing multivariate normality, Test, 10:87–104, DOI
Examples
MQ2(MASS::mvrnorm(50,c(0,1),diag(1,2)))
multivariate skewness of Móri, Rohatgi and Székely
Description
This function computes the invariant measure of multivariate sample skewness due to Móri, Rohatgi and Székely (1993).
Usage
MRSSkew(data)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
Details
Multivariate sample skewness due to Móri, Rohatgi and Székely (1993) is defined by
\widetilde{b}_{n,d}^{(1)}=\frac{1}{n}\sum_{j=1}^n\|Y_{n,j}\|^2\|Y_{n,k}\|^2Y_{n,j}^\top Y_{n,k},
where Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error. Note that for d=1
, it is equivalent to skewness in the sense of Mardia.
Value
value of sample skewness in the sense of Móri, Rohatgi and Székely.
References
Móri, T. F., Rohatgi, V. K., Székely, G. J. (1993), On multivariate skewness and kurtosis, Theory of Probability and its Applications, 38:547–551.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467–506.
Mardias measure of multivariate sample skewness
Description
This function computes the classical invariant measure of multivariate sample skewness due to Mardia (1970).
Usage
MSkew(data)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
Details
Multivariate sample skewness due to Mardia (1970) is defined by
b_{n,d}^{(1)}=\frac{1}{n^2}\sum_{j,k=1}^n(Y_{n,j}^\top Y_{n,k})^3,
where Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the function returns an error. Note that for d=1
, we have a measure proportional to the squared sample skewness.
Value
value of sample skewness in the sense of Mardia.
References
Mardia, K.V. (1970), Measures of multivariate skewness and kurtosis with applications, Biometrika, 57:519–530.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467–506.
Examples
MSkew(MASS::mvrnorm(50,c(0,1),diag(1,2)))
Statistic of the Pudelko test
Description
Approximates the test statistic of the Pudelko test.
Usage
PU(data, r = 2)
Arguments
data |
a n x d numeric matrix of data values. |
r |
a positive number (radius of Ball) |
Details
This functions evaluates the test statistic with the given data and the specified parameter r
. Since since one has to calculate the supremum of a function inside a d-dimensional Ball of radius r
. In this implementation the optim
function is used.
Value
approximate Value of the test statistic
References
Pudelko, J. (2005), On a new affine invariant and consistent test for multivariate normality, Probab. Math. Statist., 25:43–54.
Examples
PU(MASS::mvrnorm(20,c(0,1),diag(1,2)),r=2)
Simulated empirical 90% quantiles of the tests contained in package mnt
Description
A dataset containing the empirical 0.9 quantiles of the tests for the dimensions d=2,3,5
and samplesizes n=20,50,100
based on a Monte Carlo Simulation study with 100000 repetitions. The following parameters were used:
For
BHEP
the parametera=1
,for
HV
the parametera=5
,for
HJG
the parametera=1.5
,for
HJM
the parametera=1.5
,for
DEHT
the parametera=0.25
,for
DEHU
the parametera=0.5
,for
CS
the parameterPoints=NULL
,for
PU
the parameterr=2
,for
MASkew
the parameterPoints=NULL
,for
MAKurt
the parameterPoints=NULL
,
Usage
Quantile09
Format
A data frame with 9 rows and 20 columns.
Simulated empirical 95% quantiles of the tests contained in package mnt
Description
A dataset containing the empirical 0.95 quantiles of the tests for the dimensions d=2,3,5
and samplesizes n=20,50,100
based on a Monte Carlo Simulation study with 100000 repetitions. The following parameters were used:
For
BHEP
the parametera=1
,for
HV
the parametera=5
,for
HJG
the parametera=1.5
,for
HJM
the parametera=1.5
,for
DEHT
the parametera=0.25
,for
DEHU
the parametera=0.5
,for
CS
the parameterPoints=NULL
,for
PU
the parameterr=2
,for
MASkew
the parameterPoints=NULL
,for
MAKurt
the parameterPoints=NULL
,
Usage
Quantile095
Format
A data frame with 9 rows and 20 columns.
Simulated empirical 99% quantiles of the tests contained in package mnt
Description
A dataset containing the empirical 0.99 quantiles of the tests for the dimensions d=2,3,5
and samplesizes n=20,50,100
based on a Monte Carlo Simulation study with 100000 repetitions. The following parameters were used:
For
BHEP
the parametera=1
,for
HV
the parametera=5
,for
HJG
the parametera=1.5
,for
HJM
the parametera=1.5
,for
DEHT
the parametera=0.25
,for
DEHU
the parametera=0.5
,for
CS
the parameterPoints=NULL
,for
PU
the parameterr=2
,for
MASkew
the parameterPoints=NULL
,for
MAKurt
the parameterPoints=NULL
,
Usage
Quantile099
Format
A data frame with 9 rows and 20 columns.
statistic of the Székely-Rizzo test
Description
This function returns the value of the statistic of the test of multivariate normality (also called energy test) as in Székely and Rizzo (2005). Note that the scaled residuals use another scaling in the estimator of the covariance matrix as the other functions of the package mnt
!
It is equivalent to the function mvnorm.e
.
Usage
SR(data, abb = 1e-08)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
abb |
Stop criterium. |
Value
value of the test statistic.
References
Székely, G., and Rizzo, M. (2005), A new test for multivariate normality, J. Multiv. Anal., 93:58–80, DOI
See Also
Examples
SR(MASS::mvrnorm(50,c(0,1),diag(1,2)))
Monte Carlo simulation of quantiles for normality tests
Description
This function returns the quantiles of a test statistic with optional tuning parameter.
Usage
cv.quan(
samplesize,
dimension,
quantile,
statistic,
tuning = NULL,
repetitions = 1e+05
)
Arguments
samplesize |
samplesize for which the empirical quantile should be calculated. |
dimension |
a natural number to specify the dimension of the multivariate normal distribution |
quantile |
a number between 0 and 1 to specify the quantile of the empirical distribution of the considered test |
statistic |
a function specifying the test statistic. |
tuning |
the tuning parameter of the test statistic. |
repetitions |
number of Monte Carlo runs. |
Value
empirical quantile of the test statistic.
Examples
cv.quan(samplesize=10, dimension=2,quantile=0.95, statistic=BHEP, tuning=2.5, repetitions=1000)
Print method for tests of multivariate normality
Description
Printing objects of class "mnt".
Usage
## S3 method for class 'mnt'
print(x, ...)
Arguments
x |
object of class "mnt". |
... |
further arguments to be passed to or from methods. |
Details
A mnt
object is a named list of numbers and character string, supplemented with test
(the name of the teststatistic). test
is displayed as a title.
The remaining elements are given in an aligned "name = value" format.
Value
the argument x, invisibly, as for all print methods.
Examples
print(test.DEHU(MASS::mvrnorm(50,c(0,1),diag(1,2)),a=1,MC=500))
Empirical scaled residuals
Description
A function that computes the scaled residuals of the data.
Usage
standard(data)
Arguments
data |
a n x d matrix of d dimensional data vectors.. |
Value
A n x d matrix of the scaled residuals.
Baringhaus-Henze-Epps-Pulley (BHEP) test
Description
Performs the BHEP test of multivariate normality as suggested in Henze and Wagner (1997) using a tuning parameter a
.
Usage
test.BHEP(data, a = 1, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
a |
positive numeric number (tuning parameter). |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
Details
The test statistic is
BHEP_{n,\beta}=\frac{1}{n} \sum_{j,k=1}^n \exp\left(-\frac{\beta^2\|Y_{n,j}-Y_{n,k}\|^2}{2}\right)- \frac{2}{(1+\beta^2)^{d/2}} \sum_{j=1}^n \exp\left(- \frac{\beta^2\|Y_{n,j}\|^2}{2(1+\beta^2)} \right) + \frac{n}{(1+2\beta^2)^{d/2}}.
Here, Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, j=1,\ldots,n
, are the scaled residuals, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
value tuning parameter.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
#'
References
Henze, N., Wagner, T. (1997), A new approach to the class of BHEP tests for multivariate normality, J. Multiv. Anal., 62:1-23, DOI
See Also
Examples
test.BHEP(MASS::mvrnorm(50,c(0,1),diag(1,2)),MC.rep=500)
multivariate normality test of Cox and Small
Description
Performs the test of multivariate normality of Cox and Small (1978).
Usage
test.CS(data, MC.rep = 1000, alpha = 0.05, Points = NULL)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value. |
alpha |
level of significance of the test. |
Points |
number of points to approximate the maximum functional on the unit sphere. |
Details
The test statistic is T_{n,CS}=\max_{b\in\{x\in\mathbf{R}^d:\|x\|=1\}}\eta_n^2(b)
,
where
\eta_n^2(b)=\frac{\left\|n^{-1}\sum_{j=1}^nY_{n,j}(b^\top Y_{n,j})^2\right\|^2-\left(n^{-1}\sum_{j=1}^n(b^\top Y_{n,j})^3\right)^2}{n^{-1}\sum_{j=1}^n(b^\top Y_{n,j})^4-1-\left(n^{-1}\sum_{j=1}^n(b^\top Y_{n,j})^3\right)^2}
.
Here, Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, j=1,\ldots,n
, are the scaled residuals, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error. Note that the maximum functional has to be approximated by a discrete version, for details see Ebner (2012).
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
#'
References
Cox, D.R., Small, N.J.H. (1978), Testing multivariate normality, Biometrika, 65:263-272.
Ebner, B. (2012), Asymptotic theory for the test for multivariate normality by Cox and Small, Journal of Multivariate Analysis, 111:368-379.
See Also
Examples
test.CS(MASS::mvrnorm(10,c(0,1),diag(1,2)),MC.rep=100)
Doerr-Ebner-Henze test of multivariate normality based on harmonic oscillator
Description
Computes the multivariate normality test of Doerr, Ebner and Henze (2019) based on zeros of the harmonic oscillator.
Usage
test.DEHT(data, a = 1, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
a |
positive numeric number (tuning parameter). |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value. |
alpha |
level of significance of the test. |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
value tuning parameter.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Doerr, P., Ebner, B., Henze, N. (2019) "Testing multivariate normality by zeros of the harmonic oscillator in characteristic function spaces" arXiv:1909.12624
See Also
Examples
test.DEHT(MASS::mvrnorm(20,c(0,1),diag(1,2)),a=1,MC=500)
Doerr-Ebner-Henze test of multivariate normality based on a double estimation in a PDE
Description
Computes the multivariate normality test of Doerr, Ebner and Henze (2019) based on a double estimation in a PDE.
Usage
test.DEHU(data, a = 0.5, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
a |
positive numeric number (tuning parameter). |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value. |
alpha |
level of significance of the test. |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
value tuning parameter.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Doerr, P., Ebner, B., Henze, N. (2019) "Testing multivariate normality by zeros of the harmonic oscillator in characteristic function spaces" arXiv:1909.12624
See Also
Examples
test.DEHU(MASS::mvrnorm(50,c(0,1),diag(1,2)),a=1,MC=500)
Ebner-Henze-Strieder test of multivariate normality based on Fourier methods in a multivariate Stein equation
Description
Computes the multivariate normality test of Ebner, Henze and Strieder (2020) based on Fourier methods in a multivariate Stein equation.
Usage
test.EHS(data, a = 0.5, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
a |
positive numeric number (tuning parameter). |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value. |
alpha |
level of significance of the test. |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
value tuning parameter.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Ebner, B., Henze, N., Strieder, D. (2020) "Testing normality in any dimension by Fourier methods in a multivariate Stein equation" arXiv:2007.02596
See Also
Examples
test.EHS(MASS::mvrnorm(50,c(0,1),diag(1,2)),a=1,MC=500)
Henze-Jimenes-Gamero test of multivariate normality
Description
Computes the multivariate normality test of Henze and Jimenes-Gamero (2019) in dependence of a tuning parameter a
.
Usage
test.HJG(data, a = 1, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
a |
positive numeric number (tuning parameter). |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value. |
alpha |
level of significance of the test. |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
value tuning parameter.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
#'
References
Henze, N., Jimenez-Gamero, M.D. (2019) "A new class of tests for multinormality with i.i.d. and garch data based on the empirical moment generating function", TEST, 28, 499-521, DOI
See Also
Examples
test.HJG(MASS::mvrnorm(50,c(0,1),diag(1,2)),a=1.5,MC.rep=500)
Henze-Jimenes-Gamero-Meintanis test of multivariate normality
Description
Computes the test statistic of the Henze-Jimenes-Gamero-Meintanis test.
Usage
test.HJM(data, a = 1.5, MC.rep = 500, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
a |
positive numeric number (tuning parameter). |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value. |
alpha |
level of significance of the test. |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
value tuning parameter.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Henze, N., Jimenes-Gamero, M.D., Meintanis, S.G. (2019), Characterizations of multinormality and corresponding tests of fit, including for GARCH models, Econometric Th., 35:510-546, DOI.
See Also
Examples
test.HJM(MASS::mvrnorm(10,c(0,1),diag(1,2)),a=2.5,MC=100)
The Henze-Visagie test of multivariate normality
Description
Computes the multivariate normality test of Henze and Visagie (2019).
Usage
test.HV(data, a = 5, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
a |
positive numeric number (tuning parameter). |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value. |
alpha |
level of significance of the test. |
Details
This functions evaluates the teststatistic with the given data and the specified tuning parameter a
.
Each row of the data Matrix contains one of the n (multivariate) sample with dimension d. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Note that a=Inf
returns the limiting test statistic with value 2*MSkew + MRSSkew
.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
value tuning parameter.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Henze, N., Visagie, J. (2019) "Testing for normality in any dimension based on a partial differential equation involving the moment generating function", to appear in Ann. Inst. Stat. Math., DOI
See Also
Examples
test.HV(MASS::mvrnorm(50,c(0,1),diag(1,2)),a=5,MC.rep=500)
test.HV(MASS::mvrnorm(50,c(0,1),diag(1,2)),a=Inf,MC.rep=500)
The Henze-Zirkler test
Description
Performs the test of multivariate normality of Henze and Zirkler (1990).
Usage
test.HZ(data, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
Details
A BHEP
test is performed with tuning parameter \beta
chosen in dependence of the sample size n and the dimension d, namely
\beta=\frac{((2d+1)n/4)^(1/(d+4))}{\sqrt{2}}.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
value tuning parameter.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
#'
References
Henze, N., Zirkler, B. (1990), A class of invariant consistent tests for multivariate normality, Commun.-Statist. - Th. Meth., 19:3595-3617, DOI
See Also
Examples
test.HZ(MASS::mvrnorm(50,c(0,1),diag(1,2)),MC.rep=500)
Test of normality based on Koziols measure of multivariate sample kurtosis
Description
Computes the multivariate normality test based on the invariant measure of multivariate sample kurtosis due to Koziol (1989).
Usage
test.KKurt(data, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
Details
Multivariate sample kurtosis due to Koziol (1989) is defined by
\widetilde{b}_{n,d}^{(2)}=\frac{1}{n^2}\sum_{j,k=1}^n(Y_{n,j}^\top Y_{n,k})^4,
where Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, j=1,\ldots,n
, are the scaled residuals, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error. Note that for d=1
, we have a measure proportional to the squared sample kurtosis.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Koziol, J.A. (1989), A note on measures of multivariate kurtosis, Biom. J., 31:619-624.
See Also
Examples
test.KKurt(MASS::mvrnorm(50,c(0,1),diag(1,2)),MC.rep=500)
Test of normality based on multivariate kurtosis in the sense of Malkovich and Afifi
Description
Computes the multivariate normality test based on the invariant measure of multivariate sample kurtosis due to Malkovich and Afifi (1973).
Usage
test.MAKurt(data, MC.rep = 10000, alpha = 0.05, num.points = 1000)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
num.points |
number of points distributed uniformly over the sphere for approximation of the maximum on the sphere. |
Details
Multivariate sample skewness due to Malkovich and Afifi (1973) is defined by
b_{n,d,M}^{(1)}=\max_{u\in \{x\in\mathbf{R}^d:\|x\|=1\}}\frac{\left(\frac{1}{n}\sum_{j=1}^n(u^\top X_j-u^\top \overline{X}_n )^3\right)^2}{(u^\top S_n u)^3},
where \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
number of points used in approximation.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Malkovich, J.F., and Afifi, A.A. (1973), On tests for multivariate normality, J. Amer. Statist. Ass., 68:176-179.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467-506.
See Also
Examples
test.MAKurt(MASS::mvrnorm(10,c(0,1),diag(1,2)),MC.rep=100)
Test of normality based on multivariate skewness in the sense of Malkovich and Afifi
Description
Computes the test of multivariate normality based on skewness in the sense of Malkovich and Afifi (1973).
Usage
test.MASkew(data, MC.rep = 10000, alpha = 0.05, num.points = 1000)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
num.points |
number of points distributed uniformly over the sphere for approximation of the maximum on the sphere. |
Details
Multivariate sample skewness due to Malkovich and Afifi (1973) is defined by
b_{n,d,M}^{(1)}=\max_{u\in \{x\in\mathbf{R}^d:\|x\|=1\}}\frac{\left(\frac{1}{n}\sum_{j=1}^n(u^\top X_j-u^\top \overline{X}_n )^3\right)^2}{(u^\top S_n u)^3},
where \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
number of points used in approximation.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Malkovich, J.F., and Afifi, A.A. (1973), On tests for multivariate normality, J. Amer. Statist. Ass., 68:176-179.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467-506.
See Also
Examples
test.MASkew(MASS::mvrnorm(10,c(0,1),diag(1,2)),MC.rep=100)
Test of normality based on Mardias measure of multivariate sample kurtosis
Description
Computes the multivariate normality test based on the classical invariant measure of multivariate sample kurtosis due to Mardia (1970).
Usage
test.MKurt(data, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
Details
Multivariate sample kurtosis due to Mardia (1970) is defined by
b_{n,d}^{(2)}=\frac{1}{n}\sum_{j=1}^n\|Y_{n,j}\|^4,
where Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
.To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Mardia, K.V. (1970), Measures of multivariate skewness and kurtosis with applications, Biometrika, 57:519-530.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467-506.
See Also
Examples
test.MKurt(MASS::mvrnorm(50,c(0,1),diag(1,2)),MC.rep=500)
Manzotti-Quiroz test 1
Description
Performs the first test of multivariate normality of Manzotti and Quiroz (2001).
Usage
test.MQ1(data, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
value tuning parameter.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
#'
References
Manzotti, A., Quiroz, A.J. (2001), Spherical harmonics in quadratic forms for testing multivariate normality, Test, 10:87-104, DOI
See Also
Examples
test.MQ1(MASS::mvrnorm(50,c(0,1),diag(1,2)),MC.rep=100)
Manzotti-Quiroz test 2
Description
Performs the second test of multivariate normality of Manzotti and Quiroz (2001).
Usage
test.MQ2(data, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
#'
References
Manzotti, A., Quiroz, A.J. (2001), Spherical harmonics in quadratic forms for testing multivariate normality, Test, 10:87-104, DOI
See Also
Examples
test.MQ2(MASS::mvrnorm(50,c(0,1),diag(1,2)),MC.rep=500)
Test of multivariate normality based on the measure of multivariate skewness of Mori, Rohatgi and Szekely
Description
Computes the multivariate normality test based on the invariant measure of multivariate sample skewness due to Mori, Rohatgi and Szekely (1993).
Usage
test.MRSSkew(data, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
Details
Multivariate sample skewness due to Mori, Rohatgi and Szekely (1993) is defined by
\widetilde{b}_{n,d}^{(1)}=\frac{1}{n}\sum_{j=1}^n\|Y_{n,j}\|^2\|Y_{n,k}\|^2Y_{n,j}^\top Y_{n,k},
where Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error. Note that for d=1
, it is equivalent to skewness in the sense of Mardia.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Mori, T. F., Rohatgi, V. K., Szekely, G. J. (1993), On multivariate skewness and kurtosis, Theory of Probability and its Applications, 38:547-551.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467-506.
See Also
Examples
test.MRSSkew(MASS::mvrnorm(50,c(0,1),diag(1,2)),MC.rep=500)
Test of normality based on Mardias measure of multivariate sample skewness
Description
Computes the multivariate normality test based on the classical invariant measure of multivariate sample skewness due to Mardia (1970).
Usage
test.MSkew(data, MC.rep = 10000, alpha = 0.05)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
Details
Multivariate sample skewness due to Mardia (1970) is defined by
b_{n,d}^{(1)}=\frac{1}{n^2}\sum_{j,k=1}^n(Y_{n,j}^\top Y_{n,k})^3,
where Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)
, \overline{X}_n
is the sample mean and S_n
is the sample covariance matrix of the random vectors X_1,\ldots,X_n
. To ensure that the computation works properly
n \ge d+1
is needed. If that is not the case the test returns an error. Note that for d=1
, we have a measure proportional to the squared sample skewness.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Mardia, K.V. (1970), Measures of multivariate skewness and kurtosis with applications, Biometrika, 57:519-530.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467-506.
See Also
Examples
test.MSkew(MASS::mvrnorm(50,c(0,1),diag(1,2)),MC.rep=500)
Pudelko test of multivariate normality
Description
Computes the (approximated) Pudelko test of multivariate normality.
Usage
test.PU(data, MC.rep = 10000, alpha = 0.05, r = 2)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value. |
alpha |
level of significance of the test. |
r |
a positive number (radius of Ball) |
Details
This functions evaluates the test statistic with the given data and the specified parameter r
. Since since one has to calculate the supremum of a function inside a d-dimensional Ball of radius r
. In this implementation the optim
function is used.
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$param
value tuning parameter.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
References
Pudelko, J. (2005), On a new affine invariant and consistent test for multivariate normality, Probab. Math. Statist., 25:43-54.
See Also
Examples
test.PU(MASS::mvrnorm(20,c(0,1),diag(1,2)),r=2,MC=100)
Szekely-Rizzo (energy) test
Description
Performs the test of multivariate normality of Szekely and Rizzo (2005). Note that the scaled residuals use another scaling in the estimator of the covariance matrix!
Usage
test.SR(data, MC.rep = 10000, alpha = 0.05, abb = 1e-08)
Arguments
data |
a n x d matrix of d dimensional data vectors. |
MC.rep |
number of repetitions for the Monte Carlo simulation of the critical value |
alpha |
level of significance of the test |
abb |
Stop criterium. |
Value
a list containing the value of the test statistic, the approximated critical value and a test decision on the significance level alpha
:
$Test
name of the test.
$Test.value
the value of the test statistic.
$cv
the approximated critical value.
$Decision
the comparison of the critical value and the value of the test statistic.
#'
References
Szekely, G., Rizzo, M. (2005), A new test for multivariate normality, J. Multiv. Anal., 93:58-80, DOI
See Also
Examples
test.SR(MASS::mvrnorm(50,c(0,1),diag(1,2)),MC.rep=500)