0% found this document useful (0 votes)
200 views

RSK Test

1. The sktest command performs tests of normality based on skewness and kurtosis for each variable in a dataset. It provides p-values for skewness and kurtosis individually as well as an overall test statistic and p-value that combines the two. 2. By default, sktest makes an empirical adjustment to the overall test statistic and p-value as proposed by Royston (1991c) to improve accuracy. The noadjust option suppresses this adjustment. 3. The document provides an example using the auto dataset where mpg is found to be non-normal based on the sktest while trunk cannot be determined as non-normal, though its kurtosis

Uploaded by

Maria Hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views

RSK Test

1. The sktest command performs tests of normality based on skewness and kurtosis for each variable in a dataset. It provides p-values for skewness and kurtosis individually as well as an overall test statistic and p-value that combines the two. 2. By default, sktest makes an empirical adjustment to the overall test statistic and p-value as proposed by Royston (1991c) to improve accuracy. The noadjust option suppresses this adjustment. 3. The document provides an example using the auto dataset where mpg is found to be non-normal based on the sktest while trunk cannot be determined as non-normal, though its kurtosis

Uploaded by

Maria Hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Title

stata.com
sktest Skewness and kurtosis test for normality

Syntax
Remarks and examples
References

Menu
Stored results
Also see

Description
Methods and formulas

Option
Acknowledgments

Syntax
  


sktest varlist if
in
weight
, noadjust
aweights and fweights are allowed; see [U] 11.1.6 weight.

Menu
Statistics

>

Summaries, tables, and tests

>

Distributional plots and tests

>

Skewness and kurtosis normality test

Description
For each variable in varlist, sktest presents a test for normality based on skewness and another
based on kurtosis and then combines the two tests into an overall test statistic. sktest requires a
minimum of 8 observations to make its calculations. See [MV] mvtest normality for multivariate
tests of normality.

Option


Main

noadjust suppresses the empirical adjustment made by Royston (1991c) to the overall 2 and
its significance level and presents the unaltered test as described by DAgostino, Belanger, and
DAgostino (1990).

Remarks and examples

stata.com

Also see [R] swilk for the Shapiro Wilk and Shapiro Francia tests for normality. Those tests are,
in general, preferred for nonaggregated data (Gould and Rogers 1991; Gould 1992; Royston 1991c).
Moreover, a normal quantile plot should be used with any test for normality; see [R] diagnostic plots
for more information.

sktest Skewness and kurtosis test for normality

Example 1
Using our automobile dataset, we will test whether the variables mpg and trunk are normally
distributed:
. use http://www.stata-press.com/data/r13/auto
(1978 Automobile Data)
. sktest mpg trunk
Skewness/Kurtosis tests for Normality
Variable

Obs

Pr(Skewness)

Pr(Kurtosis)

adj chi2(2)

mpg
trunk

74
74

0.0015
0.9115

0.0804
0.0445

10.95
4.19

joint
Prob>chi2
0.0042
0.1228

We can reject the hypothesis that mpg is normally distributed, but we cannot reject the hypothesis
that trunk is normally distributed, at least at the 12% level. The kurtosis for trunk is 2.19, as can
be verified by issuing the command
. summarize trunk, detail
(output omitted )

and the p-value of 0.0445 shown in the table above indicates that it is significantly different from
the kurtosis of a normal distribution at the 5% significance level. However, on the basis of skewness
alone, we cannot reject the hypothesis that trunk is normally distributed.

Technical note
sktest implements the test as described by DAgostino, Belanger, and DAgostino (1990) but with
the adjustment made by Royston (1991c). In the above example, if we had specified the noadjust
option, the 2 values would have been 13.13 for mpg and 4.05 for trunk. With the adjustment, the
2 value might show as .. This result should be interpreted as an absurdly large number; the data
are most certainly not normal.

Stored results
sktest stores the following in r():
Scalars
r(chi2)
r(P skew)
r(P kurt)
r(P chi2)
Matrices
r(N)
r(Utest)

Pr(skewness)
Pr(kurtosis)
Prob > chi2
matrix of observations
matrix of test results, one row per variable

sktest Skewness and kurtosis test for normality

Methods and formulas


sktest implements the test described by DAgostino, Belanger, and DAgostino (1990) with the
empirical correction developed by Royston (1991c).
Let g1 denote the coefficient of skewness and b2 denote the coefficient of kurtosis as calculated
by summarize, and let n denote the sample size. If weights are specified, then g1 , b2 , and n
denote the weighted coefficients of skewness and kurtosis and weighted sample size, respectively.
See [R] summarize for the formulas for skewness and kurtosis.
To perform the test of skewness, we compute

1/2
(n + 1)(n + 3)
6(n 2)
2
3(n + 27n 70)(n + 1)(n + 3)
2 (g1 ) =
(n 2)(n + 5)(n + 7)(n + 9)


Y = g1

and

W 2 = 1 + [2 {2 (g1 ) 1}]

1/2
= 2/(W 2 1)

1/2

Then the distribution of the test statistic

Z1 =

h

1/2 i
1
ln Y / + (Y /)2 + 1
lnW

is approximately standard normal under the null hypothesis that the data are distributed normally.
To perform the test of kurtosis, we compute

3(n 1)
n+1
24n(n 2)(n 3)
var(b2 ) =
(n + 1)2 (n + 3)(n + 5)
p
X = {b2 E(b2 )} / var(b2 )

1/2
p
6(n2 5n + 2) 6(n + 3)(n + 5)
1 (b2 ) =
(n + 7)(n + 9) n(n 2)(n 3)
"

1/2 #
8
2
4
p
A=6+ p
+ 1+
1 (b2 )
1 (b2 )
1 (b2 )
E(b2 ) =

