kurtosis#

Purpose#

Compute the sample kurtosis.

Format#

k = kurtosis(x[, excess])#
Parameters:
  • x (Matrix) – Nxk, sample data.

  • excess (Scalar) – Optional argument. Indicator for computing excess kurtosis. If anything other than 0, excess kurtosis is computed. Default = 0.

Returns:

k (Scalar) – Sample kurtosis.

Examples#

Example One: Vector input#

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

// Compute sample skewness
k = kurtosis(resid);

The code above results in the following:

k = 2.7234

Example Two: Matrix input#

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

// Compute sample skewness
k = kurtosis(resid);

The code above results in the following:

k = 2.6612276        3.0123801

See also

Functions skewness(), JarqueBera()