jarque_bera: Jarque-Bera-Test

Description Usage Arguments Details Value References Examples

View source: R/normal_assumption.R

Description

Performs the Jarque-Bera test for normality.

Usage

1

Arguments

X

a single numeric vector of data values.

Details

The Jarque-Bera test statistic tests the null that the data is normally distributed against an alternative that the data follow some other distribution. The test statistic is based on two moments of the data, the skewness, and the kurtosis, and has an asymptotic chi^2 distribution. The test statistic is defined:

JB = n(S^2/6+(K-3)^2/24)

where n is the number of data points, S is the sample skewness, and K is the sample kurtosis of the data.

Value

An htest object is returned. The critical value and the p-value are contained in the object.

References

Jarque, C. M. and Bera, A. K. (1980). Efficient test for normality, homoscedasticity and serial independence of residuals. Economic Letters, 6(3), pp. 255-259.

Examples

1
2
3
4
5
6
7
8
## Not run: 
z <- rnorm(100)
olsdiagnosticR:::jarque_bera(X = z)

y <- rexp(100)
olsdiagnosticR:::jarque_bera(X = y)

## End(Not run)

Kale-S/isnormalr documentation built on Sept. 23, 2019, 5:48 a.m.