statsmodels.tsa.ardl.ARDLResults.test_serial_correlation¶
- ARDLResults.test_serial_correlation(lags=None, model_df=None)¶
Ljung-Box test for residual serial correlation
- Parameters:
- lags
int
The maximum number of lags to use in the test. Jointly tests that all autocorrelations up to and including lag j are zero for j = 1, 2, …, lags. If None, uses lag=12*(nobs/100)^{1/4}. After 0.12 the number of lags will change to min(10, nobs // 5).
- model_df
int
The model degree of freedom to use when adjusting computing the test statistic to account for parameter estimation. If None, uses the number of AR lags included in the model.
- lags
- Returns:
- output
DataFrame
DataFrame containing three columns: the test statistic, the p-value of the test, and the degree of freedom used in the test.
- output
See also
statsmodels.stats.diagnostic.acorr_ljungbox
Ljung-Box test for serial correlation.
Notes
Null hypothesis is no serial correlation.
The the test degree-of-freedom is 0 or negative once accounting for model_df, then the test statistic’s p-value is missing.