Norm Test
Norm Test
Norm Test
R topics documented:
ajb.norm.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
frosini.norm.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
geary.norm.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
hegazy1.norm.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
hegazy2.norm.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
jb.norm.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
kurtosis.norm.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
skewness.norm.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
spiegelhalter.norm.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
wb.norm.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Index 14
1
2 ajb.norm.test
Description
Performs adjusted Jarque–Bera test for the composite hypothesis of normality, see Urzua (1996).
Usage
ajb.norm.test(x, nrepl=2000)
Arguments
x a numeric vector of data values.
nrepl the number of replications in Monte Carlo simulation.
Details
The adjusted Jarque–Bera test for normality is based on the following statistic:
√
( b1 )2 (b − E (b2 ))2
AJB = √ + 2 ,
Var b1 Var (b2 )
where Pn Pn
1 1
p
n − X)3
i=1 (Xi n i=1 (Xi − X)
4
b1 = , b2 = ,
2 3/2 2 2
1
Pn 1
Pn
n i=1 (Xi − X) n i=1 (X i − X)
p 6(n − 2) 3(n − 1) 24n(n − 2)(n − 3)
Var b1 = , E (b2 ) = , Var (b2 ) = .
(n + 1)(n + 3) n+1 (n + 1)2 (n + 3)(n + 5)
The p-value is computed by Monte Carlo simulation.
Value
A list with class "htest" containing the following components:
statistic the value of the adjusted Jarque–Bera statistic.
p.value the p-value for the test.
method the character string "Adjusted Jarque-Bera test for normality".
data.name a character string giving the name(s) of the data.
Author(s)
Ilya Gavrilov and Ruslan Pusev
References
Urzua, C. M. (1996): On the correct use of omnibus tests for normality. — Economics Letters, vol.
53, pp. 247–251.
frosini.norm.test 3
Examples
ajb.norm.test(rnorm(100))
ajb.norm.test(abs(runif(100,-2,5)))
Description
Performs Frosini test for the composite hypothesis of normality, see e.g. Frosini (1987).
Usage
frosini.norm.test(x, nrepl=2000)
Arguments
x a numeric vector of data values.
nrepl the number of replications in Monte Carlo simulation.
Details
The Frosini test for normality is based on the following statistic:
n
1 X i − 0.5
Bn = √ Φ(Yi ) − ,
n i=1 n
where
n
X(i) − X 1X
Yi = , s2 = (Xi − X)2 .
s n i=1
Value
A list with class "htest" containing the following components:
Author(s)
Ilya Gavrilov and Ruslan Pusev
4 geary.norm.test
References
Frosini, B.V. (1987): On the distribution and power of a goodness-of-fit statistic with parametric
and nonparametric applications, "Goodness-of-fit". (Ed. by Revesz P., Sarkadi K., Sen P.K.) —
Amsterdam-Oxford-New York: North-Holland. — Pp. 133–154.
Examples
frosini.norm.test(rnorm(100))
frosini.norm.test(runif(100,-1,1))
Description
Performs Geary test for the composite hypothesis of normality, see Geary (1935).
Usage
geary.norm.test(x, nrepl=2000)
Arguments
x a numeric vector of data values.
nrepl the number of replications in Monte Carlo simulation.
Details
The Geary test for normality is based on the following statistic:
n
1 X
d= |Xi − X|,
ns i=1
where
n
1X
s2 = (Xi − X)2 .
n i=1
The p-value is computed by Monte Carlo simulation.
Value
A list with class "htest" containing the following components:
statistic the value of the Geary statistic.
p.value the p-value for the test.
method the character string "Geary test for normality".
data.name a character string giving the name(s) of the data.
hegazy1.norm.test 5
Author(s)
References
Geary, R. C. (1935): The ratio of the mean deviation to the standard deviation as a test of normality.
— Biometrika, vol. 27, pp. 310–332.
Examples
geary.norm.test(rnorm(100))
geary.norm.test(runif(100,-1,1))
Description
Performs Hegazy–Green test for the composite hypothesis of normality, see e.g. Hegazy and Green
(1975).
Usage
hegazy1.norm.test(x, nrepl=2000)
Arguments
Details
where
n
X(i) − X 1X
Yi = , s2 = (Xi − X)2 .
s n i=1
Value
Author(s)
References
Hegazy, Y. A. S. and Green, J. R. (1975): Some new goodness-of-fit tests using order statistics. —
Journal of the Royal Statistical Society. Series C (Applied Statistics), vol. 24, pp. 299–308.
Examples
hegazy1.norm.test(rnorm(100))
hegazy1.norm.test(runif(100,-1,1))
Description
Performs Hegazy–Green test for the composite hypothesis of normality, see e.g. Hegazy and Green
(1975).
Usage
hegazy2.norm.test(x, nrepl=2000)
Arguments
Details
The Hegazy–Green test for normality is based on the following statistic:
n 2
1X −1 i
T2 = Yi − Φ .
n i=1 n+1
where
n
X(i) − X 1X
Yi = , s2 = (Xi − X)2 .
s n i=1
Value
A list with class "htest" containing the following components:
Author(s)
Gavrilov Ilya and Ruslan Pusev
References
Hegazy, Y. A. S. and Green, J. R. (1975): Some new goodness-of-fit tests using order statistics. —
Journal of the Royal Statistical Society. Series C (Applied Statistics), vol. 24, pp. 299–308.
Examples
hegazy2.norm.test(rnorm(100))
hegazy2.norm.test(runif(100,-1,1))
Description
Performs Jarque–Bera test for the composite hypothesis of normality, see Jarque and Bera (1987).
Usage
jb.norm.test(x, nrepl=2000)
8 jb.norm.test
Arguments
Details
(b2 − 3)2
p
n 2
JB = ( b1 ) + ,
6 4
where
1
Pn 3
n i=1 (Xi − X)
b1 = 1
P n 2 3/2
,
n( i=1 (Xi − X) )
1
Pn 4
n i=1 (Xi − X)
b2 = 1
Pn 2 2
.
n( i=1 (Xi − X) )
Value
Author(s)
References
Jarque, C. M. and Bera, A. K. (1987): A test for normality of observations and regression residuals.
— International Statistical Review, vol. 55, pp. 163–172.
Examples
jb.norm.test(rnorm(100))
jb.norm.test(abs(runif(100,-2,5)))
kurtosis.norm.test 9
Description
Performs kurtosis test for the composite hypothesis of normality, see, e.g., Shapiro, Wilk and Chen
(1968).
Usage
kurtosis.norm.test(x, nrepl=2000)
Arguments
x a numeric vector of data values.
nrepl the number of replications in Monte Carlo simulation.
Details
The kurtosis test for normality is based on the following statistic:
1
Pn 4
n i=1 (Xi − X)
b2 = ,
1 n 2 2
P
n i=1 (Xi − X)
Value
A list with class "htest" containing the following components:
statistic the value of the test statistic.
p.value the p-value for the test.
method the character string "Kurtosis test for normality".
data.name a character string giving the name(s) of the data.
Author(s)
Ilya Gavrilov and Ruslan Pusev
References
Shapiro, S. S., Wilk, M. B. and Chen, H. J. (1968): A comparative study of various tests for nor-
mality. — Journal of the American Statistical Association, vol. 63, pp. 1343–1372.
Examples
kurtosis.norm.test(rnorm(100))
kurtosis.norm.test(runif(100,-1,1))
10 skewness.norm.test
Description
Performs skewness test for the composite hypothesis of normality, see, e.g., Shapiro, Wilk and Chen
(1968).
Usage
skewness.norm.test(x, nrepl=2000)
Arguments
x a numeric vector of data values.
nrepl the number of replications in Monte Carlo simulation.
Details
The skewness test for normality is based on the sample skewness:
1
Pn 3
i=1 (Xi − X)
p
n
b1 = ,
2 3/2
1
Pn
n i=1 (Xi − X)
Value
A list with class "htest" containing the following components:
statistic the value of the sample skewness.
p.value the p-value for the test.
method the character string "Skewness test for normality".
data.name a character string giving the name(s) of the data.
Author(s)
Ilya Gavrilov and Ruslan Pusev
References
Shapiro, S. S., Wilk, M. B. and Chen, H. J. (1968): A comparative study of various tests for nor-
mality. — Journal of the American Statistical Association, vol. 63, pp. 1343–1372.
Examples
skewness.norm.test(rnorm(100))
skewness.norm.test(abs(runif(100,-2,5)))
spiegelhalter.norm.test 11
spiegelhalter.norm.test
Spiegelhalter test for normality
Description
Performs Spiegelhalter test for the composite hypothesis of normality, see Spiegelhalter (1977).
Usage
spiegelhalter.norm.test(x, nrepl=2000)
Arguments
x a numeric vector of data values.
nrepl the number of replications in Monte Carlo simulation.
Details
The Spiegelhalter test for normality is based on the following statistic:
1/(n−1)
T = (cn u)−(n−1) + g −(n−1) ,
where
Pn n
X(n) − X(1) |Xi − X| (n!)1/(n−1) 1 X
u= , g = i=1
p , cn = , s2 = (Xi − X)2 .
s s n(n − 1) 2n n − 1 i=1
Value
A list with class "htest" containing the following components:
statistic the value of the Geary statistic.
p.value the p-value for the test.
method the character string "Spiegelhalter test for normality".
data.name a character string giving the name(s) of the data.
Author(s)
Ilya Gavrilov and Ruslan Pusev
References
Spiegelhalter, D. J. (1977): A test for normality against symmetric alternatives. — Biometrika, vol.
64, pp. 415–418.
12 wb.norm.test
Examples
spiegelhalter.norm.test(rnorm(100))
spiegelhalter.norm.test(rexp(100))
Description
Performs Weisberg–Bingham test for the composite hypothesis of normality, see Weisberg and
Bingham (1975).
Usage
wb.norm.test(x, nrepl=2000)
Arguments
x a numeric vector of data values.
nrepl the number of replications in Monte Carlo simulation.
Details
The Weisberg–Bingham test for normality is based on the following statistic:
Pn Pn
( i=1 mi X(i) )2 / i=1 m2i
WB = Pn 2
,
i=1 (Xi − X)
where
i − 3/8
mi = Φ−1 .
n + 1/4
The p-value is computed by Monte Carlo simulation.
Value
A list with class "htest" containing the following components:
Author(s)
Ilya Gavrilov and Ruslan Pusev
wb.norm.test 13
References
Weisberg, S. and Bingham, C. (1975): An approximate analysis of variance test for non-normality
suitable for machine calculation. — Technometrics, vol. 17, pp. 133–134.
Examples
wb.norm.test(rnorm(100))
wb.norm.test(runif(100,-1,1))
Index
∗Topic htest
ajb.norm.test, 2
frosini.norm.test, 3
geary.norm.test, 4
hegazy1.norm.test, 5
hegazy2.norm.test, 6
jb.norm.test, 7
kurtosis.norm.test, 9
skewness.norm.test, 10
spiegelhalter.norm.test, 11
wb.norm.test, 12
ajb.norm.test, 2
frosini.norm.test, 3
geary.norm.test, 4
hegazy1.norm.test, 5
hegazy2.norm.test, 6
jb.norm.test, 7
kurtosis.norm.test, 9
skewness.norm.test, 10
spiegelhalter.norm.test, 11
wb.norm.test, 12
14