jb.norm.test: Jarque-Bera test for normality

Description Usage Arguments Details Value Author(s) References Examples

Description

Performs Jarque–Bera test for the composite hypothesis of normality, see Jarque and Bera (1987).

Usage

1
jb.norm.test(x, nrepl=2000)

Arguments

x

a numeric vector of data values.

nrepl

the number of replications in Monte Carlo simulation.

Details

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.

Value

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.

Author(s)

Ilya Gavrilov and Ruslan Pusev

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

1
2

Example output

	Jarque-Bera test for normality

data:  rnorm(100)
JB = 0.90056, p-value = 0.583


	Jarque-Bera test for normality

data:  abs(runif(100, -2, 5))
JB = 8.8219, p-value = 0.0205

normtest documentation built on May 2, 2019, 7:28 a.m.