JBTest {Rita}R Documentation

Jarque-Bera Test

Description

This function performs the Jarque-Bera test for normality using adjusted Fisher- Pearson skewness and kurtosis coefficients.

Usage

JBTest(data, alpha = 0.05, j = 1, N_Sample = 10000, warn = T)

Arguments

data

Data of a univariate distribution for which the test statistic is computed (vector)

alpha

The two-sided decision threshold used for hypothesis-testing

j

The # hypotheses tested; used to compute a Bonferonni correction, if applicable; should remain at its default if multiple testing is not an issue (scalar)

N_Sample

The # samples used to generate the bootstrapped sampling distribution, in cases when N < 2000 (scalar)

warn

Used for printing a warning message when boostrapping is performed for sample-sizes < 2000 or when testing is terminated for N < 4 (boolean)

Details

Large samples (N >= 2000) use p-values obtained with reference to the chi-square distribution, whereas smaller samples output p-values obtained via bootstrapping. When N < 4, testing is terminated.

Value

An object including the test statistic, p-value, and a significance flag (list)

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.

Shreve, Joni N. and Donna Dea Holland . 2018. SASĀ® Certification Prep Guide: Statistical Business Analysis Using SASĀ®9. Cary, NC: SAS Institute Inc.

Examples

values <- rnorm(100)
x <- JBTest(data = values)

[Package Rita version 1.2.0 Index]