Skip to content

Commit

Permalink
Add ATT method to the texas nb
Browse files Browse the repository at this point in the history
  • Loading branch information
sdfordham committed Nov 19, 2023
1 parent d9647af commit 8423a6c
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions examples/texas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -210,6 +210,40 @@
"synth.gaps_plot(time_period=range(1985, 2001), treatment_time=1993)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute the average treatment effect on the treated unit (ATT) over the post-treatment time period. This method returns a standard error also."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'att': 20339.375838131393, 'se': 3190.4946788704715}"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"synth.att(time_period=range(1993, 2001))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The summary function give more information on the predictor values. The first column shows the value of the $V$ matrix for each predictor, the column 'treated' shows the mean value of each predictor for the treated unit over the time period `time_predictors_prior`, the column 'synthetic' shows the mean value of each predictor for the synthetic control over the time period `time_predictors_prior` and finally the column 'sample mean' shows the sample mean of that predictor for all control units over the time period `time_predictors_prior` i.e. this is the same as the synthetic control with all weights equal."
]
},
{
"cell_type": "code",
"execution_count": 6,
Expand Down Expand Up @@ -389,7 +423,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]"
"version": "3.10.4"
},
"orig_nbformat": 4,
"vscode": {
Expand Down

0 comments on commit 8423a6c

Please sign in to comment.