R.test {mvnTest} | R Documentation |
Royston test for Multivariate Normality
Description
This function implements the Royston test for assessing multivariate normality.
Usage
R.test(data, qqplot = FALSE)
Arguments
data |
A numeric matrix or data frame |
qqplot |
if |
Details
Calculates the value of the Royston test and the approximate p-value.
Value
R |
the value of the test statistic |
p.value |
the p-value of the test |
data.name |
a character string giving the name of the data |
Note
The printing method and plotting are in part adapted from R package MVN
(Korkmaz, S. et al., 2015, version 4.0).
Author(s)
Rashid Makarov, Vassilly Voinov, Natalya Pya
References
Royston, P. (1992). Approximating the Shapiro-Wilk W-test for non-normality. Statistics and Computing, 2, 117-119.
See Also
S2.test
, DH.test
,
AD.test
, CM.test
,
HZ.test
Examples
## generating n bivariate normal random variables...
dat <- rmvnorm(n=200,mean=rep(0,2),sigma=matrix(c(4,2,2,4),2,2))
res <- R.test(dat)
res
## generating n bivariate t distributed with 10df random variables...
dat <- rmvt(n=200,sigma=matrix(c(4,2,2,4),2,2)*.8,df=10,delta=rep(0,2))
res1 <- R.test(dat)
res1
data(iris)
setosa = iris[1:50, 1:4] # Iris data only for setosa
res2 <- R.test(setosa, qqplot = TRUE)
res2
[Package mvnTest version 1.1-0 Index]