skewness#
Purpose#
Compute the sample skewness.
Format#
- g = skewness(x[, bias])#
- Parameters:
x (Matrix) – Nxk, sample data.
bias (Scalar) – Optional argument. Indicator for bias correction. If anything other than 0, bias correction is used. Default = 0.
- Returns:
g (Scalar) – Sample skewness.
Examples#
Example One: Vector input#
// Generate random vector of residuals
rndseed 929212;
resid = rndn(150, 1);
// Compute sample skewness
g = skewness(resid);
The code above results in the following:
g = 0.3049
Example Two: Matrix input#
// Generate random vector of residuals
rndseed 929212;
resid = rndn(150, 2);
// Compute sample skewness
g = skewness(resid);
The code above results in the following:
g = 0.26494746 -0.14941577
See also
Functions kurtosis()
, JarqueBera()