Written and maintained by CASRAI Editorial Board
Last updated
The sktest command in Stata tests whether a variable is normally distributed by combining a skewness test and a kurtosis test into one joint test. A small joint p-value rejects normality, and the two separate p-values show whether skewness, kurtosis or both drive the result. It is not the Shapiro-Wilk test: that is a different command, swilk, covered below.
What it is used for in research
Many parametric methods assume approximately normal data or residuals, so researchers check normality before choosing a method. Stata’s manual describes sktest as presenting, for each variable, “a test for normality based on skewness and another based on kurtosis” and then combining the two into an overall test statistic. It needs at least eight observations.
The manual also states that Shapiro-Wilk and Shapiro-Francia are in general preferred for nonaggregated data, that a normal quantile plot should accompany any test for normality, and that sktest is the tool for finding the source of the problem once normality is rejected. A p-value alone should not decide between a parametric and a non-parametric method; see normality of distribution and how to choose a statistical test.
Install or access (official source only)
sktest is an official Stata command documented in the Stata Base Reference Manual under [R] sktest, so no add-on is needed. In the menus it is at Statistics > Summaries, tables, and tests > Distributional plots and tests > Skewness and kurtosis normality tests. The manual page for Release 19 is stata.com/manuals/rsktest.pdf (checked 2026-10-29).
Step-by-step: running sktest
- Load your data. The manual’s example uses the 1978 automobile data:
use https://www.stata-press.com/data/r19/auto. - Run the test on one or more variables:
sktest mpg trunk. The general syntax issktest varlist [if] [in] [weight] [, options]; aweights and fweights are allowed, for examplesktest v1 v2 [fweight=wvar]. - Read the table (next section).
- Optional: add
noadjust(sktest v1 v2, noadjust) to switch off the empirical adjustment described below. - Look at the data as well, with a histogram (see histograms in Stata),
qnorm, andsummarize varname, detail(see descriptive statistics in Stata).
Output and how to read it
The manual’s example output is headed “Skewness and kurtosis tests for normality” with a joint test. The columns are Variable, Obs, Pr(skewness), Pr(kurtosis), Adj chi2(2) and Prob>chi2.
| Variable | Obs | Pr(skewness) | Pr(kurtosis) | Adj chi2(2) | Prob>chi2 |
|---|---|---|---|---|---|
| mpg | 74 | 0.0015 | 0.0804 | 10.95 | 0.0042 |
| trunk | 74 | 0.9115 | 0.0445 | 4.19 | 0.1228 |
Source: Stata [R] sktest, auto data example. For mpg the joint test rejects normality. For trunk the manual says normality cannot be rejected “at least at the 12% level”, even though the kurtosis p-value (0.0445) is below 0.05 on its own, which shows why the two component tests and the joint test can point in different directions. The manual notes trunk’s kurtosis is 2.19, which you can confirm with summarize trunk, detail.
The adjusted chi-squared and noadjust
The overall statistic combines the skewness and kurtosis statistics (Z1 and Z2) as K2 = Z12 + Z22, approximately chi-squared with 2 degrees of freedom under normality. By default Stata applies Royston’s (1991) empirical adjustment; noadjust suppresses it and presents the unaltered D’Agostino, Belanger and D’Agostino (1990) test. In the same example the unadjusted chi-squared would be 13.13 for mpg and 4.05 for trunk. If the adjusted chi-squared prints as a period, the manual says to read it as “an absurdly large number; the data are most certainly not normal.”
Stored results
After sktest, these are available in r(): r(N), r(chi2), r(p_skew), r(p_kurt), r(p_chi2) and the matrix r(table). That lets a do-file branch on r(p_chi2) or write the p-values to a table.
swilk: the Shapiro-Wilk alternative in Stata
For the Shapiro-Wilk test in Stata, use swilk, not sktest. Its menu path is Statistics > Summaries, tables, and tests > Distributional plots and tests > Shapiro-Wilk normality test. Syntax: swilk varlist [if] [in] [, generate(newvar) lnnormal noties]. The manual (stata.com/manuals/rswilk.pdf, checked 2026-10-29) says swilk can be used with 4 ≤ n ≤ 2000 observations.
Running swilk mpg trunk on the auto data gives a table headed “Shapiro-Wilk W test for normal data” with columns Variable, Obs, W, V, z and Prob>z:
| Variable | Obs | W | V | z | Prob>z |
|---|---|---|---|---|---|
| mpg | 74 | 0.94821 | 3.335 | 2.627 | 0.00430 |
| trunk | 74 | 0.97921 | 1.339 | 0.637 | 0.26215 |
The manual’s reading: normality of mpg can be rejected, normality of trunk cannot. V is a transform of W with a median of 1 for samples from normal populations, and large values indicate nonnormality; it carries no more information than W. Stored results are r(N), r(W), r(p), r(V) and r(z).
Shapiro-Wilk test on a log scale
To test for lognormality, generate the log of the variable and test that, for example generate lnstudytime = ln(studytime) then swilk lnstudytime (the manual’s cancer data example, 48 observations, W = 0.92731, Prob>z = 0.00543). The lnnormal option is for a three-parameter lognormal, ln(X − k) with k chosen to make skewness zero; the manual says not to use it for plain lognormality.
sfrancia and the three commands side by side
sfrancia runs the Shapiro-Francia W’ test: sfrancia varlist [if] [in] [, boxcox noties]. On the auto data it also rejects normality for mpg (Prob>z 0.00604) but not for trunk (0.42271).
| Command | Test | Observations allowed | Stored p-value |
|---|---|---|---|
sktest |
Skewness and kurtosis, joint | at least 8 | r(p_chi2) |
swilk |
Shapiro-Wilk W | 4 to 2000 | r(p) |
sfrancia |
Shapiro-Francia W’ | 10 to 5000 (5 to 1000 with boxcox) |
r(p) |
Troubleshooting
- Samples that are too small.
sktestrequires at least eight observations;swilkat least four;sfranciaat least ten. - Too many observations for swilk. Above 2000, use
sfrancia(up to 5000) orsktest, which the manual says permits more observations. - Chi-squared shown as a period. Treat it as an extremely large statistic and strong evidence against normality, per the manual.
- The component tests disagree. This is normal (see trunk above); the joint test is the overall verdict and the components point to skewness or kurtosis.
- Long variable names truncate the table. The
nolstretchoption stops the table being widened for long names.
Free alternatives and companion checks
| Option | What it does | Where to learn more |
|---|---|---|
qnorm (Stata) |
Normal quantile plot, which the Stata manual says should accompany any normality test | What is a Q-Q plot |
shapiro.test() (R) |
Shapiro-Wilk test in the free R environment | Shapiro-Wilk test in R |
Users of other packages can compare with testing normality in SPSS. After deciding on a non-parametric approach, see the Mann-Whitney test (ranksum) in Stata.
FAQ
Is sktest the same as the Shapiro-Wilk test in Stata?
No. sktest is a skewness and kurtosis test; the Shapiro-Wilk test is swilk. The Stata manual prefers Shapiro-Wilk or Shapiro-Francia for nonaggregated data and positions sktest for diagnosing the source of non-normality.
How do I run a Shapiro-Wilk test in Stata?
Type swilk varname, or use Statistics > Summaries, tables, and tests > Distributional plots and tests > Shapiro-Wilk normality test. A small Prob>z means normality is rejected.
What does a significant sktest result mean?
A small Prob>chi2 rejects the null hypothesis that the variable is normally distributed. Check Pr(skewness) and Pr(kurtosis) to see which part contributes, and plot the data.
Sources (official docs)
- Stata Base Reference Manual, Release 19, [R] sktest: https://www.stata.com/manuals/rsktest.pdf (date checked: 2026-10-29).
- Stata Base Reference Manual, Release 19, [R] swilk (swilk and sfrancia): https://www.stata.com/manuals/rswilk.pdf (date checked: 2026-10-29).








