Description Usage Arguments Details Value Author(s) References Examples
Performs Jarque–Bera test for the composite hypothesis of normality, see Jarque and Bera (1987).
1 | jb.norm.test(x, nrepl=2000)
|
x |
a numeric vector of data values. |
nrepl |
the number of replications in Monte Carlo simulation. |
The Jarque–Bera test for normality is based on the following statistic:
JB = \frac{n}{6}≤ft((√{b_1})^2 + \frac{(b_2-3)^2}{4}\right),
where
b_1 = \frac{\frac{1}{n}∑_{i=1}^n(X_i - \overline{X})^3}{\frac{1}{n}(∑_{i=1}^n(X_i - \overline{X})^2)^{3/2}},
b_2 = \frac{\frac{1}{n}∑_{i=1}^n(X_i - \overline{X})^4}{\frac{1}{n}(∑_{i=1}^n(X_i - \overline{X})^2)^2}.
The p-value is computed by Monte Carlo simulation.
A list with class "htest" containing the following components:
statistic |
the value of the Jarque–Bera statistic. |
p.value |
the p-value for the test. |
method |
the character string "Jarque-Bera test for normality". |
data.name |
a character string giving the name(s) of the data. |
Ilya Gavrilov and Ruslan Pusev
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.
1 2 | jb.norm.test(rnorm(100))
jb.norm.test(abs(runif(100,-2,5)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.