## Residual Diagnostics

### Check Residuals for Normality

A common assumption of time series models is a Gaussian innovation distribution. After fitting a model, you can infer residuals and check them for normality. If the Gaussian innovation assumption holds, the residuals should look approximately normally distributed.

Some plots for assessing normality are:

• Histogram

• Box plot

• Quantile-quantile plot

• Kernel density estimate

The last three plots are in Statistics and Machine Learning Toolbox™.

If you see that your standardized residuals have excess kurtosis (fatter tails) compared to a standard normal distribution, you can consider using a Student’s t innovation distribution.

### Check Residuals for Autocorrelation

In time series models, the innovation process is assumed to be uncorrelated. After fitting a model, you can infer residuals and check them for any unmodeled autocorrelation.

As an informal check, you can plot the sample autocorrelation function (ACF) and partial autocorrelation function (PACF). If either plot shows significant autocorrelation in the residuals, you can consider modifying your model to include additional autoregression or moving average terms.

More formally, you can conduct a Ljung-Box Q-test on the residual series. This tests the null hypothesis of jointly zero autocorrelations up to lag m, against the alternative of at least one nonzero autocorrelation. You can conduct the test at several values of m. The degrees of freedom for the Q-test are usually m. However, for testing a residual series, you should use degrees of freedom mpq, where p and q are the number of AR and MA coefficients in the fitted model, respectively.

### Check Residuals for Conditional Heteroscedasticity

A white noise innovation process has constant variance. After fitting a model, you can infer residuals and check them for heteroscedasticity (nonconstant variance).

As an informal check, you can plot the sample ACF and PACF of the squared residual series. If either plot shows significant autocorrelation, you can consider modifying your model to include a conditional variance process.

More formally, you can conduct an Engle’s ARCH test on the residual series. This tests the null hypothesis of no ARCH effects against the alternative ARCH model with k lags.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8866711,"math_prob":0.8110288,"size":2143,"snap":"2020-45-2020-50","text_gpt3_token_len":431,"char_repetition_ratio":0.14633006,"word_repetition_ratio":0.1762918,"special_character_ratio":0.18058796,"punctuation_ratio":0.101333335,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9635229,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-12-04T15:50:00Z\",\"WARC-Record-ID\":\"<urn:uuid:3268742d-52e8-4c5e-80b7-04a2f97b859b>\",\"Content-Length\":\"68015\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e45771ba-0634-45eb-abd0-77e6f022db0b>\",\"WARC-Concurrent-To\":\"<urn:uuid:ace49c3d-3d10-4c0c-8365-1dd56347f97f>\",\"WARC-IP-Address\":\"184.24.72.83\",\"WARC-Target-URI\":\"https://ch.mathworks.com/help/econ/residual-diagnostics.html\",\"WARC-Payload-Digest\":\"sha1:ZSNSD36LOGMWCKTUJJQPPGFTKLKH7J7D\",\"WARC-Block-Digest\":\"sha1:CKU4OU4LTEBYKRU27XR65O3MQROACLGJ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141737946.86_warc_CC-MAIN-20201204131750-20201204161750-00406.warc.gz\"}"}