JarqueBera

Purpose

Performs the Jarque-Bera goodness-of-fit test on model residuals. Tests the null hypothesis that the residuals are normally distributed.

Format

{ jb_stat, jb_pval } = JarqueBera(resid[, skew, kurtosis])
Parameters
  • resid (Vector) – Model residuals.

  • skew (Scalar) – Optional argument, skewness of residuals. If not provided, the skewness is computed.

  • kurtosis (Scalar) – Optional argument, kurtosis of residuals. If not provided, the kurtosis is computed.

Returns
  • jb_stat (Scalar) – The Jarque-Bera test statistic for goodness-of-fit.

  • jb_pval (Scalar) – The p-value for the returned Jarque-Bera test statistic for goodness-of-fit.

Examples

// Generate random vector of residuals
rndseed 929212;
resid = rndn(150, 1);

// Compute Jarque-Bera test
{ jb_stat, jb_pval } = JarqueBera(resid);

The code above results in the following:

jb_stat = 2.8019
jb_pval = 0.2464

The p-value of 0.2464 indicates a failure to reject the null hypothesis that the residuals are distributed normally.

See also

Functions skewness(), kurtosis()