statsmodels.stats.diagnostic.het_arch#
- statsmodels.stats.diagnostic.het_arch(resid, nlags=None, store=False, ddof=0, *, use_namedtuple=None)[source]#
Engle’s Test for Autoregressive Conditional Heteroscedasticity (ARCH)
- Parameters:
- resid
ndarray residuals from an estimation, or time series
- nlags
int,defaultNone Highest lag to use.
- storebool,
defaultFalse If true then the intermediate results are also returned
- ddof
int,default0 If the residuals are from a regression, or ARMA estimation, then there are recommendations to correct the degrees of freedom by the number of parameters that have been estimated, for example ddof=p+q for an ARMA(p,q).
- use_namedtuplebool,
optional Flag indicating whether to return the results as an
LMTestResultNamedTuple instead of a plain tuple. Whenstore=Truethe NamedTuple holds the same five elements as the legacy tuple, so it unpacks identically and is always returned, with no warning. Whenstore=Falsethe legacy four-element tuple is returned by default and aFutureWarningis issued.Deprecated since version 0.15.0: In release 0.16.0 or after July 2027, whichever is later, the default will change to always return an
LMTestResult. Setuse_namedtuple=Trueto opt in now, oruse_namedtuple=Falseto silence the warning and keep the current return type.
- resid
- Returns:
LMTestResultIf
use_namedtuple=True, a NamedTuple with fieldslm,lmpval,fval,fpval, andres_store(res_storeisNonewhen not computed). SeeLMTestResult.Otherwise(thedeprecateddefault),aplaintuplemadeupof:- lm
float Lagrange multiplier test statistic
- lmpval
float p-value for Lagrange multiplier test
- fval
float fstatistic for F test, alternative version of the same test based on F test for the parameter restriction
- fpval
float pvalue for F test
- res_store
ResultsStore,optional Intermediate results. Returned if store is True.
Notes
verified against R:FinTS::ArchTest