statsmodels.tsa.exponential_smoothing.ets.ETSResults.test_serial_correlation¶
-
ETSResults.test_serial_correlation(method, lags=
None)¶ Ljung-Box 检验标准化残差无序列相关性
原假设是没有序列相关性。
- Parameters:¶
- method{‘ljungbox’, ‘boxpierce’,
None} 序列相关的统计检验。如果为 None,则会尝试选择适当的检验。
- lags
None,intor array_like 如果 lags 是一个整数,则将其视为包含的最大滞后值,测试结果将报告所有较小滞后长度的结果。 如果 lags 是一个列表或数组,则包含列表中的所有滞后值,但仅报告列表中滞后值的测试结果。 如果 lags 为 None,则对于非季节性时间序列,默认的最大滞后值为 min(10, nobs//5),对于季节性时间序列,默认的最大滞后值为 min(2*m, nobs//5)。
- method{‘ljungbox’, ‘boxpierce’,
- Returns:¶
- output
ndarray 每个内生变量和每个滞后的(检验统计量, p值)数组。该数组的大小为(k_endog, 2, lags)。如果方法被调用为ljungbox = res.test_serial_correlation(),那么ljungbox[i]保存了第i个内生变量的Ljung-Box检验结果(如statsmodels.stats.diagnostic.acorr_ljungbox所返回的)。
- output
另请参阅
statsmodels.stats.diagnostic.acorr_ljungboxLjung-Box 检验序列相关性。
注释
对于状态空间模型:设 d = max(loglikelihood_burn, nobs_diffuse);此测试计算时忽略前 d 个残差。
对于任何具有缺失值的内生变量,输出结果为 nan。
Last update:
Oct 16, 2024