Skip to content

Commit 73e2959

Browse files
drbenvincentNathanielF
authored andcommitted
improvements to current banks
1 parent 5a14848 commit 73e2959

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/source/notebooks/did_pymc_banks.ipynb

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,25 @@
539539
"The only change here compared to the classic 2$\\times$2 DiD model above is the addition of a main effect of `year`. Because this is coded numerically (not categorically) this can capture any linear changes in the outcome variable over time."
540540
]
541541
},
542+
{
543+
"cell_type": "markdown",
544+
"metadata": {},
545+
"source": [
546+
"We will use the formula: `bib ~ 1 + year + district*post_treatment` which equates to the following model of expected values:\n",
547+
"\n",
548+
"$$\n",
549+
"\\begin{aligned}\n",
550+
"\\mu_i & = \\beta_0 \\\\\n",
551+
" & \\quad + \\beta_{y} \\cdot year_i \\\\\n",
552+
" & \\quad + \\beta_{d} \\cdot district_i \\\\\n",
553+
" & \\quad + \\beta_{p} \\cdot post~treatment_i \\\\\n",
554+
" & \\quad + \\beta_{\\Delta} \\cdot district_i \\cdot post~treatment_i\n",
555+
"\\end{aligned}\n",
556+
"$$\n",
557+
"\n",
558+
"The only change here compared to the classic 2$\\times$2 DiD model above is the addition of a main effect of `year`. Because this is coded numerically (not categorically) this can capture any linear changes in the outcome variable over time."
559+
]
560+
},
542561
{
543562
"cell_type": "code",
544563
"execution_count": 10,
@@ -725,7 +744,7 @@
725744
"kernelspec": {
726745
"display_name": "CausalPy",
727746
"language": "python",
728-
"name": "python3"
747+
"name": "causalpy"
729748
},
730749
"language_info": {
731750
"codemirror_mode": {

0 commit comments

Comments
 (0)