Logo

scikits.statsmodels.sandbox.stats.diagnostic.het_goldfeldquandt2

scikits.statsmodels.sandbox.stats.diagnostic.het_goldfeldquandt2(y, x, idx, split=None, retres=False)[source]

test whether variance is the same in 2 subsamples

Parameters :

y : array_like

endogenous variable

x : array_like

exogenous variable, regressors

idx : integer

column index of variable according to which observations are sorted for the split

split : None or integer or float in intervall (0,1)

index at which sample is split. If 0<split<1 then split is interpreted as fraction of the observations in the first sample

retres : boolean

if true, then an instance of a result class is returned, otherwise 2 numbers, fvalue and p-value, are returned

Returns :

(fval, pval) or res :

fval : float

value of the F-statistic

pval : float

p-value of the hypothesis that the variance in one subsample is larger than in the other subsample

res : instance of result class

The class instance is just a storage for the intermediate and final results that are calculated

Notes

TODO: add resultinstance - DONE maybe add drop-middle as option maybe allow for several breaks

recommendation for users: use this function as pattern for more flexible
split in tests, e.g. drop middle.

can do Chow test for structural break in same way

ran sanity check

Previous topic

sm.sandbox.stats.diagnostic.het_goldfeldquandt

Next topic

sm.sandbox.stats.diagnostic.het_white

This Page