Description Usage Arguments Details Value References Examples
View source: R/normal_assumption.R
Performs the Jarque-Bera test for normality.
1 | jarque_bera(X)
|
X |
a single numeric vector of data values. |
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.
An htest object is returned. The critical value and the p-value are contained in the object.
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.