Skip to content

Commit

Permalink
Add ATT method to the germany nb
Browse files Browse the repository at this point in the history
  • Loading branch information
sdfordham committed Nov 19, 2023
1 parent 6514abb commit d9647af
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions examples/germany.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,44 @@
"synth.gaps_plot(time_period=range(1960, 2004), treatment_time=1990)"
]
},
{
"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": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'att': -1558.4329540422546, 'se': 317.5609062753852}"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"synth.att(time_period=range(1990, 2004))"
]
},
{
"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": 8,
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -322,7 +356,7 @@
"special.3.invest80 0.155 27.018 27.073 25.895"
]
},
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -348,7 +382,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.0"
"version": "3.10.4"
},
"orig_nbformat": 4,
"vscode": {
Expand Down

0 comments on commit d9647af

Please sign in to comment.