{
    "cells":  [
                  {
                      "cell_type":  "markdown",
                      "metadata":  {

                                   },
                      "source":  [
                                     "# Adjusted R-Squared and Model Comparison\n",
                                     "\n",
                                     "Module 6 notebook lab. This notebook uses a synthetic Ceteris Lab teaching dataset and does not report real empirical findings.\n"
                                 ]
                  },
                  {
                      "cell_type":  "markdown",
                      "metadata":  {

                                   },
                      "source":  [
                                     "## Learning goal\n",
                                     "Practice the Module 6 concept with editable Python code. Interpret units, functional form, controls, prediction, and uncertainty carefully.\n"
                                 ]
                  },
                  {
                      "cell_type":  "code",
                      "execution_count":  null,
                      "metadata":  {

                                   },
                      "outputs":  [

                                  ],
                      "source":  [
                                     "import pandas as pd\n",
                                     "import statsmodels.api as sm\n",
                                     "\n",
                                     "df = pd.read_csv(\u0027/data/module-6/M6_POLICY_CONTROLS.csv\u0027)\n",
                                     "print(df.head())\n",
                                     "print(df.describe().round(2))\n",
                                     "\n",
                                     "# Edit the columns below to match the lesson question before interpreting output.\n",
                                     "y = df[\u0027outcome\u0027]\n",
                                     "X = df.select_dtypes(\u0027number\u0027).drop(columns=[\u0027outcome\u0027]).iloc[:, :3]\n",
                                     "model = sm.OLS(y, sm.add_constant(X)).fit()\n",
                                     "print(model.summary())\n"
                                 ]
                  },
                  {
                      "cell_type":  "markdown",
                      "metadata":  {

                                   },
                      "source":  [
                                     "## Reflection\n",
                                     "Write two sentences: one coefficient or prediction interpretation, and one limitation that prevents overclaiming.\n"
                                 ]
                  }
              ],
    "metadata":  {
                     "kernelspec":  {
                                        "display_name":  "Python 3",
                                        "language":  "python",
                                        "name":  "python3"
                                    },
                     "language_info":  {
                                           "name":  "python",
                                           "version":  "3.11"
                                       }
                 },
    "nbformat":  4,
    "nbformat_minor":  5
}