and

Then the distribution of the test statistic

)1/3

 (
1
2
1

2/A
1

Z2 = p
9A
2/(9A)
1 + X 2/(A 4)
is approximately standard normal under the null hypothesis that the data are distributed normally.
DAgostino, Balanger, and DAgostino Jr.s omnibus test of normality uses the statistic

K 2 = Z12 + Z22
which has approximately a 2 distribution with 2 degrees of freedom under the null of normality.

sktest Skewness and kurtosis test for normality

Royston (1991c) proposed the following adjustment to the test of normality, which sktest uses
by default. Let (x) denote the cumulative standard normal distribution function for x, and let
1 (p) denote the inverse cumulative standard normal function [that is, x = 1 {(x)}]. Define
the following terms:

Zc =

and

Zt
a1
b1
a2
b2

1
exp K 2
2



= 0.55n0.2 0.21
= (5 + 3.46 lnn) exp(1.37 lnn)
= 1 + (0.854 0.148 lnn) exp(0.55 lnn)
= a1 {2.13/(1 2.37 lnn)} Zt
= 2.13/(1 2.37 lnn) + b1

If Zc < 1 set Z = Zc ; else if Zc < Zt set Z = a1 + b1 Zc ; else set Z = a2 + b2 Zc . Define


P = 1 (Z). Then K 2 = 2 lnP is approximately distributed 2 with 2 degrees of freedom.
The relative merits of the skewness and kurtosis test versus the Shapiro Wilk and Shapiro Francia
tests have been a subject of debate. The interested reader is directed to the articles in the Stata Technical
Bulletin. Our recommendation is to use the Shapiro Francia test whenever possible, that is, whenever
dealing with nonaggregated or ungrouped data (Gould and Rogers 1991; Gould 1992); see [R] swilk.
If normality is rejected, use sktest to determine the source of the problem.
As both DAgostino, Belanger, and DAgostino (1990) and Royston (1991d) mention, researchers
should also examine the normal quantile plot to determine normality rather than blindly relying on a
few test statistics. See the qnorm command documented in [R] diagnostic plots for more information
on normal quantile plots.
sktest is similar in spirit to the JarqueBera (1987) test of normality. The JarqueBera test
statistic is also calculated from the sample skewness and kurtosis, though it is based on asymptotic
standard errors with no corrections for sample size. In effect, sktest offers two adjustments for
sample size, that of Royston (1991c) and that of DAgostino, Belanger, and DAgostino (1990).

Acknowledgments
sktest has benefited greatly by the comments and work of Patrick Royston of the MRC Clinical
Trials Unit, London, and coauthor of the Stata Press book Flexible Parametric Survival Analysis
Using Stata: Beyond the Cox Model. At this point, the program should be viewed as due as much to
Royston as to us, except, of course, for any errors. We are also indebted to Nicholas J. Cox of the
Department of Geography at Durham University, UK, and coeditor of the Stata Journal for his helpful
comments.

References
DAgostino, R. B., A. J. Belanger, and R. B. DAgostino, Jr. 1990. A suggestion for using powerful and informative
tests of normality. American Statistician 44: 316321.
. 1991. sg3.3: Comment on tests of normality. Stata Technical Bulletin 3: 20. Reprinted in Stata Technical
Bulletin Reprints, vol. 1, pp. 105106. College Station, TX: Stata Press.
Gould, W. W. 1991. sg3: Skewness and kurtosis tests of normality. Stata Technical Bulletin 1: 2021. Reprinted in
Stata Technical Bulletin Reprints, vol. 1, pp. 99101. College Station, TX: Stata Press.
. 1992. sg11.1: Quantile regression with bootstrapped standard errors. Stata Technical Bulletin 9: 1921. Reprinted
in Stata Technical Bulletin Reprints, vol. 2, pp. 137139. College Station, TX: Stata Press.

sktest Skewness and kurtosis test for normality

Gould, W. W., and W. H. Rogers. 1991. sg3.4: Summary of tests of normality. Stata Technical Bulletin 3: 2023.
Reprinted in Stata Technical Bulletin Reprints, vol. 1, pp. 106110. College Station, TX: Stata Press.
Jarque, C. M., and A. K. Bera. 1987. A test for normality of observations and regression residuals. International
Statistical Review 2: 163172.
Marchenko, Y. V., and M. G. Genton. 2010. A suite of commands for fitting the skew-normal and skew-t models.
Stata Journal 10: 507539.
Royston, P. 1991a. sg3.1: Tests for departure from normality. Stata Technical Bulletin 2: 1617. Reprinted in Stata
Technical Bulletin Reprints, vol. 1, pp. 101104. College Station, TX: Stata Press.
. 1991b. sg3.2: ShapiroWilk and ShapiroFrancia tests. Stata Technical Bulletin 3: 19. Reprinted in Stata
Technical Bulletin Reprints, vol. 1, p. 105. College Station, TX: Stata Press.
. 1991c. sg3.5: Comment on sg3.4 and an improved DAgostino test. Stata Technical Bulletin 3: 2324. Reprinted
in Stata Technical Bulletin Reprints, vol. 1, pp. 110112. College Station, TX: Stata Press.
. 1991d. sg3.6: A response to sg3.3: Comment on tests of normality. Stata Technical Bulletin 4: 89. Reprinted
in Stata Technical Bulletin Reprints, vol. 1, pp. 112114. College Station, TX: Stata Press.

Also see
[R] diagnostic plots Distributional diagnostic plots
[R] ladder Ladder of powers
[R] lv Letter-value displays
[R] swilk Shapiro Wilk and Shapiro Francia tests for normality
[MV] mvtest normality Multivariate normality tests

You might also like