Learn R Programming

lawstat (version 3.6)

rjb.test: 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
)

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.

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.

Author

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

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 Gel_Gastwirth_2008;textuallawstat. Users can also choose to perform the classical Jarque--Bera test Jarque_Bera_1980lawstat.

References

See Also

sj.test, rqq, jarque.bera.test

Examples

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

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

Run the code above in your browser using DataLab