rjb.test: Test of Normailty - Robust Jarque-Bera Test

View source: R/rjb.test.R

rjb.testR Documentation

Test of Normailty – Robust Jarque–Bera Test

Description

The robust and classical Jarque–Bera tests of normality.

Usage

rjb.test(
  x,
  option = c("RJB", "JB"),
  crit.values = c("chisq.approximation", "empirical"),
  N = 0
)

Arguments

x

a numeric vector of data values.

option

the choice of whether to perform the robust test, "RJB" (default) or classic test, "JB".

crit.values

a character string specifying how the critical values should be obtained: approximated by the Chi-square distribution (default) or empirically.

N

number of Monte Carlo simulations for the empirical critical values.

Details

The test is based on a joint statistic using skewness and kurtosis coefficients. The Robust Jarque–Bera (RJB) is the robust version of the Jarque–Bera (JB) test of normality. The RJB (default option) utilizes the robust standard deviation (specifically, the Average Absolute Deviation from the Median; MAAD) to estimate sample kurtosis and skewness. For more details, see \insertCiteGel_Gastwirth_2008;textuallawstat. Users can also choose to perform the classical Jarque–Bera test \insertCiteJarque_Bera_1980lawstat.

Value

A list of class "htest" with the following components:

statistic

the value of the test statistic.

parameter

the degrees of freedom.

p.value

the p-value of the test.

method

type of test was performed.

data.name

a character string giving the name of the data.

Note

Modified from jarque.bera.test (tseries package).

Author(s)

W. Wallace Hui, Yulia R. Gel, Joseph L. Gastwirth, Weiwen Miao

References

\insertAllCited

See Also

sj.test, rqq, jarque.bera.test

Examples

## Normally distributed data
x = rnorm(100)
rjb.test(x)

## Using zuni data
data(zuni)
rjb.test(zuni[, "Revenue"])


vlyubchich/lawstat documentation built on April 17, 2023, 12:47 a.m.