{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## ARMA Modeling: Residual Diagnostics\n", "\n", "**Functions**\n", "\n", "`tsa.SARIMAX`, `sm.stats.diagnostic.acorr_ljungbox`, `SARIMAXResults.test_serial_correlation`,\n", "`statsmodels.sandbox.stats.diagnostic.acorr_lm`\n", "\n", "### Exercise 69\n", "Compute the residuals from your preferred model from the previous exercise, as well as a random-walk model.\n", "\n", "1. Plot the residuals\n", "2. Is there evidence of autocorrelation in the residuals?\n", "3. Compute the Q statistic from both sets of residuals. Is there evidence of serial correlation?\n", "4. Compute the LM test for serial correlation. Is there evidence of serial correlation?" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2021-09-22T10:06:43.506430Z", "iopub.status.busy": "2021-09-22T10:06:43.506430Z", "iopub.status.idle": "2021-09-22T10:06:44.886432Z", "shell.execute_reply": "2021-09-22T10:06:44.886432Z" } }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.6" }, "pycharm": { "stem_cell": { "cell_type": "raw", "metadata": { "collapsed": false }, "source": [] } } }, "nbformat": 4, "nbformat_minor": 4 }