ssHeteroskedasticityTest¶
Purpose¶
Tests the null hypothesis of no heteroskedasticity by comparing the sumofsquares of the first third of the sample to the sumofsquares of last third of the sample. Analogous to a GoldfeldQuandt test.
Format¶

{ test_statistic, p_value } =
ssHeteroskedasticityTest
(resid[, alternative])¶  Parameters:
resid (Vector) – Model residuals.
alternative (String) – Optional argument, specifies alternative to use for finding critical values. Options include:
"increasing"
,"decreasing"
, or"twosided"
. Default ="twosided"
.
 Returns:
test_stat (Scalar) – Test statistic for the heteroskedasticity.
p_value (Scalar) – Pvalue for the test statistic for the heteroskedasticity.
Examples¶
// Generate random vector of residuals
rndseed 929212;
resid = rndn(150, 1);
// Test for heteroskedasticity
{ test_stat, p_val } = ssHeteroskedasticityTest(resid);
The code above results in the following:
test_stat = 0.9598
p_val = 0.8854
Source¶
ssmain.src
See also
Functions ssLjungBox()
, ssJarqueBera()