{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Multiple Hypothesis Testing Corrections"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "When conducting online A/B tests or large-scale experiments, we often analyze multiple dependent variables simultaneously. Analyzing multiple KPIs introduces a significant statistical challenge: the multiple testing problem.\n",
    "\n",
    "In classical hypothesis testing, the significance level $\\alpha$ controls the probability of a false positive (Type I error), typically $\\alpha=0.05$. While this ensures a 5% chance of a false positive for a single test, the likelihood of detecting at least one false positive grows rapidly when conducting multiple tests. For example, testing 20 KPIs independently at $\\alpha = 0.05$ results in a 64% chance of at least one false positive—calculated as $1 - (1 - 0.05)^{20} \\approx 0.64$. This issue, known as the multiple testing problem, can lead to false claims of significant effects when none exist.\n",
    "\n",
    "To address this, the concept of controlling the **Familywise Error Rate (FWER)** has been widely adopted. FWER controls the probability of at least one Type I error across a family of hypotheses. Several correction methods exist to mitigate the multiple testing problem, including:\n",
    "\n",
    "- **Bonferroni Correction**: A simple and conservative method that adjusts the significance level for each test by dividing $\\alpha$ by the number of tests.\n",
    "- **Romano-Wolf & Westfall-Young Stepwise Procedures**: Two more powerful methods that use resampling techniques to control the FWER.\n",
    "\n",
    "This vignette demonstrates how these methods effectively control the FWER in a variety of scenarios. We will compare their performance and highlight the trade-offs between simplicity and statistical power. Specifically, we show that while Bonferroni provides strong error control, it is conservative in many practical applications. In contrast, Romano-Wolf and Westfall-Young methods are more powerful, offering greater sensitivity to detect true effects while maintaining robust control of the FWER."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## What is a Family-Wise Error Rate (FWER)? "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Suppose that we are running an experiment and want to test if our treatment impacts 20 different dependent variables (KPIs). For any given independent test, the chance of a false positive is given by the (significance) **level** of the individual test, which is most commonly set to $\\alpha = 0.05$. Formally, we can define the false positive rate for a single hypothesis $H$ as:\n",
    "\n",
    "$$\n",
    "P(\\text{reject } H \\mid H \\text{ is true}) = \\alpha\n",
    "$$\n",
    "\n",
    "For a **family of tests** $S = {s \\in \\{1, \\dots, P\\} }$ hypotheses $\\{H_{s}\\}_{s \\in S}$, we can analogously define the **family-wise error rate (FWER)** as:\n",
    "\n",
    "$$\n",
    "P(\\text{reject at least one } H_{s} \\text{ with } s \\in I) = \\alpha\n",
    "$$\n",
    "\n",
    "where $I$ is the set of **true hypotheses**. In other words, the FWER is the probability of making at least one false positive across all tests in the family.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Setup"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In a first step, we create a data set with multiple (potentially correlated) dependent variables that share a common set of covariates. \n",
    "All simulations in this notebook are greatly inspired by Clarke, Romano & Wolf (Stata Journal, 2020)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The autoreload extension is already loaded. To reload it, use:\n",
      "  %reload_ext autoreload\n"
     ]
    }
   ],
   "source": [
    "%load_ext autoreload\n",
    "%autoreload 2\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from great_tables import loc, style\n",
    "from joblib import Parallel, delayed\n",
    "from tqdm import tqdm\n",
    "\n",
    "import pyfixest as pf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "N = 100\n",
    "n_covariates = 5\n",
    "n_depvars = 20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_data(N, n_covariates, n_depvars, rho, seed):\n",
    "    \"Simulate data with true nulls.\"\n",
    "    rng = np.random.default_rng(seed)\n",
    "    Omega = np.eye(n_depvars)\n",
    "    X = rng.standard_normal((N, n_covariates))\n",
    "    u_joint = np.random.multivariate_normal(np.zeros(n_depvars), Omega, N)\n",
    "    beta = np.zeros((n_covariates, n_depvars))\n",
    "    y = X @ beta + u_joint\n",
    "\n",
    "    data = pd.DataFrame(X, columns=[f\"X{i}\" for i in range(n_covariates)])\n",
    "    data = data.assign(**{f\"y{i}\": y[:, i] for i in range(n_depvars)})\n",
    "\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>X0</th>\n",
       "      <th>X1</th>\n",
       "      <th>X2</th>\n",
       "      <th>X3</th>\n",
       "      <th>X4</th>\n",
       "      <th>y0</th>\n",
       "      <th>y1</th>\n",
       "      <th>y2</th>\n",
       "      <th>y3</th>\n",
       "      <th>y4</th>\n",
       "      <th>...</th>\n",
       "      <th>y10</th>\n",
       "      <th>y11</th>\n",
       "      <th>y12</th>\n",
       "      <th>y13</th>\n",
       "      <th>y14</th>\n",
       "      <th>y15</th>\n",
       "      <th>y16</th>\n",
       "      <th>y17</th>\n",
       "      <th>y18</th>\n",
       "      <th>y19</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-1.423825</td>\n",
       "      <td>1.263728</td>\n",
       "      <td>-0.870662</td>\n",
       "      <td>-0.259173</td>\n",
       "      <td>-0.075343</td>\n",
       "      <td>0.285444</td>\n",
       "      <td>-0.613527</td>\n",
       "      <td>1.064762</td>\n",
       "      <td>0.941035</td>\n",
       "      <td>-0.188382</td>\n",
       "      <td>...</td>\n",
       "      <td>0.947734</td>\n",
       "      <td>0.505579</td>\n",
       "      <td>-2.838629</td>\n",
       "      <td>-0.563997</td>\n",
       "      <td>1.757725</td>\n",
       "      <td>-0.187876</td>\n",
       "      <td>2.554182</td>\n",
       "      <td>-2.486495</td>\n",
       "      <td>0.216818</td>\n",
       "      <td>0.298878</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.740885</td>\n",
       "      <td>-1.367793</td>\n",
       "      <td>0.648893</td>\n",
       "      <td>0.361058</td>\n",
       "      <td>-1.952863</td>\n",
       "      <td>1.365574</td>\n",
       "      <td>0.404626</td>\n",
       "      <td>-1.869440</td>\n",
       "      <td>-0.008121</td>\n",
       "      <td>2.129185</td>\n",
       "      <td>...</td>\n",
       "      <td>0.439416</td>\n",
       "      <td>-1.992477</td>\n",
       "      <td>-0.002794</td>\n",
       "      <td>1.603059</td>\n",
       "      <td>-0.244048</td>\n",
       "      <td>0.880147</td>\n",
       "      <td>0.700935</td>\n",
       "      <td>-0.375832</td>\n",
       "      <td>1.113939</td>\n",
       "      <td>0.279370</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.347410</td>\n",
       "      <td>0.968497</td>\n",
       "      <td>-0.759387</td>\n",
       "      <td>0.902198</td>\n",
       "      <td>-0.466953</td>\n",
       "      <td>0.215444</td>\n",
       "      <td>-0.282206</td>\n",
       "      <td>0.720051</td>\n",
       "      <td>0.366021</td>\n",
       "      <td>1.051319</td>\n",
       "      <td>...</td>\n",
       "      <td>0.272646</td>\n",
       "      <td>-0.507247</td>\n",
       "      <td>-0.784782</td>\n",
       "      <td>-1.007066</td>\n",
       "      <td>0.840372</td>\n",
       "      <td>-1.150062</td>\n",
       "      <td>2.082881</td>\n",
       "      <td>0.583346</td>\n",
       "      <td>1.077486</td>\n",
       "      <td>0.027789</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.060690</td>\n",
       "      <td>0.788844</td>\n",
       "      <td>-1.256668</td>\n",
       "      <td>0.575858</td>\n",
       "      <td>1.398979</td>\n",
       "      <td>-1.065016</td>\n",
       "      <td>1.185823</td>\n",
       "      <td>0.970361</td>\n",
       "      <td>-0.765870</td>\n",
       "      <td>0.479013</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.007019</td>\n",
       "      <td>0.924188</td>\n",
       "      <td>1.949084</td>\n",
       "      <td>-1.560250</td>\n",
       "      <td>1.167244</td>\n",
       "      <td>-0.837087</td>\n",
       "      <td>0.360323</td>\n",
       "      <td>0.640585</td>\n",
       "      <td>0.527408</td>\n",
       "      <td>-0.033194</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.322298</td>\n",
       "      <td>-0.299699</td>\n",
       "      <td>0.902919</td>\n",
       "      <td>-1.621583</td>\n",
       "      <td>-0.158189</td>\n",
       "      <td>0.664518</td>\n",
       "      <td>1.456532</td>\n",
       "      <td>1.858938</td>\n",
       "      <td>-0.285083</td>\n",
       "      <td>-0.379121</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.960765</td>\n",
       "      <td>-0.238118</td>\n",
       "      <td>-1.055520</td>\n",
       "      <td>-0.486306</td>\n",
       "      <td>0.583903</td>\n",
       "      <td>0.718977</td>\n",
       "      <td>-0.122756</td>\n",
       "      <td>0.545447</td>\n",
       "      <td>0.174667</td>\n",
       "      <td>0.926524</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 25 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         X0        X1        X2        X3        X4        y0        y1  \\\n",
       "0 -1.423825  1.263728 -0.870662 -0.259173 -0.075343  0.285444 -0.613527   \n",
       "1 -0.740885 -1.367793  0.648893  0.361058 -1.952863  1.365574  0.404626   \n",
       "2  2.347410  0.968497 -0.759387  0.902198 -0.466953  0.215444 -0.282206   \n",
       "3 -0.060690  0.788844 -1.256668  0.575858  1.398979 -1.065016  1.185823   \n",
       "4  1.322298 -0.299699  0.902919 -1.621583 -0.158189  0.664518  1.456532   \n",
       "\n",
       "         y2        y3        y4  ...       y10       y11       y12       y13  \\\n",
       "0  1.064762  0.941035 -0.188382  ...  0.947734  0.505579 -2.838629 -0.563997   \n",
       "1 -1.869440 -0.008121  2.129185  ...  0.439416 -1.992477 -0.002794  1.603059   \n",
       "2  0.720051  0.366021  1.051319  ...  0.272646 -0.507247 -0.784782 -1.007066   \n",
       "3  0.970361 -0.765870  0.479013  ... -1.007019  0.924188  1.949084 -1.560250   \n",
       "4  1.858938 -0.285083 -0.379121  ... -0.960765 -0.238118 -1.055520 -0.486306   \n",
       "\n",
       "        y14       y15       y16       y17       y18       y19  \n",
       "0  1.757725 -0.187876  2.554182 -2.486495  0.216818  0.298878  \n",
       "1 -0.244048  0.880147  0.700935 -0.375832  1.113939  0.279370  \n",
       "2  0.840372 -1.150062  2.082881  0.583346  1.077486  0.027789  \n",
       "3  1.167244 -0.837087  0.360323  0.640585  0.527408 -0.033194  \n",
       "4  0.583903  0.718977 -0.122756  0.545447  0.174667  0.926524  \n",
       "\n",
       "[5 rows x 25 columns]"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = get_data(\n",
    "    N=N, n_covariates=n_covariates, n_depvars=n_depvars, rho=0.5, seed=12345\n",
    ")\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now that we have our data set at hand, we can fit 20 regression models - one for each dependent variable. To do so, we will use \n",
    "pyfixest's multiple estimation syntax."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "dependent_vars = \" + \".join([f\"y{i}\" for i in range(20)])\n",
    "independent_vars = \" + \".join([f\"X{i}\" for i in range(5)])\n",
    "fml = f\"{dependent_vars} ~ {independent_vars}\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "fit = pf.feols(fml, data=data, vcov=\"hetero\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"vfsdazjkcr\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n",
       "<style>\n",
       "#vfsdazjkcr table {\n",
       "          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;\n",
       "          -webkit-font-smoothing: antialiased;\n",
       "          -moz-osx-font-smoothing: grayscale;\n",
       "        }\n",
       "\n",
       "#vfsdazjkcr thead, tbody, tfoot, tr, td, th { border-style: none !important; }\n",
       " tr { background-color: transparent !important; }\n",
       "#vfsdazjkcr p { margin: 0 !important; padding: 0 !important; }\n",
       " #vfsdazjkcr .gt_table { display: table !important; border-collapse: collapse !important; line-height: normal !important; margin-left: auto !important; margin-right: auto !important; color: #333333 !important; font-size: 16px !important; font-weight: normal !important; font-style: normal !important; background-color: #FFFFFF !important; width: auto !important; border-top-style: solid !important; border-top-width: 2px !important; border-top-color: #A8A8A8 !important; border-right-style: none !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; border-bottom-style: hidden !important; border-bottom-width: 2px !important; border-bottom-color: #A8A8A8 !important; border-left-style: none !important; border-left-width: 2px !important; border-left-color: #D3D3D3 !important; }\n",
       " #vfsdazjkcr .gt_caption { padding-top: 4px !important; padding-bottom: 4px !important; }\n",
       " #vfsdazjkcr .gt_title { color: #333333 !important; font-size: 125% !important; font-weight: initial !important; padding-top: 4px !important; padding-bottom: 4px !important; padding-left: 5px !important; padding-right: 5px !important; border-bottom-color: #FFFFFF !important; border-bottom-width: 0 !important; }\n",
       " #vfsdazjkcr .gt_subtitle { color: #333333 !important; font-size: 85% !important; font-weight: initial !important; padding-top: 3px !important; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; border-top-color: #FFFFFF !important; border-top-width: 0 !important; }\n",
       " #vfsdazjkcr .gt_heading { background-color: #FFFFFF !important; text-align: center !important; border-bottom-color: #FFFFFF !important; border-left-style: none !important; border-left-width: 1px !important; border-left-color: #D3D3D3 !important; border-right-style: none !important; border-right-width: 1px !important; border-right-color: #D3D3D3 !important; }\n",
       " #vfsdazjkcr .gt_bottom_border { border-bottom-style: solid !important; border-bottom-width: 2px !important; border-bottom-color: #D3D3D3 !important; }\n",
       " #vfsdazjkcr .gt_col_headings { border-top-style: solid !important; border-top-width: 2px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; border-left-style: none !important; border-left-width: 1px !important; border-left-color: #D3D3D3 !important; border-right-style: none !important; border-right-width: 1px !important; border-right-color: #D3D3D3 !important; }\n",
       " #vfsdazjkcr .gt_col_heading { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: normal !important; text-transform: inherit !important; border-left-style: none !important; border-left-width: 0px !important; border-left-color: white !important; border-right-style: none !important; border-right-width: 0px !important; border-right-color: white !important; vertical-align: bottom !important; padding-top: 4px !important; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; overflow-x: hidden !important; }\n",
       " #vfsdazjkcr .gt_column_spanner_outer { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: normal !important; text-transform: inherit !important; padding-top: 0 !important; padding-bottom: 0 !important; padding-left: 4px !important; padding-right: 4px !important; }\n",
       " #vfsdazjkcr .gt_column_spanner_outer:first-child { padding-left: 0 !important; }\n",
       " #vfsdazjkcr .gt_column_spanner_outer:last-child { padding-right: 0 !important; }\n",
       " #vfsdazjkcr .gt_column_spanner { border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; vertical-align: bottom !important; padding-top: 4px !important; padding-bottom: 4px !important; overflow-x: hidden !important; display: inline-block !important; width: 100% !important; }\n",
       " #vfsdazjkcr .gt_spanner_row { border-bottom-style: hidden !important; }\n",
       " #vfsdazjkcr .gt_group_heading { padding-top: 0px !important; padding-bottom: 0px !important; padding-left: 5px !important; padding-right: 5px !important; color: #333333 !important; background-color: #FFFFFF !important; font-size: 0px !important; font-weight: initial !important; text-transform: inherit !important; border-top-style: solid !important; border-top-width: 0.5px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; border-left-style: none !important; border-left-width: 1px !important; border-left-color: white !important; border-right-style: none !important; border-right-width: 1px !important; border-right-color: white !important; vertical-align: middle !important; text-align: left !important; }\n",
       " #vfsdazjkcr .gt_empty_group_heading { padding: 0.5px !important; color: #333333 !important; background-color: #FFFFFF !important; font-size: 0px !important; font-weight: initial !important; border-top-style: solid !important; border-top-width: 0.5px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; vertical-align: middle !important; }\n",
       " #vfsdazjkcr .gt_from_md> :first-child { margin-top: 0 !important; }\n",
       " #vfsdazjkcr .gt_from_md> :last-child { margin-bottom: 0 !important; }\n",
       " #vfsdazjkcr .gt_row { padding-top: 4px !important; padding-bottom: 4px !important; padding-left: 5px !important; padding-right: 5px !important; margin: 10px !important; border-top-style: none !important; border-top-width: 1px !important; border-top-color: #D3D3D3 !important; border-left-style: none !important; border-left-width: 0px !important; border-left-color: white !important; border-right-style: none !important; border-right-width: 0px !important; border-right-color: white !important; vertical-align: middle !important; overflow-x: hidden !important; }\n",
       " #vfsdazjkcr .gt_stub { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: initial !important; text-transform: inherit !important; border-right-style: hidden !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; padding-left: 5px !important; padding-right: 5px !important; }\n",
       " #vfsdazjkcr .gt_stub_row_group { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: initial !important; text-transform: inherit !important; border-right-style: solid !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; padding-left: 5px !important; padding-right: 5px !important; vertical-align: top !important; }\n",
       " #vfsdazjkcr .gt_row_group_first td { border-top-width: 0.5px !important; }\n",
       " #vfsdazjkcr .gt_row_group_first th { border-top-width: 0.5px !important; }\n",
       " #vfsdazjkcr .gt_striped { background-color: rgba(128,128,128,0.05) !important; }\n",
       " #vfsdazjkcr .gt_table_body { border-top-style: solid !important; border-top-width: 0.5px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 2px !important; border-bottom-color: black !important; }\n",
       " #vfsdazjkcr .gt_sourcenotes { color: #333333 !important; background-color: #FFFFFF !important; border-bottom-style: none !important; border-bottom-width: 2px !important; border-bottom-color: #D3D3D3 !important; border-left-style: none !important; border-left-width: 2px !important; border-left-color: #D3D3D3 !important; border-right-style: none !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; }\n",
       " #vfsdazjkcr .gt_sourcenote { font-size: 90% !important; padding-top: 4px !important; padding-bottom: 4px !important; padding-left: 5px !important; padding-right: 5px !important; text-align: left !important; }\n",
       " #vfsdazjkcr .gt_left { text-align: left !important; }\n",
       " #vfsdazjkcr .gt_center { text-align: center !important; }\n",
       " #vfsdazjkcr .gt_right { text-align: right !important; font-variant-numeric: tabular-nums !important; }\n",
       " #vfsdazjkcr .gt_font_normal { font-weight: normal !important; }\n",
       " #vfsdazjkcr .gt_font_bold { font-weight: bold !important; }\n",
       " #vfsdazjkcr .gt_font_italic { font-style: italic !important; }\n",
       " #vfsdazjkcr .gt_super { font-size: 65% !important; }\n",
       " #vfsdazjkcr .gt_footnote_marks { font-size: 75% !important; vertical-align: 0.4em !important; position: initial !important; }\n",
       " #vfsdazjkcr .gt_asterisk { font-size: 100% !important; vertical-align: 0 !important; }\n",
       " \n",
       "</style>\n",
       "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n",
       "<thead>\n",
       "\n",
       "<tr class=\"gt_col_headings gt_spanner_row\">\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"2\" colspan=\"1\" scope=\"col\" id=\"\"></th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y0\">\n",
       "    <span class=\"gt_column_spanner\">y0</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y1\">\n",
       "    <span class=\"gt_column_spanner\">y1</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y2\">\n",
       "    <span class=\"gt_column_spanner\">y2</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y3\">\n",
       "    <span class=\"gt_column_spanner\">y3</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y4\">\n",
       "    <span class=\"gt_column_spanner\">y4</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y5\">\n",
       "    <span class=\"gt_column_spanner\">y5</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y6\">\n",
       "    <span class=\"gt_column_spanner\">y6</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y7\">\n",
       "    <span class=\"gt_column_spanner\">y7</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y8\">\n",
       "    <span class=\"gt_column_spanner\">y8</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y9\">\n",
       "    <span class=\"gt_column_spanner\">y9</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y10\">\n",
       "    <span class=\"gt_column_spanner\">y10</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y11\">\n",
       "    <span class=\"gt_column_spanner\">y11</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y12\">\n",
       "    <span class=\"gt_column_spanner\">y12</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y13\">\n",
       "    <span class=\"gt_column_spanner\">y13</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y14\">\n",
       "    <span class=\"gt_column_spanner\">y14</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y15\">\n",
       "    <span class=\"gt_column_spanner\">y15</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y16\">\n",
       "    <span class=\"gt_column_spanner\">y16</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y17\">\n",
       "    <span class=\"gt_column_spanner\">y17</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y18\">\n",
       "    <span class=\"gt_column_spanner\">y18</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y19\">\n",
       "    <span class=\"gt_column_spanner\">y19</span>\n",
       "  </th>\n",
       "</tr>\n",
       "<tr class=\"gt_col_headings\">\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(1)\">(1)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(2)\">(2)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(3)\">(3)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(4)\">(4)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(5)\">(5)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(6)\">(6)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(7)\">(7)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(8)\">(8)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(9)\">(9)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(10)\">(10)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(11)\">(11)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(12)\">(12)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(13)\">(13)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(14)\">(14)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(15)\">(15)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(16)\">(16)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(17)\">(17)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(18)\">(18)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(19)\">(19)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(20)\">(20)</th>\n",
       "</tr>\n",
       "</thead>\n",
       "<tbody class=\"gt_table_body\">\n",
       "  <tr class=\"gt_group_heading_row\">\n",
       "    <th class=\"gt_group_heading\" colspan=\"21\">coef</th>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X0</th>\n",
       "    <td class=\"gt_row gt_center\">0.079 <br> (0.119)</td>\n",
       "    <td class=\"gt_row gt_center\">0.111 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">0.088 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">0.158 <br> (0.094)</td>\n",
       "    <td class=\"gt_row gt_center\">0.033 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.011 <br> (0.100)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.223* <br> (0.100)</td>\n",
       "    <td class=\"gt_row gt_center\">0.020 <br> (0.117)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.172* <br> (0.083)</td>\n",
       "    <td class=\"gt_row gt_center\">0.068 <br> (0.082)</td>\n",
       "    <td class=\"gt_row gt_center\">0.009 <br> (0.114)</td>\n",
       "    <td class=\"gt_row gt_center\">0.023 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">0.002 <br> (0.099)</td>\n",
       "    <td class=\"gt_row gt_center\">0.100 <br> (0.092)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.068 <br> (0.098)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.022 <br> (0.100)</td>\n",
       "    <td class=\"gt_row gt_center\">0.153 <br> (0.123)</td>\n",
       "    <td class=\"gt_row gt_center\">0.231* <br> (0.095)</td>\n",
       "    <td class=\"gt_row gt_center\">0.113 <br> (0.120)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.051 <br> (0.079)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X1</th>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.064 <br> (0.093)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.065 <br> (0.108)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.055 <br> (0.107)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.055 <br> (0.097)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.013 <br> (0.101)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.036 <br> (0.092)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.038 <br> (0.100)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.052 <br> (0.112)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.080 <br> (0.084)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.072 <br> (0.088)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.002 <br> (0.092)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.049 <br> (0.124)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.017 <br> (0.102)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.061 <br> (0.099)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.023 <br> (0.086)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.017 <br> (0.090)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.159 <br> (0.113)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.032 <br> (0.122)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">-0.144 <br> (0.100)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.064 <br> (0.088)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X2</th>\n",
       "    <td class=\"gt_row gt_center\">-0.165 <br> (0.116)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.181 <br> (0.125)</td>\n",
       "    <td class=\"gt_row gt_center\">0.107 <br> (0.090)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.027 <br> (0.094)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.080 <br> (0.111)</td>\n",
       "    <td class=\"gt_row gt_center\">0.009 <br> (0.079)</td>\n",
       "    <td class=\"gt_row gt_center\">0.185 <br> (0.098)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.023 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">0.025 <br> (0.075)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.155 <br> (0.086)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.008 <br> (0.095)</td>\n",
       "    <td class=\"gt_row gt_center\">0.175 <br> (0.116)</td>\n",
       "    <td class=\"gt_row gt_center\">0.153 <br> (0.091)</td>\n",
       "    <td class=\"gt_row gt_center\">0.127 <br> (0.090)</td>\n",
       "    <td class=\"gt_row gt_center\">0.042 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">0.142 <br> (0.094)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.081 <br> (0.116)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.195 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.200 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">0.015 <br> (0.095)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X3</th>\n",
       "    <td class=\"gt_row gt_center\">-0.110 <br> (0.089)</td>\n",
       "    <td class=\"gt_row gt_center\">0.133 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">0.018 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">0.006 <br> (0.090)</td>\n",
       "    <td class=\"gt_row gt_center\">0.036 <br> (0.100)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.083 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">0.202* <br> (0.094)</td>\n",
       "    <td class=\"gt_row gt_center\">0.105 <br> (0.118)</td>\n",
       "    <td class=\"gt_row gt_center\">0.005 <br> (0.081)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.003 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">0.015 <br> (0.115)</td>\n",
       "    <td class=\"gt_row gt_center\">0.095 <br> (0.093)</td>\n",
       "    <td class=\"gt_row gt_center\">0.030 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">0.076 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.080 <br> (0.085)</td>\n",
       "    <td class=\"gt_row gt_center\">0.067 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.057 <br> (0.127)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.016 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">0.051 <br> (0.102)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.003 <br> (0.088)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X4</th>\n",
       "    <td class=\"gt_row gt_center\">0.017 <br> (0.114)</td>\n",
       "    <td class=\"gt_row gt_center\">0.124 <br> (0.128)</td>\n",
       "    <td class=\"gt_row gt_center\">0.126 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.014 <br> (0.085)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.120 <br> (0.100)</td>\n",
       "    <td class=\"gt_row gt_center\">0.067 <br> (0.094)</td>\n",
       "    <td class=\"gt_row gt_center\">0.118 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.035 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.127 <br> (0.075)</td>\n",
       "    <td class=\"gt_row gt_center\">0.126 <br> (0.094)</td>\n",
       "    <td class=\"gt_row gt_center\">0.004 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">0.035 <br> (0.120)</td>\n",
       "    <td class=\"gt_row gt_center\">0.200* <br> (0.098)</td>\n",
       "    <td class=\"gt_row gt_center\">0.011 <br> (0.119)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.222** <br> (0.083)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.131 <br> (0.095)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.029 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">0.146 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.104 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">0.018 <br> (0.084)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">Intercept</th>\n",
       "    <td class=\"gt_row gt_center\">0.121 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">0.020 <br> (0.115)</td>\n",
       "    <td class=\"gt_row gt_center\">0.191 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">0.103 <br> (0.086)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.069 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.090 <br> (0.096)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.010 <br> (0.099)</td>\n",
       "    <td class=\"gt_row gt_center\">0.021 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.024 <br> (0.082)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.026 <br> (0.102)</td>\n",
       "    <td class=\"gt_row gt_center\">0.103 <br> (0.111)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.130 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">0.132 <br> (0.098)</td>\n",
       "    <td class=\"gt_row gt_center\">0.004 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.043 <br> (0.088)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.046 <br> (0.100)</td>\n",
       "    <td class=\"gt_row gt_center\">0.115 <br> (0.111)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.084 <br> (0.114)</td>\n",
       "    <td class=\"gt_row gt_center\">0.066 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">0.014 <br> (0.090)</td>\n",
       "  </tr>\n",
       "  <tr class=\"gt_group_heading_row\">\n",
       "    <th class=\"gt_group_heading\" colspan=\"21\">stats</th>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">Observations</th>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">S.E. type</th>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">R<sup>2</sup></th>\n",
       "    <td class=\"gt_row gt_center\">0.039</td>\n",
       "    <td class=\"gt_row gt_center\">0.068</td>\n",
       "    <td class=\"gt_row gt_center\">0.037</td>\n",
       "    <td class=\"gt_row gt_center\">0.033</td>\n",
       "    <td class=\"gt_row gt_center\">0.022</td>\n",
       "    <td class=\"gt_row gt_center\">0.015</td>\n",
       "    <td class=\"gt_row gt_center\">0.144</td>\n",
       "    <td class=\"gt_row gt_center\">0.015</td>\n",
       "    <td class=\"gt_row gt_center\">0.063</td>\n",
       "    <td class=\"gt_row gt_center\">0.051</td>\n",
       "    <td class=\"gt_row gt_center\">0.000</td>\n",
       "    <td class=\"gt_row gt_center\">0.035</td>\n",
       "    <td class=\"gt_row gt_center\">0.068</td>\n",
       "    <td class=\"gt_row gt_center\">0.037</td>\n",
       "    <td class=\"gt_row gt_center\">0.079</td>\n",
       "    <td class=\"gt_row gt_center\">0.040</td>\n",
       "    <td class=\"gt_row gt_center\">0.057</td>\n",
       "    <td class=\"gt_row gt_center\">0.078</td>\n",
       "    <td class=\"gt_row gt_center\">0.069</td>\n",
       "    <td class=\"gt_row gt_center\">0.009</td>\n",
       "  </tr>\n",
       "</tbody>\n",
       "  <tfoot class=\"gt_sourcenotes\">\n",
       "  \n",
       "  <tr>\n",
       "    <td class=\"gt_sourcenote\" colspan=\"21\">Significance levels: * p &lt; 0.05, ** p &lt; 0.01, *** p &lt; 0.001. Format of coefficient cell:\n",
       "Coefficient \n",
       " (Std. Error)</td>\n",
       "  </tr>\n",
       "\n",
       "</tfoot>\n",
       "\n",
       "</table>\n",
       "\n",
       "</div>\n",
       "        "
      ],
      "text/plain": [
       "GT(_tbl_data=  level_0        level_1                    0                    1  \\\n",
       "0    coef             X0   0.079 <br> (0.119)   0.111 <br> (0.108)   \n",
       "1    coef             X1  -0.064 <br> (0.093)  -0.065 <br> (0.108)   \n",
       "2    coef             X2  -0.165 <br> (0.116)  -0.181 <br> (0.125)   \n",
       "3    coef             X3  -0.110 <br> (0.089)   0.133 <br> (0.108)   \n",
       "4    coef             X4   0.017 <br> (0.114)   0.124 <br> (0.128)   \n",
       "5    coef      Intercept   0.121 <br> (0.101)   0.020 <br> (0.115)   \n",
       "6   stats   Observations                  100                  100   \n",
       "7   stats      S.E. type               hetero               hetero   \n",
       "8   stats  R<sup>2</sup>                0.039                0.068   \n",
       "\n",
       "                     2                    3                    4  \\\n",
       "0   0.088 <br> (0.105)   0.158 <br> (0.094)   0.033 <br> (0.112)   \n",
       "1  -0.055 <br> (0.107)  -0.055 <br> (0.097)  -0.013 <br> (0.101)   \n",
       "2   0.107 <br> (0.090)  -0.027 <br> (0.094)  -0.080 <br> (0.111)   \n",
       "3   0.018 <br> (0.110)   0.006 <br> (0.090)   0.036 <br> (0.100)   \n",
       "4   0.126 <br> (0.107)  -0.014 <br> (0.085)  -0.120 <br> (0.100)   \n",
       "5   0.191 <br> (0.108)   0.103 <br> (0.086)  -0.069 <br> (0.103)   \n",
       "6                  100                  100                  100   \n",
       "7               hetero               hetero               hetero   \n",
       "8                0.037                0.033                0.022   \n",
       "\n",
       "                     5                     6                    7  ...  \\\n",
       "0  -0.011 <br> (0.100)  -0.223* <br> (0.100)   0.020 <br> (0.117)  ...   \n",
       "1   0.036 <br> (0.092)   -0.038 <br> (0.100)  -0.052 <br> (0.112)  ...   \n",
       "2   0.009 <br> (0.079)    0.185 <br> (0.098)  -0.023 <br> (0.108)  ...   \n",
       "3  -0.083 <br> (0.105)   0.202* <br> (0.094)   0.105 <br> (0.118)  ...   \n",
       "4   0.067 <br> (0.094)    0.118 <br> (0.105)  -0.035 <br> (0.107)  ...   \n",
       "5  -0.090 <br> (0.096)   -0.010 <br> (0.099)   0.021 <br> (0.103)  ...   \n",
       "6                  100                   100                  100  ...   \n",
       "7               hetero                hetero               hetero  ...   \n",
       "8                0.015                 0.144                0.015  ...   \n",
       "\n",
       "                    10                   11                   12  \\\n",
       "0   0.009 <br> (0.114)   0.023 <br> (0.106)   0.002 <br> (0.099)   \n",
       "1   0.002 <br> (0.092)   0.049 <br> (0.124)  -0.017 <br> (0.102)   \n",
       "2  -0.008 <br> (0.095)   0.175 <br> (0.116)   0.153 <br> (0.091)   \n",
       "3   0.015 <br> (0.115)   0.095 <br> (0.093)   0.030 <br> (0.103)   \n",
       "4   0.004 <br> (0.101)   0.035 <br> (0.120)  0.200* <br> (0.098)   \n",
       "5   0.103 <br> (0.111)  -0.130 <br> (0.112)   0.132 <br> (0.098)   \n",
       "6                  100                  100                  100   \n",
       "7               hetero               hetero               hetero   \n",
       "8                0.000                0.035                0.068   \n",
       "\n",
       "                   13                     14                   15  \\\n",
       "0  0.100 <br> (0.092)    -0.068 <br> (0.098)  -0.022 <br> (0.100)   \n",
       "1  0.061 <br> (0.099)    -0.023 <br> (0.086)  -0.017 <br> (0.090)   \n",
       "2  0.127 <br> (0.090)     0.042 <br> (0.105)   0.142 <br> (0.094)   \n",
       "3  0.076 <br> (0.112)    -0.080 <br> (0.085)   0.067 <br> (0.106)   \n",
       "4  0.011 <br> (0.119)  -0.222** <br> (0.083)  -0.131 <br> (0.095)   \n",
       "5  0.004 <br> (0.104)    -0.043 <br> (0.088)  -0.046 <br> (0.100)   \n",
       "6                 100                    100                  100   \n",
       "7              hetero                 hetero               hetero   \n",
       "8               0.037                  0.079                0.040   \n",
       "\n",
       "                    16                   17                   18  \\\n",
       "0   0.153 <br> (0.123)  0.231* <br> (0.095)   0.113 <br> (0.120)   \n",
       "1   0.159 <br> (0.113)   0.032 <br> (0.122)  -0.144 <br> (0.100)   \n",
       "2  -0.081 <br> (0.116)  -0.195 <br> (0.105)  -0.200 <br> (0.107)   \n",
       "3  -0.057 <br> (0.127)  -0.016 <br> (0.106)   0.051 <br> (0.102)   \n",
       "4  -0.029 <br> (0.113)   0.146 <br> (0.106)  -0.104 <br> (0.109)   \n",
       "5   0.115 <br> (0.111)  -0.084 <br> (0.114)   0.066 <br> (0.109)   \n",
       "6                  100                  100                  100   \n",
       "7               hetero               hetero               hetero   \n",
       "8                0.057                0.078                0.069   \n",
       "\n",
       "                    19  \n",
       "0  -0.051 <br> (0.079)  \n",
       "1   0.064 <br> (0.088)  \n",
       "2   0.015 <br> (0.095)  \n",
       "3  -0.003 <br> (0.088)  \n",
       "4   0.018 <br> (0.084)  \n",
       "5   0.014 <br> (0.090)  \n",
       "6                  100  \n",
       "7               hetero  \n",
       "8                0.009  \n",
       "\n",
       "[9 rows x 22 columns], _body=<great_tables._gt_data.Body object at 0x0000026AE9D5FE00>, _boxhead=Boxhead([ColInfo(var='level_0', type=<ColInfoTypeEnum.row_group: 3>, column_label='level_0', column_align='center', column_width=None), ColInfo(var='level_1', type=<ColInfoTypeEnum.stub: 2>, column_label='level_1', column_align='center', column_width=None), ColInfo(var='0', type=<ColInfoTypeEnum.default: 1>, column_label='(1)', column_align='center', column_width=None), ColInfo(var='1', type=<ColInfoTypeEnum.default: 1>, column_label='(2)', column_align='center', column_width=None), ColInfo(var='2', type=<ColInfoTypeEnum.default: 1>, column_label='(3)', column_align='center', column_width=None), ColInfo(var='3', type=<ColInfoTypeEnum.default: 1>, column_label='(4)', column_align='center', column_width=None), ColInfo(var='4', type=<ColInfoTypeEnum.default: 1>, column_label='(5)', column_align='center', column_width=None), ColInfo(var='5', type=<ColInfoTypeEnum.default: 1>, column_label='(6)', column_align='center', column_width=None), ColInfo(var='6', type=<ColInfoTypeEnum.default: 1>, column_label='(7)', column_align='center', column_width=None), ColInfo(var='7', type=<ColInfoTypeEnum.default: 1>, column_label='(8)', column_align='center', column_width=None), ColInfo(var='8', type=<ColInfoTypeEnum.default: 1>, column_label='(9)', column_align='center', column_width=None), ColInfo(var='9', type=<ColInfoTypeEnum.default: 1>, column_label='(10)', column_align='center', column_width=None), ColInfo(var='10', type=<ColInfoTypeEnum.default: 1>, column_label='(11)', column_align='center', column_width=None), ColInfo(var='11', type=<ColInfoTypeEnum.default: 1>, column_label='(12)', column_align='center', column_width=None), ColInfo(var='12', type=<ColInfoTypeEnum.default: 1>, column_label='(13)', column_align='center', column_width=None), ColInfo(var='13', type=<ColInfoTypeEnum.default: 1>, column_label='(14)', column_align='center', column_width=None), ColInfo(var='14', type=<ColInfoTypeEnum.default: 1>, column_label='(15)', column_align='center', column_width=None), ColInfo(var='15', type=<ColInfoTypeEnum.default: 1>, column_label='(16)', column_align='center', column_width=None), ColInfo(var='16', type=<ColInfoTypeEnum.default: 1>, column_label='(17)', column_align='center', column_width=None), ColInfo(var='17', type=<ColInfoTypeEnum.default: 1>, column_label='(18)', column_align='center', column_width=None), ColInfo(var='18', type=<ColInfoTypeEnum.default: 1>, column_label='(19)', column_align='center', column_width=None), ColInfo(var='19', type=<ColInfoTypeEnum.default: 1>, column_label='(20)', column_align='center', column_width=None)]), _stub=<great_tables._gt_data.Stub object at 0x0000026A926558E0>, _spanners=Spanners([SpannerInfo(spanner_id='y0', spanner_level=1, spanner_label='y0', spanner_units=None, spanner_pattern=None, vars=['0'], built=None), SpannerInfo(spanner_id='y1', spanner_level=1, spanner_label='y1', spanner_units=None, spanner_pattern=None, vars=['1'], built=None), SpannerInfo(spanner_id='y2', spanner_level=1, spanner_label='y2', spanner_units=None, spanner_pattern=None, vars=['2'], built=None), SpannerInfo(spanner_id='y3', spanner_level=1, spanner_label='y3', spanner_units=None, spanner_pattern=None, vars=['3'], built=None), SpannerInfo(spanner_id='y4', spanner_level=1, spanner_label='y4', spanner_units=None, spanner_pattern=None, vars=['4'], built=None), SpannerInfo(spanner_id='y5', spanner_level=1, spanner_label='y5', spanner_units=None, spanner_pattern=None, vars=['5'], built=None), SpannerInfo(spanner_id='y6', spanner_level=1, spanner_label='y6', spanner_units=None, spanner_pattern=None, vars=['6'], built=None), SpannerInfo(spanner_id='y7', spanner_level=1, spanner_label='y7', spanner_units=None, spanner_pattern=None, vars=['7'], built=None), SpannerInfo(spanner_id='y8', spanner_level=1, spanner_label='y8', spanner_units=None, spanner_pattern=None, vars=['8'], built=None), SpannerInfo(spanner_id='y9', spanner_level=1, spanner_label='y9', spanner_units=None, spanner_pattern=None, vars=['9'], built=None), SpannerInfo(spanner_id='y10', spanner_level=1, spanner_label='y10', spanner_units=None, spanner_pattern=None, vars=['10'], built=None), SpannerInfo(spanner_id='y11', spanner_level=1, spanner_label='y11', spanner_units=None, spanner_pattern=None, vars=['11'], built=None), SpannerInfo(spanner_id='y12', spanner_level=1, spanner_label='y12', spanner_units=None, spanner_pattern=None, vars=['12'], built=None), SpannerInfo(spanner_id='y13', spanner_level=1, spanner_label='y13', spanner_units=None, spanner_pattern=None, vars=['13'], built=None), SpannerInfo(spanner_id='y14', spanner_level=1, spanner_label='y14', spanner_units=None, spanner_pattern=None, vars=['14'], built=None), SpannerInfo(spanner_id='y15', spanner_level=1, spanner_label='y15', spanner_units=None, spanner_pattern=None, vars=['15'], built=None), SpannerInfo(spanner_id='y16', spanner_level=1, spanner_label='y16', spanner_units=None, spanner_pattern=None, vars=['16'], built=None), SpannerInfo(spanner_id='y17', spanner_level=1, spanner_label='y17', spanner_units=None, spanner_pattern=None, vars=['17'], built=None), SpannerInfo(spanner_id='y18', spanner_level=1, spanner_label='y18', spanner_units=None, spanner_pattern=None, vars=['18'], built=None), SpannerInfo(spanner_id='y19', spanner_level=1, spanner_label='y19', spanner_units=None, spanner_pattern=None, vars=['19'], built=None)]), _heading=Heading(title=None, subtitle=None, preheader=None), _stubhead=None, _source_notes=['Significance levels: * p < 0.05, ** p < 0.01, *** p < 0.001. Format of coefficient cell:\\nCoefficient \\n (Std. Error)'], _footnotes=[], _styles=[StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='0', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='1', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='2', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='3', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='4', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='5', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='6', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='7', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='8', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='9', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='10', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='11', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='12', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='13', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='14', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='15', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='16', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='17', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='18', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=1), grpname=None, colname='19', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')])], _locale=<great_tables._gt_data.Locale object at 0x0000026A92796B40>, _formats=[], _substitutions=[], _options=Options(table_id=OptionsInfo(scss=False, category='table', type='value', value=None), table_caption=OptionsInfo(scss=False, category='table', type='value', value=None), table_width=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_layout=OptionsInfo(scss=True, category='table', type='value', value='fixed'), table_margin_left=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_margin_right=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_background_color=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_additional_css=OptionsInfo(scss=False, category='table', type='values', value=[]), table_font_names=OptionsInfo(scss=False, category='table', type='values', value=['-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', 'Fira Sans', 'Droid Sans', 'Arial', 'sans-serif']), table_font_size=OptionsInfo(scss=True, category='table', type='px', value='16px'), table_font_weight=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_style=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_color=OptionsInfo(scss=True, category='table', type='value', value='#333333'), table_font_color_light=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_border_top_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_top_style=OptionsInfo(scss=True, category='table', type='value', value='solid'), table_border_top_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_top_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_right_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_right_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_right_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), table_border_bottom_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_bottom_style=OptionsInfo(scss=True, category='table', type='value', value='hidden'), table_border_bottom_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_bottom_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_left_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_left_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_left_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), heading_background_color=OptionsInfo(scss=True, category='heading', type='value', value=None), heading_align=OptionsInfo(scss=True, category='heading', type='value', value='center'), heading_title_font_size=OptionsInfo(scss=True, category='heading', type='px', value='125%'), heading_title_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_subtitle_font_size=OptionsInfo(scss=True, category='heading', type='px', value='85%'), heading_subtitle_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_padding=OptionsInfo(scss=True, category='heading', type='px', value='4px'), heading_padding_horizontal=OptionsInfo(scss=True, category='heading', type='px', value='5px'), heading_border_bottom_style=OptionsInfo(scss=True, category='heading', type='value', value='solid'), heading_border_bottom_width=OptionsInfo(scss=True, category='heading', type='px', value='2px'), heading_border_bottom_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), heading_border_lr_style=OptionsInfo(scss=True, category='heading', type='value', value='none'), heading_border_lr_width=OptionsInfo(scss=True, category='heading', type='px', value='1px'), heading_border_lr_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), column_labels_background_color=OptionsInfo(scss=True, category='column_labels', type='value', value=None), column_labels_font_size=OptionsInfo(scss=True, category='column_labels', type='px', value='100%'), column_labels_font_weight=OptionsInfo(scss=True, category='column_labels', type='value', value='normal'), column_labels_text_transform=OptionsInfo(scss=True, category='column_labels', type='value', value='inherit'), column_labels_padding=OptionsInfo(scss=True, category='column_labels', type='px', value='4px'), column_labels_padding_horizontal=OptionsInfo(scss=True, category='column_labels', type='px', value='5px'), column_labels_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), column_labels_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='0px'), column_labels_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='white'), column_labels_border_top_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_top_width=OptionsInfo(scss=True, category='column_labels', type='px', value='2px'), column_labels_border_top_color=OptionsInfo(scss=True, category='column_labels', type='value', value='black'), column_labels_border_bottom_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_bottom_width=OptionsInfo(scss=True, category='column_labels', type='px', value='0.5px'), column_labels_border_bottom_color=OptionsInfo(scss=True, category='column_labels', type='value', value='black'), column_labels_border_lr_style=OptionsInfo(scss=True, category='column_labels', type='value', value='none'), column_labels_border_lr_width=OptionsInfo(scss=True, category='column_labels', type='px', value='1px'), column_labels_border_lr_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_hidden=OptionsInfo(scss=False, category='column_labels', type='boolean', value=False), row_group_background_color=OptionsInfo(scss=True, category='row_group', type='value', value=None), row_group_font_size=OptionsInfo(scss=True, category='row_group', type='px', value='0px'), row_group_font_weight=OptionsInfo(scss=True, category='row_group', type='value', value='initial'), row_group_text_transform=OptionsInfo(scss=True, category='row_group', type='value', value='inherit'), row_group_padding=OptionsInfo(scss=True, category='row_group', type='px', value='0px'), row_group_padding_horizontal=OptionsInfo(scss=True, category='row_group', type='px', value='5px'), row_group_border_top_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_top_width=OptionsInfo(scss=True, category='row_group', type='px', value='0.5px'), row_group_border_top_color=OptionsInfo(scss=True, category='row_group', type='value', value='black'), row_group_border_right_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_right_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_right_color=OptionsInfo(scss=True, category='row_group', type='value', value='white'), row_group_border_bottom_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_bottom_width=OptionsInfo(scss=True, category='row_group', type='px', value='0.5px'), row_group_border_bottom_color=OptionsInfo(scss=True, category='row_group', type='value', value='black'), row_group_border_left_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_left_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_left_color=OptionsInfo(scss=True, category='row_group', type='value', value='white'), row_group_as_column=OptionsInfo(scss=False, category='row_group', type='boolean', value=False), table_body_hlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), table_body_hlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), table_body_hlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), table_body_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='0px'), table_body_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='white'), table_body_border_top_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_top_width=OptionsInfo(scss=True, category='table_body', type='px', value='0.5px'), table_body_border_top_color=OptionsInfo(scss=True, category='table_body', type='value', value='black'), table_body_border_bottom_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_bottom_width=OptionsInfo(scss=True, category='table_body', type='px', value='2px'), table_body_border_bottom_color=OptionsInfo(scss=True, category='table_body', type='value', value='black'), data_row_padding=OptionsInfo(scss=True, category='data_row', type='px', value='4px'), data_row_padding_horizontal=OptionsInfo(scss=True, category='data_row', type='px', value='5px'), stub_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_border_style=OptionsInfo(scss=True, category='stub', type='value', value='hidden'), stub_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), stub_row_group_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_row_group_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_row_group_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_row_group_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_row_group_border_style=OptionsInfo(scss=True, category='stub', type='value', value='solid'), stub_row_group_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_row_group_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), source_notes_padding=OptionsInfo(scss=True, category='source_notes', type='px', value='4px'), source_notes_padding_horizontal=OptionsInfo(scss=True, category='source_notes', type='px', value='5px'), source_notes_background_color=OptionsInfo(scss=True, category='source_notes', type='value', value=None), source_notes_font_size=OptionsInfo(scss=True, category='source_notes', type='px', value='90%'), source_notes_border_bottom_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_bottom_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_bottom_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_border_lr_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_lr_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_lr_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_multiline=OptionsInfo(scss=False, category='source_notes', type='boolean', value=True), source_notes_sep=OptionsInfo(scss=False, category='source_notes', type='value', value=' '), row_striping_background_color=OptionsInfo(scss=True, category='row', type='value', value='rgba(128,128,128,0.05)'), row_striping_include_stub=OptionsInfo(scss=False, category='row', type='boolean', value=False), row_striping_include_table_body=OptionsInfo(scss=False, category='row', type='boolean', value=False), container_width=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_height=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_padding_x=OptionsInfo(scss=False, category='container', type='px', value='0px'), container_padding_y=OptionsInfo(scss=False, category='container', type='px', value='10px'), container_overflow_x=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), container_overflow_y=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), quarto_disable_processing=OptionsInfo(scss=False, category='quarto', type='logical', value=False), quarto_use_bootstrap=OptionsInfo(scss=False, category='quarto', type='logical', value=False)), _has_built=False)"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(pf.etable(fit).tab_style(style=style.fill(color=\"yellow\"), locations=loc.body(rows=1)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We see that our estimation produces multiple false positives for the effect of X1 on multiple dependent variables. Recall that \n",
    "we had simulated X1 to have **no effect** on any of the dependent variables. Still, the estimation procedure produces a significant\n",
    "effect for X1 on multiple dependent variables. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`PyFixest` provides three functions to adjust inference for multiple testing: `pf.bonferroni()`, `pf.rwolf()`, and `pf.wyoung()`.\n",
    "All three share a common API."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "pval_bonferroni = (\n",
    "    pf.bonferroni(fit.to_list(), param=\"X1\").xs(\"Bonferroni Pr(>|t|)\").values\n",
    ")\n",
    "\n",
    "pval_rwolf = (\n",
    "    pf.rwolf(fit.to_list(), param=\"X1\", reps=1000, seed=22).xs(\"RW Pr(>|t|)\").values\n",
    ")\n",
    "\n",
    "pval_wyoung = (\n",
    "    pf.wyoung(fit.to_list(), param=\"X1\", reps=1000, seed=22).xs(\"WY Pr(>|t|)\").values\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"flwngzppzp\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n",
       "<style>\n",
       "#flwngzppzp table {\n",
       "          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;\n",
       "          -webkit-font-smoothing: antialiased;\n",
       "          -moz-osx-font-smoothing: grayscale;\n",
       "        }\n",
       "\n",
       "#flwngzppzp thead, tbody, tfoot, tr, td, th { border-style: none !important; }\n",
       " tr { background-color: transparent !important; }\n",
       "#flwngzppzp p { margin: 0 !important; padding: 0 !important; }\n",
       " #flwngzppzp .gt_table { display: table !important; border-collapse: collapse !important; line-height: normal !important; margin-left: auto !important; margin-right: auto !important; color: #333333 !important; font-size: 16px !important; font-weight: normal !important; font-style: normal !important; background-color: #FFFFFF !important; width: auto !important; border-top-style: solid !important; border-top-width: 2px !important; border-top-color: #A8A8A8 !important; border-right-style: none !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; border-bottom-style: hidden !important; border-bottom-width: 2px !important; border-bottom-color: #A8A8A8 !important; border-left-style: none !important; border-left-width: 2px !important; border-left-color: #D3D3D3 !important; }\n",
       " #flwngzppzp .gt_caption { padding-top: 4px !important; padding-bottom: 4px !important; }\n",
       " #flwngzppzp .gt_title { color: #333333 !important; font-size: 125% !important; font-weight: initial !important; padding-top: 4px !important; padding-bottom: 4px !important; padding-left: 5px !important; padding-right: 5px !important; border-bottom-color: #FFFFFF !important; border-bottom-width: 0 !important; }\n",
       " #flwngzppzp .gt_subtitle { color: #333333 !important; font-size: 85% !important; font-weight: initial !important; padding-top: 3px !important; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; border-top-color: #FFFFFF !important; border-top-width: 0 !important; }\n",
       " #flwngzppzp .gt_heading { background-color: #FFFFFF !important; text-align: center !important; border-bottom-color: #FFFFFF !important; border-left-style: none !important; border-left-width: 1px !important; border-left-color: #D3D3D3 !important; border-right-style: none !important; border-right-width: 1px !important; border-right-color: #D3D3D3 !important; }\n",
       " #flwngzppzp .gt_bottom_border { border-bottom-style: solid !important; border-bottom-width: 2px !important; border-bottom-color: #D3D3D3 !important; }\n",
       " #flwngzppzp .gt_col_headings { border-top-style: solid !important; border-top-width: 2px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; border-left-style: none !important; border-left-width: 1px !important; border-left-color: #D3D3D3 !important; border-right-style: none !important; border-right-width: 1px !important; border-right-color: #D3D3D3 !important; }\n",
       " #flwngzppzp .gt_col_heading { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: normal !important; text-transform: inherit !important; border-left-style: none !important; border-left-width: 0px !important; border-left-color: white !important; border-right-style: none !important; border-right-width: 0px !important; border-right-color: white !important; vertical-align: bottom !important; padding-top: 4px !important; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; overflow-x: hidden !important; }\n",
       " #flwngzppzp .gt_column_spanner_outer { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: normal !important; text-transform: inherit !important; padding-top: 0 !important; padding-bottom: 0 !important; padding-left: 4px !important; padding-right: 4px !important; }\n",
       " #flwngzppzp .gt_column_spanner_outer:first-child { padding-left: 0 !important; }\n",
       " #flwngzppzp .gt_column_spanner_outer:last-child { padding-right: 0 !important; }\n",
       " #flwngzppzp .gt_column_spanner { border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; vertical-align: bottom !important; padding-top: 4px !important; padding-bottom: 4px !important; overflow-x: hidden !important; display: inline-block !important; width: 100% !important; }\n",
       " #flwngzppzp .gt_spanner_row { border-bottom-style: hidden !important; }\n",
       " #flwngzppzp .gt_group_heading { padding-top: 0px !important; padding-bottom: 0px !important; padding-left: 5px !important; padding-right: 5px !important; color: #333333 !important; background-color: #FFFFFF !important; font-size: 0px !important; font-weight: initial !important; text-transform: inherit !important; border-top-style: solid !important; border-top-width: 0.5px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; border-left-style: none !important; border-left-width: 1px !important; border-left-color: white !important; border-right-style: none !important; border-right-width: 1px !important; border-right-color: white !important; vertical-align: middle !important; text-align: left !important; }\n",
       " #flwngzppzp .gt_empty_group_heading { padding: 0.5px !important; color: #333333 !important; background-color: #FFFFFF !important; font-size: 0px !important; font-weight: initial !important; border-top-style: solid !important; border-top-width: 0.5px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; vertical-align: middle !important; }\n",
       " #flwngzppzp .gt_from_md> :first-child { margin-top: 0 !important; }\n",
       " #flwngzppzp .gt_from_md> :last-child { margin-bottom: 0 !important; }\n",
       " #flwngzppzp .gt_row { padding-top: 4px !important; padding-bottom: 4px !important; padding-left: 5px !important; padding-right: 5px !important; margin: 10px !important; border-top-style: none !important; border-top-width: 1px !important; border-top-color: #D3D3D3 !important; border-left-style: none !important; border-left-width: 0px !important; border-left-color: white !important; border-right-style: none !important; border-right-width: 0px !important; border-right-color: white !important; vertical-align: middle !important; overflow-x: hidden !important; }\n",
       " #flwngzppzp .gt_stub { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: initial !important; text-transform: inherit !important; border-right-style: hidden !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; padding-left: 5px !important; padding-right: 5px !important; }\n",
       " #flwngzppzp .gt_stub_row_group { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: initial !important; text-transform: inherit !important; border-right-style: solid !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; padding-left: 5px !important; padding-right: 5px !important; vertical-align: top !important; }\n",
       " #flwngzppzp .gt_row_group_first td { border-top-width: 0.5px !important; }\n",
       " #flwngzppzp .gt_row_group_first th { border-top-width: 0.5px !important; }\n",
       " #flwngzppzp .gt_striped { background-color: rgba(128,128,128,0.05) !important; }\n",
       " #flwngzppzp .gt_table_body { border-top-style: solid !important; border-top-width: 0.5px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 2px !important; border-bottom-color: black !important; }\n",
       " #flwngzppzp .gt_sourcenotes { color: #333333 !important; background-color: #FFFFFF !important; border-bottom-style: none !important; border-bottom-width: 2px !important; border-bottom-color: #D3D3D3 !important; border-left-style: none !important; border-left-width: 2px !important; border-left-color: #D3D3D3 !important; border-right-style: none !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; }\n",
       " #flwngzppzp .gt_sourcenote { font-size: 90% !important; padding-top: 4px !important; padding-bottom: 4px !important; padding-left: 5px !important; padding-right: 5px !important; text-align: left !important; }\n",
       " #flwngzppzp .gt_left { text-align: left !important; }\n",
       " #flwngzppzp .gt_center { text-align: center !important; }\n",
       " #flwngzppzp .gt_right { text-align: right !important; font-variant-numeric: tabular-nums !important; }\n",
       " #flwngzppzp .gt_font_normal { font-weight: normal !important; }\n",
       " #flwngzppzp .gt_font_bold { font-weight: bold !important; }\n",
       " #flwngzppzp .gt_font_italic { font-style: italic !important; }\n",
       " #flwngzppzp .gt_super { font-size: 65% !important; }\n",
       " #flwngzppzp .gt_footnote_marks { font-size: 75% !important; vertical-align: 0.4em !important; position: initial !important; }\n",
       " #flwngzppzp .gt_asterisk { font-size: 100% !important; vertical-align: 0 !important; }\n",
       " \n",
       "</style>\n",
       "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n",
       "<thead>\n",
       "\n",
       "<tr class=\"gt_col_headings gt_spanner_row\">\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"2\" colspan=\"1\" scope=\"col\" id=\"\"></th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y0\">\n",
       "    <span class=\"gt_column_spanner\">y0</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y1\">\n",
       "    <span class=\"gt_column_spanner\">y1</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y2\">\n",
       "    <span class=\"gt_column_spanner\">y2</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y3\">\n",
       "    <span class=\"gt_column_spanner\">y3</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y4\">\n",
       "    <span class=\"gt_column_spanner\">y4</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y5\">\n",
       "    <span class=\"gt_column_spanner\">y5</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y6\">\n",
       "    <span class=\"gt_column_spanner\">y6</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y7\">\n",
       "    <span class=\"gt_column_spanner\">y7</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y8\">\n",
       "    <span class=\"gt_column_spanner\">y8</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y9\">\n",
       "    <span class=\"gt_column_spanner\">y9</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y10\">\n",
       "    <span class=\"gt_column_spanner\">y10</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y11\">\n",
       "    <span class=\"gt_column_spanner\">y11</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y12\">\n",
       "    <span class=\"gt_column_spanner\">y12</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y13\">\n",
       "    <span class=\"gt_column_spanner\">y13</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y14\">\n",
       "    <span class=\"gt_column_spanner\">y14</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y15\">\n",
       "    <span class=\"gt_column_spanner\">y15</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y16\">\n",
       "    <span class=\"gt_column_spanner\">y16</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y17\">\n",
       "    <span class=\"gt_column_spanner\">y17</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y18\">\n",
       "    <span class=\"gt_column_spanner\">y18</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y19\">\n",
       "    <span class=\"gt_column_spanner\">y19</span>\n",
       "  </th>\n",
       "</tr>\n",
       "<tr class=\"gt_col_headings\">\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(1)\">(1)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(2)\">(2)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(3)\">(3)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(4)\">(4)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(5)\">(5)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(6)\">(6)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(7)\">(7)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(8)\">(8)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(9)\">(9)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(10)\">(10)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(11)\">(11)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(12)\">(12)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(13)\">(13)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(14)\">(14)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(15)\">(15)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(16)\">(16)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(17)\">(17)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(18)\">(18)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(19)\">(19)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(20)\">(20)</th>\n",
       "</tr>\n",
       "</thead>\n",
       "<tbody class=\"gt_table_body\">\n",
       "  <tr class=\"gt_group_heading_row\">\n",
       "    <th class=\"gt_group_heading\" colspan=\"21\">coef</th>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X0</th>\n",
       "    <td class=\"gt_row gt_center\">0.192 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.125 <br> (0.122)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.184 <br> (0.095)</td>\n",
       "    <td class=\"gt_row gt_center\">0.067 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.279* <br> (0.118)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.064 <br> (0.123)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.041 <br> (0.093)</td>\n",
       "    <td class=\"gt_row gt_center\">0.079 <br> (0.089)</td>\n",
       "    <td class=\"gt_row gt_center\">0.050 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">0.075 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">0.059 <br> (0.096)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.163 <br> (0.094)</td>\n",
       "    <td class=\"gt_row gt_center\">0.172 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">0.090 <br> (0.122)</td>\n",
       "    <td class=\"gt_row gt_center\">0.032 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">0.025 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">0.075 <br> (0.092)</td>\n",
       "    <td class=\"gt_row gt_center\">0.055 <br> (0.126)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.142 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.027 <br> (0.092)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X1</th>\n",
       "    <td class=\"gt_row gt_center\">0.053 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">0.030 <br> (0.124)</td>\n",
       "    <td class=\"gt_row gt_center\">0.162 <br> (0.084)</td>\n",
       "    <td class=\"gt_row gt_center\">0.024 <br> (0.111)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.037 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">0.087 <br> (0.088)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.011 <br> (0.089)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.075 <br> (0.091)</td>\n",
       "    <td class=\"gt_row gt_center\">0.039 <br> (0.102)</td>\n",
       "    <td class=\"gt_row gt_center\">0.083 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.060 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">0.139 <br> (0.089)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.183 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.038 <br> (0.117)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.038 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.191 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.016 <br> (0.095)</td>\n",
       "    <td class=\"gt_row gt_center\">0.128 <br> (0.099)</td>\n",
       "    <td class=\"gt_row gt_center\">0.074 <br> (0.099)</td>\n",
       "    <td class=\"gt_row gt_center\">0.120 <br> (0.088)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X2</th>\n",
       "    <td class=\"gt_row gt_center\">-0.164 <br> (0.095)</td>\n",
       "    <td class=\"gt_row gt_center\">0.140 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">0.058 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.065 <br> (0.095)</td>\n",
       "    <td class=\"gt_row gt_center\">0.003 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">0.282** <br> (0.098)</td>\n",
       "    <td class=\"gt_row gt_center\">0.077 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">0.081 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">0.125 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.011 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">0.116 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">0.003 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.138 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.138 <br> (0.091)</td>\n",
       "    <td class=\"gt_row gt_center\">0.053 <br> (0.093)</td>\n",
       "    <td class=\"gt_row gt_center\">0.011 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">0.046 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">0.073 <br> (0.121)</td>\n",
       "    <td class=\"gt_row gt_center\">0.079 <br> (0.134)</td>\n",
       "    <td class=\"gt_row gt_center\">0.187 <br> (0.100)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X3</th>\n",
       "    <td class=\"gt_row gt_center\">0.022 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.041 <br> (0.117)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.015 <br> (0.098)</td>\n",
       "    <td class=\"gt_row gt_center\">0.042 <br> (0.088)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.121 <br> (0.096)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.037 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">0.008 <br> (0.090)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.108 <br> (0.090)</td>\n",
       "    <td class=\"gt_row gt_center\">0.039 <br> (0.096)</td>\n",
       "    <td class=\"gt_row gt_center\">0.115 <br> (0.118)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.064 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.065 <br> (0.098)</td>\n",
       "    <td class=\"gt_row gt_center\">0.053 <br> (0.100)</td>\n",
       "    <td class=\"gt_row gt_center\">0.062 <br> (0.121)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.099 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">0.173 <br> (0.090)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.036 <br> (0.095)</td>\n",
       "    <td class=\"gt_row gt_center\">0.147 <br> (0.097)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.039 <br> (0.114)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.027 <br> (0.093)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X4</th>\n",
       "    <td class=\"gt_row gt_center\">-0.109 <br> (0.099)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.071 <br> (0.120)</td>\n",
       "    <td class=\"gt_row gt_center\">0.026 <br> (0.093)</td>\n",
       "    <td class=\"gt_row gt_center\">0.064 <br> (0.074)</td>\n",
       "    <td class=\"gt_row gt_center\">0.062 <br> (0.127)</td>\n",
       "    <td class=\"gt_row gt_center\">0.021 <br> (0.088)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.035 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.082 <br> (0.085)</td>\n",
       "    <td class=\"gt_row gt_center\">0.059 <br> (0.093)</td>\n",
       "    <td class=\"gt_row gt_center\">0.027 <br> (0.092)</td>\n",
       "    <td class=\"gt_row gt_center\">0.084 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.123 <br> (0.114)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.142 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">0.105 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">0.004 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">0.002 <br> (0.097)</td>\n",
       "    <td class=\"gt_row gt_center\">0.040 <br> (0.091)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.063 <br> (0.099)</td>\n",
       "    <td class=\"gt_row gt_center\">0.006 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.010 <br> (0.092)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">Intercept</th>\n",
       "    <td class=\"gt_row gt_center\">0.169 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">0.094 <br> (0.117)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.021 <br> (0.097)</td>\n",
       "    <td class=\"gt_row gt_center\">0.188* <br> (0.090)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.034 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.047 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">0.048 <br> (0.098)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.161 <br> (0.092)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.109 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.047 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.227* <br> (0.095)</td>\n",
       "    <td class=\"gt_row gt_center\">0.006 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">0.136 <br> (0.102)</td>\n",
       "    <td class=\"gt_row gt_center\">0.212* <br> (0.097)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.042 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">0.128 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">0.029 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.139 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.052 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">0.049 <br> (0.097)</td>\n",
       "  </tr>\n",
       "  <tr class=\"gt_group_heading_row\">\n",
       "    <th class=\"gt_group_heading\" colspan=\"21\">stats</th>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">Bonferroni: pval(X1)</th>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">RW: pval(X1)</th>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.7273</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.996</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.998</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.999</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.8921</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.8521</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.8162</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.956</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.999</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.954</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">WY: pval(X1)</th>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.727</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.996</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.998</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.999</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.892</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.852</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.816</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">1.0</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.956</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.999</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.954</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">Observations</th>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">S.E. type</th>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "    <td class=\"gt_row gt_center\">hetero</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">R<sup>2</sup></th>\n",
       "    <td class=\"gt_row gt_center\">0.078</td>\n",
       "    <td class=\"gt_row gt_center\">0.030</td>\n",
       "    <td class=\"gt_row gt_center\">0.063</td>\n",
       "    <td class=\"gt_row gt_center\">0.017</td>\n",
       "    <td class=\"gt_row gt_center\">0.079</td>\n",
       "    <td class=\"gt_row gt_center\">0.085</td>\n",
       "    <td class=\"gt_row gt_center\">0.009</td>\n",
       "    <td class=\"gt_row gt_center\">0.048</td>\n",
       "    <td class=\"gt_row gt_center\">0.026</td>\n",
       "    <td class=\"gt_row gt_center\">0.023</td>\n",
       "    <td class=\"gt_row gt_center\">0.033</td>\n",
       "    <td class=\"gt_row gt_center\">0.061</td>\n",
       "    <td class=\"gt_row gt_center\">0.097</td>\n",
       "    <td class=\"gt_row gt_center\">0.040</td>\n",
       "    <td class=\"gt_row gt_center\">0.014</td>\n",
       "    <td class=\"gt_row gt_center\">0.076</td>\n",
       "    <td class=\"gt_row gt_center\">0.011</td>\n",
       "    <td class=\"gt_row gt_center\">0.035</td>\n",
       "    <td class=\"gt_row gt_center\">0.024</td>\n",
       "    <td class=\"gt_row gt_center\">0.051</td>\n",
       "  </tr>\n",
       "</tbody>\n",
       "  <tfoot class=\"gt_sourcenotes\">\n",
       "  \n",
       "  <tr>\n",
       "    <td class=\"gt_sourcenote\" colspan=\"21\">Significance levels: * p &lt; 0.05, ** p &lt; 0.01, *** p &lt; 0.001. Format of coefficient cell:\n",
       "Coefficient \n",
       " (Std. Error)</td>\n",
       "  </tr>\n",
       "\n",
       "</tfoot>\n",
       "\n",
       "</table>\n",
       "\n",
       "</div>\n",
       "        "
      ],
      "text/plain": [
       "GT(_tbl_data=   level_0               level_1                    0                    1  \\\n",
       "0     coef                    X0   0.192 <br> (0.105)  -0.125 <br> (0.122)   \n",
       "1     coef                    X1   0.053 <br> (0.104)   0.030 <br> (0.124)   \n",
       "2     coef                    X2  -0.164 <br> (0.095)   0.140 <br> (0.112)   \n",
       "3     coef                    X3   0.022 <br> (0.108)  -0.041 <br> (0.117)   \n",
       "4     coef                    X4  -0.109 <br> (0.099)  -0.071 <br> (0.120)   \n",
       "5     coef             Intercept   0.169 <br> (0.105)   0.094 <br> (0.117)   \n",
       "6    stats  Bonferroni: pval(X1)                  1.0                  1.0   \n",
       "7    stats          RW: pval(X1)                  1.0                  1.0   \n",
       "8    stats          WY: pval(X1)                  1.0                  1.0   \n",
       "9    stats          Observations                  100                  100   \n",
       "10   stats             S.E. type               hetero               hetero   \n",
       "11   stats         R<sup>2</sup>                0.078                0.030   \n",
       "\n",
       "                      2                    3                     4  \\\n",
       "0   -0.184 <br> (0.095)   0.067 <br> (0.110)  -0.279* <br> (0.118)   \n",
       "1    0.162 <br> (0.084)   0.024 <br> (0.111)   -0.037 <br> (0.104)   \n",
       "2    0.058 <br> (0.103)  -0.065 <br> (0.095)    0.003 <br> (0.113)   \n",
       "3   -0.015 <br> (0.098)   0.042 <br> (0.088)   -0.121 <br> (0.096)   \n",
       "4    0.026 <br> (0.093)   0.064 <br> (0.074)    0.062 <br> (0.127)   \n",
       "5   -0.021 <br> (0.097)  0.188* <br> (0.090)   -0.034 <br> (0.112)   \n",
       "6                   1.0                  1.0                   1.0   \n",
       "7                0.7273                  1.0                   1.0   \n",
       "8                 0.727                  1.0                   1.0   \n",
       "9                   100                  100                   100   \n",
       "10               hetero               hetero                hetero   \n",
       "11                0.063                0.017                 0.079   \n",
       "\n",
       "                       5                    6                    7  ...  \\\n",
       "0    -0.064 <br> (0.123)  -0.041 <br> (0.093)   0.079 <br> (0.089)  ...   \n",
       "1     0.087 <br> (0.088)  -0.011 <br> (0.089)  -0.075 <br> (0.091)  ...   \n",
       "2   0.282** <br> (0.098)   0.077 <br> (0.110)   0.081 <br> (0.110)  ...   \n",
       "3    -0.037 <br> (0.101)   0.008 <br> (0.090)  -0.108 <br> (0.090)  ...   \n",
       "4     0.021 <br> (0.088)  -0.035 <br> (0.104)  -0.082 <br> (0.085)  ...   \n",
       "5    -0.047 <br> (0.101)   0.048 <br> (0.098)  -0.161 <br> (0.092)  ...   \n",
       "6                    1.0                  1.0                  1.0  ...   \n",
       "7                  0.996                  1.0                0.998  ...   \n",
       "8                  0.996                  1.0                0.998  ...   \n",
       "9                    100                  100                  100  ...   \n",
       "10                hetero               hetero               hetero  ...   \n",
       "11                 0.085                0.009                0.048  ...   \n",
       "\n",
       "                      10                   11                   12  \\\n",
       "0     0.059 <br> (0.096)  -0.163 <br> (0.094)   0.172 <br> (0.110)   \n",
       "1    -0.060 <br> (0.101)   0.139 <br> (0.089)  -0.183 <br> (0.109)   \n",
       "2     0.116 <br> (0.109)   0.003 <br> (0.107)  -0.138 <br> (0.109)   \n",
       "3    -0.064 <br> (0.109)  -0.065 <br> (0.098)   0.053 <br> (0.100)   \n",
       "4     0.084 <br> (0.105)  -0.123 <br> (0.114)  -0.142 <br> (0.107)   \n",
       "5   -0.227* <br> (0.095)   0.006 <br> (0.101)   0.136 <br> (0.102)   \n",
       "6                    1.0                  1.0                  1.0   \n",
       "7                    1.0               0.8921               0.8521   \n",
       "8                    1.0                0.892                0.852   \n",
       "9                    100                  100                  100   \n",
       "10                hetero               hetero               hetero   \n",
       "11                 0.033                0.061                0.097   \n",
       "\n",
       "                     13                   14                   15  \\\n",
       "0    0.090 <br> (0.122)   0.032 <br> (0.104)   0.025 <br> (0.106)   \n",
       "1   -0.038 <br> (0.117)  -0.038 <br> (0.112)  -0.191 <br> (0.108)   \n",
       "2   -0.138 <br> (0.091)   0.053 <br> (0.093)   0.011 <br> (0.109)   \n",
       "3    0.062 <br> (0.121)  -0.099 <br> (0.107)   0.173 <br> (0.090)   \n",
       "4    0.105 <br> (0.103)   0.004 <br> (0.113)   0.002 <br> (0.097)   \n",
       "5   0.212* <br> (0.097)  -0.042 <br> (0.103)   0.128 <br> (0.104)   \n",
       "6                   1.0                  1.0                  1.0   \n",
       "7                   1.0                  1.0               0.8162   \n",
       "8                   1.0                  1.0                0.816   \n",
       "9                   100                  100                  100   \n",
       "10               hetero               hetero               hetero   \n",
       "11                0.040                0.014                0.076   \n",
       "\n",
       "                     16                   17                   18  \\\n",
       "0    0.075 <br> (0.092)   0.055 <br> (0.126)  -0.142 <br> (0.101)   \n",
       "1   -0.016 <br> (0.095)   0.128 <br> (0.099)   0.074 <br> (0.099)   \n",
       "2    0.046 <br> (0.103)   0.073 <br> (0.121)   0.079 <br> (0.134)   \n",
       "3   -0.036 <br> (0.095)   0.147 <br> (0.097)  -0.039 <br> (0.114)   \n",
       "4    0.040 <br> (0.091)  -0.063 <br> (0.099)   0.006 <br> (0.105)   \n",
       "5    0.029 <br> (0.103)  -0.139 <br> (0.110)  -0.052 <br> (0.106)   \n",
       "6                   1.0                  1.0                  1.0   \n",
       "7                   1.0                0.956                0.999   \n",
       "8                   1.0                0.956                0.999   \n",
       "9                   100                  100                  100   \n",
       "10               hetero               hetero               hetero   \n",
       "11                0.011                0.035                0.024   \n",
       "\n",
       "                     19  \n",
       "0   -0.027 <br> (0.092)  \n",
       "1    0.120 <br> (0.088)  \n",
       "2    0.187 <br> (0.100)  \n",
       "3   -0.027 <br> (0.093)  \n",
       "4   -0.010 <br> (0.092)  \n",
       "5    0.049 <br> (0.097)  \n",
       "6                   1.0  \n",
       "7                 0.954  \n",
       "8                 0.954  \n",
       "9                   100  \n",
       "10               hetero  \n",
       "11                0.051  \n",
       "\n",
       "[12 rows x 22 columns], _body=<great_tables._gt_data.Body object at 0x0000026A927D3DA0>, _boxhead=Boxhead([ColInfo(var='level_0', type=<ColInfoTypeEnum.row_group: 3>, column_label='level_0', column_align='center', column_width=None), ColInfo(var='level_1', type=<ColInfoTypeEnum.stub: 2>, column_label='level_1', column_align='center', column_width=None), ColInfo(var='0', type=<ColInfoTypeEnum.default: 1>, column_label='(1)', column_align='center', column_width=None), ColInfo(var='1', type=<ColInfoTypeEnum.default: 1>, column_label='(2)', column_align='center', column_width=None), ColInfo(var='2', type=<ColInfoTypeEnum.default: 1>, column_label='(3)', column_align='center', column_width=None), ColInfo(var='3', type=<ColInfoTypeEnum.default: 1>, column_label='(4)', column_align='center', column_width=None), ColInfo(var='4', type=<ColInfoTypeEnum.default: 1>, column_label='(5)', column_align='center', column_width=None), ColInfo(var='5', type=<ColInfoTypeEnum.default: 1>, column_label='(6)', column_align='center', column_width=None), ColInfo(var='6', type=<ColInfoTypeEnum.default: 1>, column_label='(7)', column_align='center', column_width=None), ColInfo(var='7', type=<ColInfoTypeEnum.default: 1>, column_label='(8)', column_align='center', column_width=None), ColInfo(var='8', type=<ColInfoTypeEnum.default: 1>, column_label='(9)', column_align='center', column_width=None), ColInfo(var='9', type=<ColInfoTypeEnum.default: 1>, column_label='(10)', column_align='center', column_width=None), ColInfo(var='10', type=<ColInfoTypeEnum.default: 1>, column_label='(11)', column_align='center', column_width=None), ColInfo(var='11', type=<ColInfoTypeEnum.default: 1>, column_label='(12)', column_align='center', column_width=None), ColInfo(var='12', type=<ColInfoTypeEnum.default: 1>, column_label='(13)', column_align='center', column_width=None), ColInfo(var='13', type=<ColInfoTypeEnum.default: 1>, column_label='(14)', column_align='center', column_width=None), ColInfo(var='14', type=<ColInfoTypeEnum.default: 1>, column_label='(15)', column_align='center', column_width=None), ColInfo(var='15', type=<ColInfoTypeEnum.default: 1>, column_label='(16)', column_align='center', column_width=None), ColInfo(var='16', type=<ColInfoTypeEnum.default: 1>, column_label='(17)', column_align='center', column_width=None), ColInfo(var='17', type=<ColInfoTypeEnum.default: 1>, column_label='(18)', column_align='center', column_width=None), ColInfo(var='18', type=<ColInfoTypeEnum.default: 1>, column_label='(19)', column_align='center', column_width=None), ColInfo(var='19', type=<ColInfoTypeEnum.default: 1>, column_label='(20)', column_align='center', column_width=None)]), _stub=<great_tables._gt_data.Stub object at 0x0000026A926F1040>, _spanners=Spanners([SpannerInfo(spanner_id='y0', spanner_level=1, spanner_label='y0', spanner_units=None, spanner_pattern=None, vars=['0'], built=None), SpannerInfo(spanner_id='y1', spanner_level=1, spanner_label='y1', spanner_units=None, spanner_pattern=None, vars=['1'], built=None), SpannerInfo(spanner_id='y2', spanner_level=1, spanner_label='y2', spanner_units=None, spanner_pattern=None, vars=['2'], built=None), SpannerInfo(spanner_id='y3', spanner_level=1, spanner_label='y3', spanner_units=None, spanner_pattern=None, vars=['3'], built=None), SpannerInfo(spanner_id='y4', spanner_level=1, spanner_label='y4', spanner_units=None, spanner_pattern=None, vars=['4'], built=None), SpannerInfo(spanner_id='y5', spanner_level=1, spanner_label='y5', spanner_units=None, spanner_pattern=None, vars=['5'], built=None), SpannerInfo(spanner_id='y6', spanner_level=1, spanner_label='y6', spanner_units=None, spanner_pattern=None, vars=['6'], built=None), SpannerInfo(spanner_id='y7', spanner_level=1, spanner_label='y7', spanner_units=None, spanner_pattern=None, vars=['7'], built=None), SpannerInfo(spanner_id='y8', spanner_level=1, spanner_label='y8', spanner_units=None, spanner_pattern=None, vars=['8'], built=None), SpannerInfo(spanner_id='y9', spanner_level=1, spanner_label='y9', spanner_units=None, spanner_pattern=None, vars=['9'], built=None), SpannerInfo(spanner_id='y10', spanner_level=1, spanner_label='y10', spanner_units=None, spanner_pattern=None, vars=['10'], built=None), SpannerInfo(spanner_id='y11', spanner_level=1, spanner_label='y11', spanner_units=None, spanner_pattern=None, vars=['11'], built=None), SpannerInfo(spanner_id='y12', spanner_level=1, spanner_label='y12', spanner_units=None, spanner_pattern=None, vars=['12'], built=None), SpannerInfo(spanner_id='y13', spanner_level=1, spanner_label='y13', spanner_units=None, spanner_pattern=None, vars=['13'], built=None), SpannerInfo(spanner_id='y14', spanner_level=1, spanner_label='y14', spanner_units=None, spanner_pattern=None, vars=['14'], built=None), SpannerInfo(spanner_id='y15', spanner_level=1, spanner_label='y15', spanner_units=None, spanner_pattern=None, vars=['15'], built=None), SpannerInfo(spanner_id='y16', spanner_level=1, spanner_label='y16', spanner_units=None, spanner_pattern=None, vars=['16'], built=None), SpannerInfo(spanner_id='y17', spanner_level=1, spanner_label='y17', spanner_units=None, spanner_pattern=None, vars=['17'], built=None), SpannerInfo(spanner_id='y18', spanner_level=1, spanner_label='y18', spanner_units=None, spanner_pattern=None, vars=['18'], built=None), SpannerInfo(spanner_id='y19', spanner_level=1, spanner_label='y19', spanner_units=None, spanner_pattern=None, vars=['19'], built=None)]), _heading=Heading(title=None, subtitle=None, preheader=None), _stubhead=None, _source_notes=['Significance levels: * p < 0.05, ** p < 0.01, *** p < 0.001. Format of coefficient cell:\\nCoefficient \\n (Std. Error)'], _footnotes=[], _styles=[StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='0', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='0', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='0', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='1', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='1', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='1', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='2', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='2', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='2', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='3', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='3', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='3', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='4', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='4', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='4', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='5', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='5', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='5', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='6', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='6', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='6', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='7', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='7', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='7', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='8', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='8', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='8', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='9', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='9', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='9', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='10', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='10', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='10', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='11', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='11', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='11', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='12', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='12', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='12', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='13', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='13', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='13', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='14', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='14', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='14', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='15', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='15', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='15', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='16', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='16', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='16', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='17', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='17', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='17', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='18', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='18', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='18', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='19', rownum=6, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='19', rownum=7, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[6, 7, 8]), grpname=None, colname='19', rownum=8, colnum=None, styles=[CellStyleFill(color='yellow')])], _locale=<great_tables._gt_data.Locale object at 0x0000026A926F0920>, _formats=[], _substitutions=[], _options=Options(table_id=OptionsInfo(scss=False, category='table', type='value', value=None), table_caption=OptionsInfo(scss=False, category='table', type='value', value=None), table_width=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_layout=OptionsInfo(scss=True, category='table', type='value', value='fixed'), table_margin_left=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_margin_right=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_background_color=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_additional_css=OptionsInfo(scss=False, category='table', type='values', value=[]), table_font_names=OptionsInfo(scss=False, category='table', type='values', value=['-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', 'Fira Sans', 'Droid Sans', 'Arial', 'sans-serif']), table_font_size=OptionsInfo(scss=True, category='table', type='px', value='16px'), table_font_weight=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_style=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_color=OptionsInfo(scss=True, category='table', type='value', value='#333333'), table_font_color_light=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_border_top_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_top_style=OptionsInfo(scss=True, category='table', type='value', value='solid'), table_border_top_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_top_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_right_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_right_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_right_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), table_border_bottom_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_bottom_style=OptionsInfo(scss=True, category='table', type='value', value='hidden'), table_border_bottom_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_bottom_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_left_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_left_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_left_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), heading_background_color=OptionsInfo(scss=True, category='heading', type='value', value=None), heading_align=OptionsInfo(scss=True, category='heading', type='value', value='center'), heading_title_font_size=OptionsInfo(scss=True, category='heading', type='px', value='125%'), heading_title_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_subtitle_font_size=OptionsInfo(scss=True, category='heading', type='px', value='85%'), heading_subtitle_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_padding=OptionsInfo(scss=True, category='heading', type='px', value='4px'), heading_padding_horizontal=OptionsInfo(scss=True, category='heading', type='px', value='5px'), heading_border_bottom_style=OptionsInfo(scss=True, category='heading', type='value', value='solid'), heading_border_bottom_width=OptionsInfo(scss=True, category='heading', type='px', value='2px'), heading_border_bottom_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), heading_border_lr_style=OptionsInfo(scss=True, category='heading', type='value', value='none'), heading_border_lr_width=OptionsInfo(scss=True, category='heading', type='px', value='1px'), heading_border_lr_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), column_labels_background_color=OptionsInfo(scss=True, category='column_labels', type='value', value=None), column_labels_font_size=OptionsInfo(scss=True, category='column_labels', type='px', value='100%'), column_labels_font_weight=OptionsInfo(scss=True, category='column_labels', type='value', value='normal'), column_labels_text_transform=OptionsInfo(scss=True, category='column_labels', type='value', value='inherit'), column_labels_padding=OptionsInfo(scss=True, category='column_labels', type='px', value='4px'), column_labels_padding_horizontal=OptionsInfo(scss=True, category='column_labels', type='px', value='5px'), column_labels_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), column_labels_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='0px'), column_labels_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='white'), column_labels_border_top_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_top_width=OptionsInfo(scss=True, category='column_labels', type='px', value='2px'), column_labels_border_top_color=OptionsInfo(scss=True, category='column_labels', type='value', value='black'), column_labels_border_bottom_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_bottom_width=OptionsInfo(scss=True, category='column_labels', type='px', value='0.5px'), column_labels_border_bottom_color=OptionsInfo(scss=True, category='column_labels', type='value', value='black'), column_labels_border_lr_style=OptionsInfo(scss=True, category='column_labels', type='value', value='none'), column_labels_border_lr_width=OptionsInfo(scss=True, category='column_labels', type='px', value='1px'), column_labels_border_lr_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_hidden=OptionsInfo(scss=False, category='column_labels', type='boolean', value=False), row_group_background_color=OptionsInfo(scss=True, category='row_group', type='value', value=None), row_group_font_size=OptionsInfo(scss=True, category='row_group', type='px', value='0px'), row_group_font_weight=OptionsInfo(scss=True, category='row_group', type='value', value='initial'), row_group_text_transform=OptionsInfo(scss=True, category='row_group', type='value', value='inherit'), row_group_padding=OptionsInfo(scss=True, category='row_group', type='px', value='0px'), row_group_padding_horizontal=OptionsInfo(scss=True, category='row_group', type='px', value='5px'), row_group_border_top_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_top_width=OptionsInfo(scss=True, category='row_group', type='px', value='0.5px'), row_group_border_top_color=OptionsInfo(scss=True, category='row_group', type='value', value='black'), row_group_border_right_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_right_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_right_color=OptionsInfo(scss=True, category='row_group', type='value', value='white'), row_group_border_bottom_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_bottom_width=OptionsInfo(scss=True, category='row_group', type='px', value='0.5px'), row_group_border_bottom_color=OptionsInfo(scss=True, category='row_group', type='value', value='black'), row_group_border_left_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_left_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_left_color=OptionsInfo(scss=True, category='row_group', type='value', value='white'), row_group_as_column=OptionsInfo(scss=False, category='row_group', type='boolean', value=False), table_body_hlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), table_body_hlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), table_body_hlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), table_body_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='0px'), table_body_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='white'), table_body_border_top_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_top_width=OptionsInfo(scss=True, category='table_body', type='px', value='0.5px'), table_body_border_top_color=OptionsInfo(scss=True, category='table_body', type='value', value='black'), table_body_border_bottom_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_bottom_width=OptionsInfo(scss=True, category='table_body', type='px', value='2px'), table_body_border_bottom_color=OptionsInfo(scss=True, category='table_body', type='value', value='black'), data_row_padding=OptionsInfo(scss=True, category='data_row', type='px', value='4px'), data_row_padding_horizontal=OptionsInfo(scss=True, category='data_row', type='px', value='5px'), stub_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_border_style=OptionsInfo(scss=True, category='stub', type='value', value='hidden'), stub_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), stub_row_group_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_row_group_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_row_group_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_row_group_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_row_group_border_style=OptionsInfo(scss=True, category='stub', type='value', value='solid'), stub_row_group_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_row_group_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), source_notes_padding=OptionsInfo(scss=True, category='source_notes', type='px', value='4px'), source_notes_padding_horizontal=OptionsInfo(scss=True, category='source_notes', type='px', value='5px'), source_notes_background_color=OptionsInfo(scss=True, category='source_notes', type='value', value=None), source_notes_font_size=OptionsInfo(scss=True, category='source_notes', type='px', value='90%'), source_notes_border_bottom_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_bottom_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_bottom_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_border_lr_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_lr_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_lr_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_multiline=OptionsInfo(scss=False, category='source_notes', type='boolean', value=True), source_notes_sep=OptionsInfo(scss=False, category='source_notes', type='value', value=' '), row_striping_background_color=OptionsInfo(scss=True, category='row', type='value', value='rgba(128,128,128,0.05)'), row_striping_include_stub=OptionsInfo(scss=False, category='row', type='boolean', value=False), row_striping_include_table_body=OptionsInfo(scss=False, category='row', type='boolean', value=False), container_width=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_height=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_padding_x=OptionsInfo(scss=False, category='container', type='px', value='0px'), container_padding_y=OptionsInfo(scss=False, category='container', type='px', value='10px'), container_overflow_x=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), container_overflow_y=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), quarto_disable_processing=OptionsInfo(scss=False, category='quarto', type='logical', value=False), quarto_use_bootstrap=OptionsInfo(scss=False, category='quarto', type='logical', value=False)), _has_built=False)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(\n",
    "    pf.etable(\n",
    "        fit,\n",
    "        custom_model_stats={\n",
    "            \"Bonferroni: pval(X1)\": pval_bonferroni.round(4).tolist(),\n",
    "            \"RW: pval(X1)\": pval_rwolf.round(4).tolist(),\n",
    "            \"WY: pval(X1)\": pval_wyoung.round(4).tolist(),\n",
    "        },\n",
    "    ).tab_style(style=style.fill(color=\"yellow\"), locations=loc.body(rows=[6, 7, 8]))\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We quickly see that the corrected p-values do not flag any false positives. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Controlling for the Familiy-Wise Error Rate (FWER)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "vscode": {
     "languageId": "markdown"
    }
   },
   "source": [
    "We now show by means of simulation that the three methods control the family-wise error rate (FWER). To do so, we simulate 1000 \n",
    "data sets imposing true nulls for the effect of X1 on all of 20 created dependent variables. \n",
    "For each simulation, we then count if the methods flag more than one false positive and report our results. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def compute_family_rejection(seed, rho):\n",
    "    \"Simulate data, estimate models, and compute family rejection rates.\"\n",
    "    data = get_data(N, n_covariates, n_depvars, rho, seed=seed)\n",
    "    fit = pf.feols(fml=fml, data=data, vcov=\"hetero\")\n",
    "    df = fit.tidy().reset_index().set_index(\"Coefficient\").xs(\"X1\")\n",
    "\n",
    "    df[\"Pr(>|t|) reject\"] = df[\"Pr(>|t|)\"] < 0.05\n",
    "    df[\"Bonferroni reject\"] = (\n",
    "        pf.bonferroni(fit, param=\"X1\").xs(\"Bonferroni Pr(>|t|)\").values < 0.05\n",
    "    )\n",
    "    df[\"rwolf reject\"] = (\n",
    "        pf.rwolf(fit, param=\"X1\", reps=1000, seed=seed * 11).xs(\"RW Pr(>|t|)\").values\n",
    "        < 0.05\n",
    "    )\n",
    "    df[\"wyoung reject\"] = (\n",
    "        pf.wyoung(fit, param=\"X1\", reps=1000, seed=seed * 11).xs(\"WY Pr(>|t|)\").values\n",
    "        < 0.05\n",
    "    )\n",
    "\n",
    "    # Compute family rejection means\n",
    "    family_rejection = {\n",
    "        \"Pr(>|t|) reject family\": df[\"Pr(>|t|) reject\"].sum() > 0,\n",
    "        \"Bonferroni reject family\": df[\"Bonferroni reject\"].sum() > 0,\n",
    "        \"rwolf reject family\": df[\"rwolf reject\"].sum() > 0,\n",
    "        \"wyoung reject family\": df[\"wyoung reject\"].sum() > 0,\n",
    "    }\n",
    "\n",
    "    return pd.Series(family_rejection)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def run_fwer_simulation(n_iter, rho):\n",
    "    \"Run simulation for family-wise error rate.\"\n",
    "    results = Parallel(n_jobs=-1)(\n",
    "        delayed(compute_family_rejection)(seed, rho=rho) for seed in tqdm(range(n_iter))\n",
    "    )\n",
    "    return pd.concat(results).reset_index().groupby(\"index\").mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 1000/1000 [19:03<00:00,  1.14s/it]\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>index</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Bonferroni reject family</th>\n",
       "      <td>0.069</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Pr(&gt;|t|) reject family</th>\n",
       "      <td>0.694</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>rwolf reject family</th>\n",
       "      <td>0.043</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>wyoung reject family</th>\n",
       "      <td>0.043</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                              0\n",
       "index                          \n",
       "Bonferroni reject family  0.069\n",
       "Pr(>|t|) reject family    0.694\n",
       "rwolf reject family       0.043\n",
       "wyoung reject family      0.043"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "run_fwer_simulation(n_iter=1000, rho=0.5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We see that all three correction methods get close to the desired 5% level. In contrast, the uncorrected method produces the expected much higher family-wise error rate. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Power \n",
    "\n",
    "Now that we've seen that all three methods effectively handle false positives, let's see how well they avoid **false negatives**. \n",
    "In other words, we will study how powerful all three methods are in detecting true effects. \n",
    "\n",
    "To do so, we slightly have to adjust the data generating process. Instead of simulating the impact of X1 on all dependent variables \n",
    "to be zero (a true null effect), we will now simulate the impact of X1 to be $0.5$ for all dependent variables. Hence \n",
    "we simulate **true positives** and count how often we correctly detect the true effect, or, equivalently stated, how often we correctly reject \n",
    "the null of no treatment effect. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_data_true_effect(N, n_covariates, n_depvars, rho=0.5, seed=12345, effect=0.1):\n",
    "    \"Generate data with true positives.\"\n",
    "    rng = np.random.default_rng(seed)\n",
    "    Omega = np.eye(n_depvars)\n",
    "    Omega[Omega != 1] = rho\n",
    "    X = rng.standard_normal((N, n_covariates))\n",
    "    u_joint = np.random.multivariate_normal(np.zeros(n_depvars), Omega, N)\n",
    "    beta = np.zeros((n_covariates, n_depvars))\n",
    "    beta[1, :] = effect\n",
    "    y = X @ beta + u_joint\n",
    "\n",
    "    data = pd.DataFrame(X, columns=[f\"X{i}\" for i in range(n_covariates)])\n",
    "    data = data.assign(**{f\"y{i}\": y[:, i] for i in range(n_depvars)})\n",
    "\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_true = get_data_true_effect(\n",
    "    N=N, n_covariates=n_covariates, n_depvars=n_depvars, rho=0.5, seed=12345, effect=0.5\n",
    ")\n",
    "fit = pf.feols(fml, data=data_true)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div id=\"tnfyjezzch\" style=\"padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;\">\n",
       "<style>\n",
       "#tnfyjezzch table {\n",
       "          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;\n",
       "          -webkit-font-smoothing: antialiased;\n",
       "          -moz-osx-font-smoothing: grayscale;\n",
       "        }\n",
       "\n",
       "#tnfyjezzch thead, tbody, tfoot, tr, td, th { border-style: none !important; }\n",
       " tr { background-color: transparent !important; }\n",
       "#tnfyjezzch p { margin: 0 !important; padding: 0 !important; }\n",
       " #tnfyjezzch .gt_table { display: table !important; border-collapse: collapse !important; line-height: normal !important; margin-left: auto !important; margin-right: auto !important; color: #333333 !important; font-size: 16px !important; font-weight: normal !important; font-style: normal !important; background-color: #FFFFFF !important; width: auto !important; border-top-style: solid !important; border-top-width: 2px !important; border-top-color: #A8A8A8 !important; border-right-style: none !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; border-bottom-style: hidden !important; border-bottom-width: 2px !important; border-bottom-color: #A8A8A8 !important; border-left-style: none !important; border-left-width: 2px !important; border-left-color: #D3D3D3 !important; }\n",
       " #tnfyjezzch .gt_caption { padding-top: 4px !important; padding-bottom: 4px !important; }\n",
       " #tnfyjezzch .gt_title { color: #333333 !important; font-size: 125% !important; font-weight: initial !important; padding-top: 4px !important; padding-bottom: 4px !important; padding-left: 5px !important; padding-right: 5px !important; border-bottom-color: #FFFFFF !important; border-bottom-width: 0 !important; }\n",
       " #tnfyjezzch .gt_subtitle { color: #333333 !important; font-size: 85% !important; font-weight: initial !important; padding-top: 3px !important; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; border-top-color: #FFFFFF !important; border-top-width: 0 !important; }\n",
       " #tnfyjezzch .gt_heading { background-color: #FFFFFF !important; text-align: center !important; border-bottom-color: #FFFFFF !important; border-left-style: none !important; border-left-width: 1px !important; border-left-color: #D3D3D3 !important; border-right-style: none !important; border-right-width: 1px !important; border-right-color: #D3D3D3 !important; }\n",
       " #tnfyjezzch .gt_bottom_border { border-bottom-style: solid !important; border-bottom-width: 2px !important; border-bottom-color: #D3D3D3 !important; }\n",
       " #tnfyjezzch .gt_col_headings { border-top-style: solid !important; border-top-width: 2px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; border-left-style: none !important; border-left-width: 1px !important; border-left-color: #D3D3D3 !important; border-right-style: none !important; border-right-width: 1px !important; border-right-color: #D3D3D3 !important; }\n",
       " #tnfyjezzch .gt_col_heading { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: normal !important; text-transform: inherit !important; border-left-style: none !important; border-left-width: 0px !important; border-left-color: white !important; border-right-style: none !important; border-right-width: 0px !important; border-right-color: white !important; vertical-align: bottom !important; padding-top: 4px !important; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; overflow-x: hidden !important; }\n",
       " #tnfyjezzch .gt_column_spanner_outer { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: normal !important; text-transform: inherit !important; padding-top: 0 !important; padding-bottom: 0 !important; padding-left: 4px !important; padding-right: 4px !important; }\n",
       " #tnfyjezzch .gt_column_spanner_outer:first-child { padding-left: 0 !important; }\n",
       " #tnfyjezzch .gt_column_spanner_outer:last-child { padding-right: 0 !important; }\n",
       " #tnfyjezzch .gt_column_spanner { border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; vertical-align: bottom !important; padding-top: 4px !important; padding-bottom: 4px !important; overflow-x: hidden !important; display: inline-block !important; width: 100% !important; }\n",
       " #tnfyjezzch .gt_spanner_row { border-bottom-style: hidden !important; }\n",
       " #tnfyjezzch .gt_group_heading { padding-top: 0px !important; padding-bottom: 0px !important; padding-left: 5px !important; padding-right: 5px !important; color: #333333 !important; background-color: #FFFFFF !important; font-size: 0px !important; font-weight: initial !important; text-transform: inherit !important; border-top-style: solid !important; border-top-width: 0.5px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; border-left-style: none !important; border-left-width: 1px !important; border-left-color: white !important; border-right-style: none !important; border-right-width: 1px !important; border-right-color: white !important; vertical-align: middle !important; text-align: left !important; }\n",
       " #tnfyjezzch .gt_empty_group_heading { padding: 0.5px !important; color: #333333 !important; background-color: #FFFFFF !important; font-size: 0px !important; font-weight: initial !important; border-top-style: solid !important; border-top-width: 0.5px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 0.5px !important; border-bottom-color: black !important; vertical-align: middle !important; }\n",
       " #tnfyjezzch .gt_from_md> :first-child { margin-top: 0 !important; }\n",
       " #tnfyjezzch .gt_from_md> :last-child { margin-bottom: 0 !important; }\n",
       " #tnfyjezzch .gt_row { padding-top: 4px !important; padding-bottom: 4px !important; padding-left: 5px !important; padding-right: 5px !important; margin: 10px !important; border-top-style: none !important; border-top-width: 1px !important; border-top-color: #D3D3D3 !important; border-left-style: none !important; border-left-width: 0px !important; border-left-color: white !important; border-right-style: none !important; border-right-width: 0px !important; border-right-color: white !important; vertical-align: middle !important; overflow-x: hidden !important; }\n",
       " #tnfyjezzch .gt_stub { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: initial !important; text-transform: inherit !important; border-right-style: hidden !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; padding-left: 5px !important; padding-right: 5px !important; }\n",
       " #tnfyjezzch .gt_stub_row_group { color: #333333 !important; background-color: #FFFFFF !important; font-size: 100% !important; font-weight: initial !important; text-transform: inherit !important; border-right-style: solid !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; padding-left: 5px !important; padding-right: 5px !important; vertical-align: top !important; }\n",
       " #tnfyjezzch .gt_row_group_first td { border-top-width: 0.5px !important; }\n",
       " #tnfyjezzch .gt_row_group_first th { border-top-width: 0.5px !important; }\n",
       " #tnfyjezzch .gt_striped { background-color: rgba(128,128,128,0.05) !important; }\n",
       " #tnfyjezzch .gt_table_body { border-top-style: solid !important; border-top-width: 0.5px !important; border-top-color: black !important; border-bottom-style: solid !important; border-bottom-width: 2px !important; border-bottom-color: black !important; }\n",
       " #tnfyjezzch .gt_sourcenotes { color: #333333 !important; background-color: #FFFFFF !important; border-bottom-style: none !important; border-bottom-width: 2px !important; border-bottom-color: #D3D3D3 !important; border-left-style: none !important; border-left-width: 2px !important; border-left-color: #D3D3D3 !important; border-right-style: none !important; border-right-width: 2px !important; border-right-color: #D3D3D3 !important; }\n",
       " #tnfyjezzch .gt_sourcenote { font-size: 90% !important; padding-top: 4px !important; padding-bottom: 4px !important; padding-left: 5px !important; padding-right: 5px !important; text-align: left !important; }\n",
       " #tnfyjezzch .gt_left { text-align: left !important; }\n",
       " #tnfyjezzch .gt_center { text-align: center !important; }\n",
       " #tnfyjezzch .gt_right { text-align: right !important; font-variant-numeric: tabular-nums !important; }\n",
       " #tnfyjezzch .gt_font_normal { font-weight: normal !important; }\n",
       " #tnfyjezzch .gt_font_bold { font-weight: bold !important; }\n",
       " #tnfyjezzch .gt_font_italic { font-style: italic !important; }\n",
       " #tnfyjezzch .gt_super { font-size: 65% !important; }\n",
       " #tnfyjezzch .gt_footnote_marks { font-size: 75% !important; vertical-align: 0.4em !important; position: initial !important; }\n",
       " #tnfyjezzch .gt_asterisk { font-size: 100% !important; vertical-align: 0 !important; }\n",
       " \n",
       "</style>\n",
       "<table class=\"gt_table\" data-quarto-disable-processing=\"false\" data-quarto-bootstrap=\"false\">\n",
       "<thead>\n",
       "\n",
       "<tr class=\"gt_col_headings gt_spanner_row\">\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_left\" rowspan=\"2\" colspan=\"1\" scope=\"col\" id=\"\"></th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y0\">\n",
       "    <span class=\"gt_column_spanner\">y0</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y1\">\n",
       "    <span class=\"gt_column_spanner\">y1</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y2\">\n",
       "    <span class=\"gt_column_spanner\">y2</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y3\">\n",
       "    <span class=\"gt_column_spanner\">y3</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y4\">\n",
       "    <span class=\"gt_column_spanner\">y4</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y5\">\n",
       "    <span class=\"gt_column_spanner\">y5</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y6\">\n",
       "    <span class=\"gt_column_spanner\">y6</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y7\">\n",
       "    <span class=\"gt_column_spanner\">y7</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y8\">\n",
       "    <span class=\"gt_column_spanner\">y8</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y9\">\n",
       "    <span class=\"gt_column_spanner\">y9</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y10\">\n",
       "    <span class=\"gt_column_spanner\">y10</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y11\">\n",
       "    <span class=\"gt_column_spanner\">y11</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y12\">\n",
       "    <span class=\"gt_column_spanner\">y12</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y13\">\n",
       "    <span class=\"gt_column_spanner\">y13</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y14\">\n",
       "    <span class=\"gt_column_spanner\">y14</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y15\">\n",
       "    <span class=\"gt_column_spanner\">y15</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y16\">\n",
       "    <span class=\"gt_column_spanner\">y16</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y17\">\n",
       "    <span class=\"gt_column_spanner\">y17</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y18\">\n",
       "    <span class=\"gt_column_spanner\">y18</span>\n",
       "  </th>\n",
       "  <th class=\"gt_center gt_columns_top_border gt_column_spanner_outer\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"y19\">\n",
       "    <span class=\"gt_column_spanner\">y19</span>\n",
       "  </th>\n",
       "</tr>\n",
       "<tr class=\"gt_col_headings\">\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(1)\">(1)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(2)\">(2)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(3)\">(3)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(4)\">(4)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(5)\">(5)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(6)\">(6)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(7)\">(7)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(8)\">(8)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(9)\">(9)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(10)\">(10)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(11)\">(11)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(12)\">(12)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(13)\">(13)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(14)\">(14)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(15)\">(15)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(16)\">(16)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(17)\">(17)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(18)\">(18)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(19)\">(19)</th>\n",
       "  <th class=\"gt_col_heading gt_columns_bottom_border gt_center\" rowspan=\"1\" colspan=\"1\" scope=\"col\" id=\"(20)\">(20)</th>\n",
       "</tr>\n",
       "</thead>\n",
       "<tbody class=\"gt_table_body\">\n",
       "  <tr class=\"gt_group_heading_row\">\n",
       "    <th class=\"gt_group_heading\" colspan=\"21\">coef</th>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X0</th>\n",
       "    <td class=\"gt_row gt_center\">-0.108 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.152 <br> (0.116)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.243* <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.026 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.158 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.132 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.155 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.180 <br> (0.114)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.254* <br> (0.111)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.157 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.066 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.005 <br> (0.115)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.214* <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.183 <br> (0.115)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.007 <br> (0.099)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.138 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.104 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.138 <br> (0.111)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.102 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.154 <br> (0.098)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X1</th>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.538*** <br> (0.099)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.493*** <br> (0.112)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.589*** <br> (0.109)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.503*** <br> (0.108)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.340** <br> (0.106)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.493*** <br> (0.104)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.568*** <br> (0.100)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.590*** <br> (0.110)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.502*** <br> (0.107)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.505*** <br> (0.102)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.375*** <br> (0.105)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.411*** <br> (0.111)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.452*** <br> (0.098)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.586*** <br> (0.111)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.438*** <br> (0.096)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.558*** <br> (0.101)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.408*** <br> (0.103)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.442*** <br> (0.107)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.498*** <br> (0.106)</td>\n",
       "    <td style=\"background-color: yellow;\" class=\"gt_row gt_center\">0.572*** <br> (0.095)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X2</th>\n",
       "    <td class=\"gt_row gt_center\">0.081 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">0.026 <br> (0.114)</td>\n",
       "    <td class=\"gt_row gt_center\">0.094 <br> (0.111)</td>\n",
       "    <td class=\"gt_row gt_center\">0.094 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">0.008 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.036 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.054 <br> (0.102)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.014 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.043 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.042 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">0.128 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.043 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">0.039 <br> (0.099)</td>\n",
       "    <td class=\"gt_row gt_center\">0.053 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.048 <br> (0.097)</td>\n",
       "    <td class=\"gt_row gt_center\">0.027 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.021 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">0.019 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">0.015 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.106 <br> (0.097)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X3</th>\n",
       "    <td class=\"gt_row gt_center\">-0.068 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.110 <br> (0.117)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.033 <br> (0.114)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.098 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.127 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.086 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.056 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.094 <br> (0.115)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.092 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.064 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.099 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.003 <br> (0.116)</td>\n",
       "    <td class=\"gt_row gt_center\">0.032 <br> (0.102)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.157 <br> (0.116)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.085 <br> (0.100)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.017 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.147 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.027 <br> (0.111)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.067 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.088 <br> (0.099)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">X4</th>\n",
       "    <td class=\"gt_row gt_center\">-0.063 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">0.013 <br> (0.114)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.142 <br> (0.111)</td>\n",
       "    <td class=\"gt_row gt_center\">0.002 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">0.086 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.092 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.059 <br> (0.102)</td>\n",
       "    <td class=\"gt_row gt_center\">0.030 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.013 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.067 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">0.068 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.134 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.012 <br> (0.099)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.021 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">0.046 <br> (0.097)</td>\n",
       "    <td class=\"gt_row gt_center\">0.076 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.033 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.019 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.073 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">0.061 <br> (0.096)</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">Intercept</th>\n",
       "    <td class=\"gt_row gt_center\">-0.007 <br> (0.100)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.061 <br> (0.113)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.010 <br> (0.110)</td>\n",
       "    <td class=\"gt_row gt_center\">0.060 <br> (0.109)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.035 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">0.003 <br> (0.105)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.013 <br> (0.101)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.014 <br> (0.111)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.029 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">0.063 <br> (0.103)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.003 <br> (0.106)</td>\n",
       "    <td class=\"gt_row gt_center\">0.071 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">0.117 <br> (0.098)</td>\n",
       "    <td class=\"gt_row gt_center\">0.022 <br> (0.112)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.013 <br> (0.097)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.034 <br> (0.102)</td>\n",
       "    <td class=\"gt_row gt_center\">0.054 <br> (0.104)</td>\n",
       "    <td class=\"gt_row gt_center\">-0.013 <br> (0.108)</td>\n",
       "    <td class=\"gt_row gt_center\">0.027 <br> (0.107)</td>\n",
       "    <td class=\"gt_row gt_center\">0.053 <br> (0.096)</td>\n",
       "  </tr>\n",
       "  <tr class=\"gt_group_heading_row\">\n",
       "    <th class=\"gt_group_heading\" colspan=\"21\">stats</th>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">Observations</th>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "    <td class=\"gt_row gt_center\">100</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">S.E. type</th>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "    <td class=\"gt_row gt_center\">iid</td>\n",
       "  </tr>\n",
       "  <tr>\n",
       "    <th class=\"gt_row gt_left gt_stub\">R<sup>2</sup></th>\n",
       "    <td class=\"gt_row gt_center\">0.259</td>\n",
       "    <td class=\"gt_row gt_center\">0.202</td>\n",
       "    <td class=\"gt_row gt_center\">0.264</td>\n",
       "    <td class=\"gt_row gt_center\">0.214</td>\n",
       "    <td class=\"gt_row gt_center\">0.146</td>\n",
       "    <td class=\"gt_row gt_center\">0.226</td>\n",
       "    <td class=\"gt_row gt_center\">0.288</td>\n",
       "    <td class=\"gt_row gt_center\">0.269</td>\n",
       "    <td class=\"gt_row gt_center\">0.239</td>\n",
       "    <td class=\"gt_row gt_center\">0.238</td>\n",
       "    <td class=\"gt_row gt_center\">0.151</td>\n",
       "    <td class=\"gt_row gt_center\">0.149</td>\n",
       "    <td class=\"gt_row gt_center\">0.207</td>\n",
       "    <td class=\"gt_row gt_center\">0.273</td>\n",
       "    <td class=\"gt_row gt_center\">0.218</td>\n",
       "    <td class=\"gt_row gt_center\">0.267</td>\n",
       "    <td class=\"gt_row gt_center\">0.186</td>\n",
       "    <td class=\"gt_row gt_center\">0.170</td>\n",
       "    <td class=\"gt_row gt_center\">0.213</td>\n",
       "    <td class=\"gt_row gt_center\">0.333</td>\n",
       "  </tr>\n",
       "</tbody>\n",
       "  <tfoot class=\"gt_sourcenotes\">\n",
       "  \n",
       "  <tr>\n",
       "    <td class=\"gt_sourcenote\" colspan=\"21\">Significance levels: * p &lt; 0.05, ** p &lt; 0.01, *** p &lt; 0.001. Format of coefficient cell:\n",
       "Coefficient \n",
       " (Std. Error)</td>\n",
       "  </tr>\n",
       "\n",
       "</tfoot>\n",
       "\n",
       "</table>\n",
       "\n",
       "</div>\n",
       "        "
      ],
      "text/plain": [
       "GT(_tbl_data=  level_0        level_1                      0                      1  \\\n",
       "0    coef             X0    -0.108 <br> (0.103)    -0.152 <br> (0.116)   \n",
       "1    coef             X1  0.538*** <br> (0.099)  0.493*** <br> (0.112)   \n",
       "2    coef             X2     0.081 <br> (0.101)     0.026 <br> (0.114)   \n",
       "3    coef             X3    -0.068 <br> (0.104)    -0.110 <br> (0.117)   \n",
       "4    coef             X4    -0.063 <br> (0.101)     0.013 <br> (0.114)   \n",
       "5    coef      Intercept    -0.007 <br> (0.100)    -0.061 <br> (0.113)   \n",
       "6   stats   Observations                    100                    100   \n",
       "7   stats      S.E. type                    iid                    iid   \n",
       "8   stats  R<sup>2</sup>                  0.259                  0.202   \n",
       "\n",
       "                       2                      3                     4  \\\n",
       "0   -0.243* <br> (0.113)    -0.026 <br> (0.112)   -0.158 <br> (0.109)   \n",
       "1  0.589*** <br> (0.109)  0.503*** <br> (0.108)  0.340** <br> (0.106)   \n",
       "2     0.094 <br> (0.111)     0.094 <br> (0.110)    0.008 <br> (0.108)   \n",
       "3    -0.033 <br> (0.114)    -0.098 <br> (0.113)   -0.127 <br> (0.110)   \n",
       "4    -0.142 <br> (0.111)     0.002 <br> (0.110)    0.086 <br> (0.107)   \n",
       "5    -0.010 <br> (0.110)     0.060 <br> (0.109)   -0.035 <br> (0.107)   \n",
       "6                    100                    100                   100   \n",
       "7                    iid                    iid                   iid   \n",
       "8                  0.264                  0.214                 0.146   \n",
       "\n",
       "                       5                      6                      7  ...  \\\n",
       "0    -0.132 <br> (0.108)    -0.155 <br> (0.104)    -0.180 <br> (0.114)  ...   \n",
       "1  0.493*** <br> (0.104)  0.568*** <br> (0.100)  0.590*** <br> (0.110)  ...   \n",
       "2    -0.036 <br> (0.106)    -0.054 <br> (0.102)    -0.014 <br> (0.112)  ...   \n",
       "3    -0.086 <br> (0.109)    -0.056 <br> (0.104)    -0.094 <br> (0.115)  ...   \n",
       "4    -0.092 <br> (0.106)    -0.059 <br> (0.102)     0.030 <br> (0.112)  ...   \n",
       "5     0.003 <br> (0.105)    -0.013 <br> (0.101)    -0.014 <br> (0.111)  ...   \n",
       "6                    100                    100                    100  ...   \n",
       "7                    iid                    iid                    iid  ...   \n",
       "8                  0.226                  0.288                  0.269  ...   \n",
       "\n",
       "                      10                     11                     12  \\\n",
       "0    -0.066 <br> (0.109)    -0.005 <br> (0.115)   -0.214* <br> (0.101)   \n",
       "1  0.375*** <br> (0.105)  0.411*** <br> (0.111)  0.452*** <br> (0.098)   \n",
       "2     0.128 <br> (0.107)    -0.043 <br> (0.113)     0.039 <br> (0.099)   \n",
       "3    -0.099 <br> (0.110)    -0.003 <br> (0.116)     0.032 <br> (0.102)   \n",
       "4     0.068 <br> (0.107)    -0.134 <br> (0.113)    -0.012 <br> (0.099)   \n",
       "5    -0.003 <br> (0.106)     0.071 <br> (0.112)     0.117 <br> (0.098)   \n",
       "6                    100                    100                    100   \n",
       "7                    iid                    iid                    iid   \n",
       "8                  0.151                  0.149                  0.207   \n",
       "\n",
       "                      13                     14                     15  \\\n",
       "0    -0.183 <br> (0.115)    -0.007 <br> (0.099)    -0.138 <br> (0.105)   \n",
       "1  0.586*** <br> (0.111)  0.438*** <br> (0.096)  0.558*** <br> (0.101)   \n",
       "2     0.053 <br> (0.113)    -0.048 <br> (0.097)     0.027 <br> (0.103)   \n",
       "3    -0.157 <br> (0.116)    -0.085 <br> (0.100)    -0.017 <br> (0.106)   \n",
       "4    -0.021 <br> (0.112)     0.046 <br> (0.097)     0.076 <br> (0.103)   \n",
       "5     0.022 <br> (0.112)    -0.013 <br> (0.097)    -0.034 <br> (0.102)   \n",
       "6                    100                    100                    100   \n",
       "7                    iid                    iid                    iid   \n",
       "8                  0.273                  0.218                  0.267   \n",
       "\n",
       "                      16                     17                     18  \\\n",
       "0    -0.104 <br> (0.107)    -0.138 <br> (0.111)    -0.102 <br> (0.110)   \n",
       "1  0.408*** <br> (0.103)  0.442*** <br> (0.107)  0.498*** <br> (0.106)   \n",
       "2    -0.021 <br> (0.105)     0.019 <br> (0.109)     0.015 <br> (0.108)   \n",
       "3    -0.147 <br> (0.108)    -0.027 <br> (0.111)    -0.067 <br> (0.110)   \n",
       "4    -0.033 <br> (0.105)    -0.019 <br> (0.108)    -0.073 <br> (0.107)   \n",
       "5     0.054 <br> (0.104)    -0.013 <br> (0.108)     0.027 <br> (0.107)   \n",
       "6                    100                    100                    100   \n",
       "7                    iid                    iid                    iid   \n",
       "8                  0.186                  0.170                  0.213   \n",
       "\n",
       "                      19  \n",
       "0    -0.154 <br> (0.098)  \n",
       "1  0.572*** <br> (0.095)  \n",
       "2    -0.106 <br> (0.097)  \n",
       "3    -0.088 <br> (0.099)  \n",
       "4     0.061 <br> (0.096)  \n",
       "5     0.053 <br> (0.096)  \n",
       "6                    100  \n",
       "7                    iid  \n",
       "8                  0.333  \n",
       "\n",
       "[9 rows x 22 columns], _body=<great_tables._gt_data.Body object at 0x0000026A927B64E0>, _boxhead=Boxhead([ColInfo(var='level_0', type=<ColInfoTypeEnum.row_group: 3>, column_label='level_0', column_align='center', column_width=None), ColInfo(var='level_1', type=<ColInfoTypeEnum.stub: 2>, column_label='level_1', column_align='center', column_width=None), ColInfo(var='0', type=<ColInfoTypeEnum.default: 1>, column_label='(1)', column_align='center', column_width=None), ColInfo(var='1', type=<ColInfoTypeEnum.default: 1>, column_label='(2)', column_align='center', column_width=None), ColInfo(var='2', type=<ColInfoTypeEnum.default: 1>, column_label='(3)', column_align='center', column_width=None), ColInfo(var='3', type=<ColInfoTypeEnum.default: 1>, column_label='(4)', column_align='center', column_width=None), ColInfo(var='4', type=<ColInfoTypeEnum.default: 1>, column_label='(5)', column_align='center', column_width=None), ColInfo(var='5', type=<ColInfoTypeEnum.default: 1>, column_label='(6)', column_align='center', column_width=None), ColInfo(var='6', type=<ColInfoTypeEnum.default: 1>, column_label='(7)', column_align='center', column_width=None), ColInfo(var='7', type=<ColInfoTypeEnum.default: 1>, column_label='(8)', column_align='center', column_width=None), ColInfo(var='8', type=<ColInfoTypeEnum.default: 1>, column_label='(9)', column_align='center', column_width=None), ColInfo(var='9', type=<ColInfoTypeEnum.default: 1>, column_label='(10)', column_align='center', column_width=None), ColInfo(var='10', type=<ColInfoTypeEnum.default: 1>, column_label='(11)', column_align='center', column_width=None), ColInfo(var='11', type=<ColInfoTypeEnum.default: 1>, column_label='(12)', column_align='center', column_width=None), ColInfo(var='12', type=<ColInfoTypeEnum.default: 1>, column_label='(13)', column_align='center', column_width=None), ColInfo(var='13', type=<ColInfoTypeEnum.default: 1>, column_label='(14)', column_align='center', column_width=None), ColInfo(var='14', type=<ColInfoTypeEnum.default: 1>, column_label='(15)', column_align='center', column_width=None), ColInfo(var='15', type=<ColInfoTypeEnum.default: 1>, column_label='(16)', column_align='center', column_width=None), ColInfo(var='16', type=<ColInfoTypeEnum.default: 1>, column_label='(17)', column_align='center', column_width=None), ColInfo(var='17', type=<ColInfoTypeEnum.default: 1>, column_label='(18)', column_align='center', column_width=None), ColInfo(var='18', type=<ColInfoTypeEnum.default: 1>, column_label='(19)', column_align='center', column_width=None), ColInfo(var='19', type=<ColInfoTypeEnum.default: 1>, column_label='(20)', column_align='center', column_width=None)]), _stub=<great_tables._gt_data.Stub object at 0x0000026A927952E0>, _spanners=Spanners([SpannerInfo(spanner_id='y0', spanner_level=1, spanner_label='y0', spanner_units=None, spanner_pattern=None, vars=['0'], built=None), SpannerInfo(spanner_id='y1', spanner_level=1, spanner_label='y1', spanner_units=None, spanner_pattern=None, vars=['1'], built=None), SpannerInfo(spanner_id='y2', spanner_level=1, spanner_label='y2', spanner_units=None, spanner_pattern=None, vars=['2'], built=None), SpannerInfo(spanner_id='y3', spanner_level=1, spanner_label='y3', spanner_units=None, spanner_pattern=None, vars=['3'], built=None), SpannerInfo(spanner_id='y4', spanner_level=1, spanner_label='y4', spanner_units=None, spanner_pattern=None, vars=['4'], built=None), SpannerInfo(spanner_id='y5', spanner_level=1, spanner_label='y5', spanner_units=None, spanner_pattern=None, vars=['5'], built=None), SpannerInfo(spanner_id='y6', spanner_level=1, spanner_label='y6', spanner_units=None, spanner_pattern=None, vars=['6'], built=None), SpannerInfo(spanner_id='y7', spanner_level=1, spanner_label='y7', spanner_units=None, spanner_pattern=None, vars=['7'], built=None), SpannerInfo(spanner_id='y8', spanner_level=1, spanner_label='y8', spanner_units=None, spanner_pattern=None, vars=['8'], built=None), SpannerInfo(spanner_id='y9', spanner_level=1, spanner_label='y9', spanner_units=None, spanner_pattern=None, vars=['9'], built=None), SpannerInfo(spanner_id='y10', spanner_level=1, spanner_label='y10', spanner_units=None, spanner_pattern=None, vars=['10'], built=None), SpannerInfo(spanner_id='y11', spanner_level=1, spanner_label='y11', spanner_units=None, spanner_pattern=None, vars=['11'], built=None), SpannerInfo(spanner_id='y12', spanner_level=1, spanner_label='y12', spanner_units=None, spanner_pattern=None, vars=['12'], built=None), SpannerInfo(spanner_id='y13', spanner_level=1, spanner_label='y13', spanner_units=None, spanner_pattern=None, vars=['13'], built=None), SpannerInfo(spanner_id='y14', spanner_level=1, spanner_label='y14', spanner_units=None, spanner_pattern=None, vars=['14'], built=None), SpannerInfo(spanner_id='y15', spanner_level=1, spanner_label='y15', spanner_units=None, spanner_pattern=None, vars=['15'], built=None), SpannerInfo(spanner_id='y16', spanner_level=1, spanner_label='y16', spanner_units=None, spanner_pattern=None, vars=['16'], built=None), SpannerInfo(spanner_id='y17', spanner_level=1, spanner_label='y17', spanner_units=None, spanner_pattern=None, vars=['17'], built=None), SpannerInfo(spanner_id='y18', spanner_level=1, spanner_label='y18', spanner_units=None, spanner_pattern=None, vars=['18'], built=None), SpannerInfo(spanner_id='y19', spanner_level=1, spanner_label='y19', spanner_units=None, spanner_pattern=None, vars=['19'], built=None)]), _heading=Heading(title=None, subtitle=None, preheader=None), _stubhead=None, _source_notes=['Significance levels: * p < 0.05, ** p < 0.01, *** p < 0.001. Format of coefficient cell:\\nCoefficient \\n (Std. Error)'], _footnotes=[], _styles=[StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='0', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='1', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='2', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='3', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='4', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='5', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='6', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='7', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='8', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='9', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='10', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='11', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='12', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='13', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='14', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='15', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='16', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='17', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='18', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')]), StyleInfo(locname=LocBody(columns=None, rows=[1]), grpname=None, colname='19', rownum=1, colnum=None, styles=[CellStyleFill(color='yellow')])], _locale=<great_tables._gt_data.Locale object at 0x0000026A92795AF0>, _formats=[], _substitutions=[], _options=Options(table_id=OptionsInfo(scss=False, category='table', type='value', value=None), table_caption=OptionsInfo(scss=False, category='table', type='value', value=None), table_width=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_layout=OptionsInfo(scss=True, category='table', type='value', value='fixed'), table_margin_left=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_margin_right=OptionsInfo(scss=True, category='table', type='px', value='auto'), table_background_color=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_additional_css=OptionsInfo(scss=False, category='table', type='values', value=[]), table_font_names=OptionsInfo(scss=False, category='table', type='values', value=['-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', 'Fira Sans', 'Droid Sans', 'Arial', 'sans-serif']), table_font_size=OptionsInfo(scss=True, category='table', type='px', value='16px'), table_font_weight=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_style=OptionsInfo(scss=True, category='table', type='value', value='normal'), table_font_color=OptionsInfo(scss=True, category='table', type='value', value='#333333'), table_font_color_light=OptionsInfo(scss=True, category='table', type='value', value='#FFFFFF'), table_border_top_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_top_style=OptionsInfo(scss=True, category='table', type='value', value='solid'), table_border_top_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_top_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_right_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_right_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_right_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), table_border_bottom_include=OptionsInfo(scss=False, category='table', type='boolean', value=True), table_border_bottom_style=OptionsInfo(scss=True, category='table', type='value', value='hidden'), table_border_bottom_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_bottom_color=OptionsInfo(scss=True, category='table', type='value', value='#A8A8A8'), table_border_left_style=OptionsInfo(scss=True, category='table', type='value', value='none'), table_border_left_width=OptionsInfo(scss=True, category='table', type='px', value='2px'), table_border_left_color=OptionsInfo(scss=True, category='table', type='value', value='#D3D3D3'), heading_background_color=OptionsInfo(scss=True, category='heading', type='value', value=None), heading_align=OptionsInfo(scss=True, category='heading', type='value', value='center'), heading_title_font_size=OptionsInfo(scss=True, category='heading', type='px', value='125%'), heading_title_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_subtitle_font_size=OptionsInfo(scss=True, category='heading', type='px', value='85%'), heading_subtitle_font_weight=OptionsInfo(scss=True, category='heading', type='value', value='initial'), heading_padding=OptionsInfo(scss=True, category='heading', type='px', value='4px'), heading_padding_horizontal=OptionsInfo(scss=True, category='heading', type='px', value='5px'), heading_border_bottom_style=OptionsInfo(scss=True, category='heading', type='value', value='solid'), heading_border_bottom_width=OptionsInfo(scss=True, category='heading', type='px', value='2px'), heading_border_bottom_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), heading_border_lr_style=OptionsInfo(scss=True, category='heading', type='value', value='none'), heading_border_lr_width=OptionsInfo(scss=True, category='heading', type='px', value='1px'), heading_border_lr_color=OptionsInfo(scss=True, category='heading', type='value', value='#D3D3D3'), column_labels_background_color=OptionsInfo(scss=True, category='column_labels', type='value', value=None), column_labels_font_size=OptionsInfo(scss=True, category='column_labels', type='px', value='100%'), column_labels_font_weight=OptionsInfo(scss=True, category='column_labels', type='value', value='normal'), column_labels_text_transform=OptionsInfo(scss=True, category='column_labels', type='value', value='inherit'), column_labels_padding=OptionsInfo(scss=True, category='column_labels', type='px', value='4px'), column_labels_padding_horizontal=OptionsInfo(scss=True, category='column_labels', type='px', value='5px'), column_labels_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), column_labels_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='0px'), column_labels_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='white'), column_labels_border_top_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_top_width=OptionsInfo(scss=True, category='column_labels', type='px', value='2px'), column_labels_border_top_color=OptionsInfo(scss=True, category='column_labels', type='value', value='black'), column_labels_border_bottom_style=OptionsInfo(scss=True, category='column_labels', type='value', value='solid'), column_labels_border_bottom_width=OptionsInfo(scss=True, category='column_labels', type='px', value='0.5px'), column_labels_border_bottom_color=OptionsInfo(scss=True, category='column_labels', type='value', value='black'), column_labels_border_lr_style=OptionsInfo(scss=True, category='column_labels', type='value', value='none'), column_labels_border_lr_width=OptionsInfo(scss=True, category='column_labels', type='px', value='1px'), column_labels_border_lr_color=OptionsInfo(scss=True, category='column_labels', type='value', value='#D3D3D3'), column_labels_hidden=OptionsInfo(scss=False, category='column_labels', type='boolean', value=False), row_group_background_color=OptionsInfo(scss=True, category='row_group', type='value', value=None), row_group_font_size=OptionsInfo(scss=True, category='row_group', type='px', value='0px'), row_group_font_weight=OptionsInfo(scss=True, category='row_group', type='value', value='initial'), row_group_text_transform=OptionsInfo(scss=True, category='row_group', type='value', value='inherit'), row_group_padding=OptionsInfo(scss=True, category='row_group', type='px', value='0px'), row_group_padding_horizontal=OptionsInfo(scss=True, category='row_group', type='px', value='5px'), row_group_border_top_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_top_width=OptionsInfo(scss=True, category='row_group', type='px', value='0.5px'), row_group_border_top_color=OptionsInfo(scss=True, category='row_group', type='value', value='black'), row_group_border_right_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_right_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_right_color=OptionsInfo(scss=True, category='row_group', type='value', value='white'), row_group_border_bottom_style=OptionsInfo(scss=True, category='row_group', type='value', value='solid'), row_group_border_bottom_width=OptionsInfo(scss=True, category='row_group', type='px', value='0.5px'), row_group_border_bottom_color=OptionsInfo(scss=True, category='row_group', type='value', value='black'), row_group_border_left_style=OptionsInfo(scss=True, category='row_group', type='value', value='none'), row_group_border_left_width=OptionsInfo(scss=True, category='row_group', type='px', value='1px'), row_group_border_left_color=OptionsInfo(scss=True, category='row_group', type='value', value='white'), row_group_as_column=OptionsInfo(scss=False, category='row_group', type='boolean', value=False), table_body_hlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), table_body_hlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='1px'), table_body_hlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='#D3D3D3'), table_body_vlines_style=OptionsInfo(scss=True, category='table_body', type='value', value='none'), table_body_vlines_width=OptionsInfo(scss=True, category='table_body', type='px', value='0px'), table_body_vlines_color=OptionsInfo(scss=True, category='table_body', type='value', value='white'), table_body_border_top_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_top_width=OptionsInfo(scss=True, category='table_body', type='px', value='0.5px'), table_body_border_top_color=OptionsInfo(scss=True, category='table_body', type='value', value='black'), table_body_border_bottom_style=OptionsInfo(scss=True, category='table_body', type='value', value='solid'), table_body_border_bottom_width=OptionsInfo(scss=True, category='table_body', type='px', value='2px'), table_body_border_bottom_color=OptionsInfo(scss=True, category='table_body', type='value', value='black'), data_row_padding=OptionsInfo(scss=True, category='data_row', type='px', value='4px'), data_row_padding_horizontal=OptionsInfo(scss=True, category='data_row', type='px', value='5px'), stub_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_border_style=OptionsInfo(scss=True, category='stub', type='value', value='hidden'), stub_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), stub_row_group_background_color=OptionsInfo(scss=True, category='stub', type='value', value=None), stub_row_group_font_size=OptionsInfo(scss=True, category='stub', type='px', value='100%'), stub_row_group_font_weight=OptionsInfo(scss=True, category='stub', type='value', value='initial'), stub_row_group_text_transform=OptionsInfo(scss=True, category='stub', type='value', value='inherit'), stub_row_group_border_style=OptionsInfo(scss=True, category='stub', type='value', value='solid'), stub_row_group_border_width=OptionsInfo(scss=True, category='stub', type='px', value='2px'), stub_row_group_border_color=OptionsInfo(scss=True, category='stub', type='value', value='#D3D3D3'), source_notes_padding=OptionsInfo(scss=True, category='source_notes', type='px', value='4px'), source_notes_padding_horizontal=OptionsInfo(scss=True, category='source_notes', type='px', value='5px'), source_notes_background_color=OptionsInfo(scss=True, category='source_notes', type='value', value=None), source_notes_font_size=OptionsInfo(scss=True, category='source_notes', type='px', value='90%'), source_notes_border_bottom_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_bottom_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_bottom_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_border_lr_style=OptionsInfo(scss=True, category='source_notes', type='value', value='none'), source_notes_border_lr_width=OptionsInfo(scss=True, category='source_notes', type='px', value='2px'), source_notes_border_lr_color=OptionsInfo(scss=True, category='source_notes', type='value', value='#D3D3D3'), source_notes_multiline=OptionsInfo(scss=False, category='source_notes', type='boolean', value=True), source_notes_sep=OptionsInfo(scss=False, category='source_notes', type='value', value=' '), row_striping_background_color=OptionsInfo(scss=True, category='row', type='value', value='rgba(128,128,128,0.05)'), row_striping_include_stub=OptionsInfo(scss=False, category='row', type='boolean', value=False), row_striping_include_table_body=OptionsInfo(scss=False, category='row', type='boolean', value=False), container_width=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_height=OptionsInfo(scss=False, category='container', type='px', value='auto'), container_padding_x=OptionsInfo(scss=False, category='container', type='px', value='0px'), container_padding_y=OptionsInfo(scss=False, category='container', type='px', value='10px'), container_overflow_x=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), container_overflow_y=OptionsInfo(scss=False, category='container', type='overflow', value='auto'), quarto_disable_processing=OptionsInfo(scss=False, category='quarto', type='logical', value=False), quarto_use_bootstrap=OptionsInfo(scss=False, category='quarto', type='logical', value=False)), _has_built=False)"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(\n",
    "    pf.etable(fit).tab_style(\n",
    "        style=style.fill(color=\"yellow\"), locations=loc.body(rows=[1])\n",
    "    )\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We will now study power more systematically via a simulation. More concretely, we will compute how often \n",
    "we detect the **true effect** of **X1 on Y1, Y2, ..., etc** given a fixed sample size $N$ using \"uncorrected\" p-values, \n",
    "the Bonferroni, Romano-Wolf and Westfall-Young methods. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def compute_power(seed, rho, effect):\n",
    "    \"Simulate data, estimate models, and compute power.\"\n",
    "    data = get_data_true_effect(\n",
    "        N, n_covariates, n_depvars, rho, seed=seed, effect=effect\n",
    "    )\n",
    "    fit = pf.feols(\n",
    "        fml=fml, data=data, vcov=\"hetero\"\n",
    "    )  # model '1' regresses on Y1 - we're only interested in the power of this specific test\n",
    "    df = fit.tidy().reset_index().set_index(\"Coefficient\").xs(\"X1\")\n",
    "\n",
    "    df[\"Pr(>|t|) detect\"] = df[\"Pr(>|t|)\"] < 0.05\n",
    "    df[\"Bonferroni detect\"] = (\n",
    "        pf.bonferroni(fit, param=\"X1\").xs(\"Bonferroni Pr(>|t|)\").values < 0.05\n",
    "    )\n",
    "    df[\"rwolf detect\"] = (\n",
    "        pf.rwolf(fit, param=\"X1\", reps=200, seed=seed * 11).xs(\"RW Pr(>|t|)\").values\n",
    "        < 0.05\n",
    "    )\n",
    "    df[\"wyoung detect\"] = (\n",
    "        pf.wyoung(fit, param=\"X1\", reps=200, seed=seed * 11).xs(\"WY Pr(>|t|)\").values\n",
    "        < 0.05\n",
    "    )\n",
    "\n",
    "    # Compute family rejection means\n",
    "    detect_effect = {\n",
    "        \"Pr(>|t|) detect effect\": df[\"Pr(>|t|) detect\"].mean(),\n",
    "        \"Bonferroni detect effect\": df[\"Bonferroni detect\"].mean(),\n",
    "        \"rwolf detect effect\": df[\"rwolf detect\"].mean(),\n",
    "        \"wyoung detect effect\": df[\"wyoung detect\"].mean(),\n",
    "    }\n",
    "\n",
    "    detect_effect_df = pd.DataFrame(detect_effect, index=[effect])\n",
    "    return detect_effect_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def run_power_simulation(n_iter, rho, effect, nthreads=-1):\n",
    "    \"Run simulation for power.\"\n",
    "    seeds = list(range(n_iter))\n",
    "    results = Parallel(n_jobs=nthreads)(\n",
    "        delayed(compute_power)(seed, rho=rho, effect=effect) for seed in tqdm(seeds)\n",
    "    )\n",
    "\n",
    "    return pd.concat(results).mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  0%|          | 0/1000 [00:00<?, ?it/s]c:\\Users\\alexa\\Documents\\pyfixest\\.pixi\\envs\\dev\\Lib\\site-packages\\joblib\\externals\\loky\\process_executor.py:752: UserWarning: A worker stopped while some jobs were given to the executor. This can be caused by a too short worker timeout or by a memory leak.\n",
      "  warnings.warn(\n",
      "100%|██████████| 1000/1000 [12:00<00:00,  1.39it/s]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "Pr(>|t|) detect effect      0.97045\n",
       "Bonferroni detect effect    0.78485\n",
       "rwolf detect effect         0.86985\n",
       "wyoung detect effect        0.86985\n",
       "dtype: float64"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "run_power_simulation(n_iter=1000, rho=0.5, effect=0.4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We see that the \"unadjusted\" method detects the \"true effects\" at the highest frequency with on average 97% correctly detected effects. Does this mean that we should use uncorrected tests then? Well, maybe, but these do not control the family-wise error rate. While we have a better chance to detect a true effect, we also have a higher risk of flagging false positives. \n",
    "\n",
    "Additionally, it looks as if the rwolf and wyoung methods detect the true positives at a slightly higher rate than the Bonferroni method. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Do these findings generalize to other effect sizes? We can check this by simply imposing \n",
    "different effects on the data generating process and repeating the previous exercise \n",
    "multiple times. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 1000/1000 [10:54<00:00,  1.53it/s]\n",
      "100%|██████████| 1000/1000 [10:17<00:00,  1.62it/s]\n",
      "100%|██████████| 1000/1000 [10:05<00:00,  1.65it/s]\n",
      "100%|██████████| 1000/1000 [10:09<00:00,  1.64it/s]\n",
      "100%|██████████| 1000/1000 [10:25<00:00,  1.60it/s]\n",
      "100%|██████████| 1000/1000 [09:54<00:00,  1.68it/s]\n",
      "100%|██████████| 1000/1000 [09:44<00:00,  1.71it/s]\n",
      "100%|██████████| 1000/1000 [10:53<00:00,  1.53it/s]\n",
      "100%|██████████| 1000/1000 [14:32<00:00,  1.15it/s]\n",
      "100%|██████████| 1000/1000 [14:38<00:00,  1.14it/s]\n",
      "100%|██████████| 10/10 [1:53:04<00:00, 678.48s/it]\n"
     ]
    }
   ],
   "source": [
    "def run_power_simulation_vary_effect():\n",
    "    \"Run power simulations with varying effect sizes.\"\n",
    "    n_points = 10\n",
    "    max_val = 0.7\n",
    "\n",
    "    effects = (\n",
    "        np.sign(np.linspace(-1, 1, n_points))\n",
    "        * max_val\n",
    "        * (np.linspace(-1, 1, n_points) ** 2)\n",
    "    )\n",
    "\n",
    "    res_list = []\n",
    "    for effect_size in tqdm(effects):\n",
    "        res = run_power_simulation(n_iter=1000, rho=0.5, effect=effect_size)\n",
    "        res[\"effect\"] = effect_size\n",
    "        res_list.append(res)\n",
    "    return pd.concat(res_list, axis=1).T.set_index(\"effect\")\n",
    "\n",
    "\n",
    "res = run_power_simulation_vary_effect()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 94224 characters]",
      "text/plain": [
       "<Figure size 1000x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "column_to_label_dict = {\n",
    "    \"Pr(>|t|) detect effect\": \"Unadjusted\",\n",
    "    \"Bonferroni detect effect\": \"Bonferroni\",\n",
    "    \"rwolf detect effect\": \"RW\",\n",
    "    \"wyoung detect effect\": \"WY\",\n",
    "}\n",
    "\n",
    "plt.figure(figsize=(10, 6))\n",
    "line_styles = [\"-\", \"--\", \"-.\", \":\"]\n",
    "for column, line_style in zip(res.columns, line_styles):\n",
    "    plt.plot(\n",
    "        res.index, res[column], linestyle=line_style, label=column_to_label_dict[column]\n",
    "    )\n",
    "\n",
    "plt.title(\"Power of Multiple Testing Correction Procedures\")\n",
    "plt.xlabel(\"Effect\")\n",
    "plt.ylabel(\"Proportion of correctly detected effects\")\n",
    "plt.legend()\n",
    "plt.grid()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We see that for any simulated effect size, the Romano-Wolf and Westfall-Young methods detect a higher share of true positives than the Bonferroni method: they have **higher power**."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Literature \n",
    "\n",
    "- Clarke, Damian, Joseph P. Romano, and Michael Wolf. \"The Romano–Wolf multiple-hypothesis correction in Stata.\" The Stata Journal 20.4 (2020): 812-843.\n",
    "- Romano, Joseph P., and Michael Wolf. \"Stepwise multiple testing as formalized data snooping.\" Econometrica 73.4 (2005): 1237-1282.\n",
    "- Westfall, Peter H., and S. Stanley Young. Resampling-based multiple testing: Examples and methods for p-value adjustment. Vol. 279. John Wiley & Sons, 1993."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "dev",
   "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.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
