Skip to content

Commit dd4fada

Browse files
fix latex rendering on 13 (#13)
1 parent 2355e4b commit dd4fada

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

causal-inference-for-the-brave-and-true/13-Panel-Data-and-Fixed-Effects.ipynb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -626,24 +626,30 @@
626626
"This means that if we get the average for every person in our panel, we are essentially regressing the individual dummy on the other variables. This motivates the following estimation procedure:\n",
627627
"\n",
628628
"1. Create time-demeaned variables by subtracting the mean for the individual: \n",
629-
"\\\\(\\ddot{Y}_{it} = Y_{it} - \\bar{Y}_i\\\\) \n",
630-
"\\\\(\\ddot{X}_{it} = X_{it} - \\bar{X}_i\\\\)\n",
631-
"2. Regress \\\\(\\ddot{Y}_{it}\\\\) on \\\\(\\ddot{X}_{it}\\\\)\n",
629+
"$\\ddot{Y}_{it} = Y_{it} - \\bar{Y}_i$ \n",
630+
"$\\ddot{X}_{it} = X_{it} - \\bar{X}_i$\n",
631+
"\n",
632+
"2. Regress $\\ddot{Y}_{it}$ on $\\ddot{X}_{it}$\n",
633+
"\n",
632634
"\n",
633635
"Notice that when we do so, the unobserved \\\\(U_i\\\\) vanishes. Since \\\\(U_i\\\\) is constant across time, we have that \\\\(\\bar{U_i}=U_i\\\\). If we have the following system of two equations\n",
634636
"\n",
637+
"$$\n",
635638
"\\begin{align}\n",
636639
"Y_{it} & = \\beta X_{it} + \\gamma U_i + e_{it} \\\\\n",
637640
"\\bar{Y}_{i} & = \\beta \\bar{X}_{it} + \\gamma \\bar{U}_i + \\bar{e}_{it} \\\\\n",
638641
"\\end{align}\n",
642+
"$$\n",
639643
"\n",
640644
"And we subtract one from the other, we get\n",
641645
"\n",
646+
"$$\n",
642647
"\\begin{align}\n",
643648
"(Y_{it} - \\bar{Y}_{i}) & = (\\beta X_{it} - \\beta \\bar{X}_{it}) + (\\gamma U_i - \\gamma U_i) + (e_{it}-\\bar{e}_{it}) \\\\\n",
644649
"(Y_{it} - \\bar{Y}_{i}) & = \\beta(X_{it} - \\bar{X}_{it}) + (e_{it}-\\bar{e}_{it}) \\\\\n",
645650
"\\ddot{Y}_{it} & = \\beta \\ddot{X}_{it} + \\ddot{e}_{it} \\\\\n",
646651
"\\end{align}\n",
652+
"$$\n",
647653
"\n",
648654
"which wipes out all unobserved that are constant across time. To be honest, not only do the unobserved variables vanish. This happens to all the variables that are constant in time. For this reason, you can't include any variables that are constant across time, as they would be a linear combination of the dummy variables and the model wouldn't run. \n",
649655
"\n",

0 commit comments

Comments
 (0)