rjb.test {lawstat} | R 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, |
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 Gel and Gastwirth (2008). Users can also choose to perform the classical Jarque–Bera test (Jarque and Bera 1980).
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 |
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
Gel YR, Gastwirth JL (2008).
“A robust modification of the Jarque–Bera test of normality.”
Economics Letters, 99(1), 30–32.
doi:10.1016/j.econlet.2007.05.022.
Jarque CM, Bera AK (1980).
“Efficient tests for normality, homoscedasticity and serial independence of regression residuals.”
Economics Letters, 6(3), 255–259.
doi:10.1016/0165-1765(80)90024-5.
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"])