eqdisco.analysis.residual_diagnostics#
- eqdisco.analysis.residual_diagnostics(y, yhat, lags=10, order=None)[source]#
Statistical tests of the residuals \(e=y-\hat y\).
- Parameters:
- lags
int Number of autocorrelation lags of the Ljung–Box test.
- orderarray_like,
optional Order of the samples for the autocorrelation tests (time, position); default: the given order.
- lags
- Returns:
dictmean,std,skewness,kurtosis;shapiro_p(normality, Shapiro and Wilk, 1965);durbin_watson(about 2 without first-order autocorrelation; Durbin and Watson, 1950);ljung_box_qandljung_box_p(Ljung and Box, 1978);breusch_pagan_lmandbreusch_pagan_p(variance against \(\hat y\); Breusch and Pagan, 1979).