-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR implements simulations for the simple model with a binary instrument and binary treatment.
- Loading branch information
Showing
67 changed files
with
3,836 additions
and
2,804 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,10 @@ bld/ | |
*.run.xml | ||
*.synctex.gz | ||
*.synctex.gz.sum.synctex | ||
*.toc | ||
*.snm | ||
*.nav | ||
|
||
# Jupyter notebooks | ||
*.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,44 @@ | ||
--- | ||
name: thesis | ||
channels: [conda-forge, nodefaults] | ||
channels: [conda-forge, r, nodefaults] | ||
dependencies: | ||
- python ==3.12 | ||
- pip >=21.1 | ||
|
||
# Development dependencies | ||
- conda-lock | ||
- ipykernel | ||
- jupyterlab | ||
- pandas | ||
- pip >=21.1 | ||
- plotly>=5.13.0 | ||
- pre-commit | ||
- pytask-latex>=0.4.0 | ||
- pytask-parallel>=0.4.0 | ||
- pytask>=0.4.0 | ||
|
||
# Language agnostic template project dependencies | ||
- pytask >=0.5.0 | ||
- pytask-latex >=0.4.2 | ||
- pytask-parallel >=0.5.0 | ||
- pytest | ||
- pytest-cov | ||
- pytest-xdist | ||
- python-graphviz | ||
- python=3.11 | ||
- pyyaml | ||
- setuptools_scm | ||
|
||
# Python template project dependencies | ||
- statsmodels | ||
- toml | ||
- pip: [-e ., kaleido, pdbp] | ||
- numpy | ||
- pandas >=2.2 | ||
- plotly >=5.2.0,<6 | ||
|
||
# R template project dependencies | ||
# Currently we are not using R hence we do not need to install these dependencies. | ||
# - pytask-r >=0.4.1 | ||
# - pyreadr | ||
# - r-plyr | ||
# - r-precommit | ||
# - r-yaml | ||
# - r-forcats | ||
|
||
# Install project | ||
- pip: | ||
- -e . | ||
- pdbp | ||
- kaleido==0.1.0.post1 | ||
- joblib | ||
- git+https://github.com/buddejul/pyvmte@bernstein | ||
- coptpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
\begin{tikzpicture} | ||
\begin{axis}[ | ||
xmin=-1.1, xmax=1.1, | ||
ymin=-1.1, ymax=1.1, | ||
xlabel=$\beta_s$, | ||
ylabel={$\underline{\beta^*}$}, | ||
xtick={-1, 0, 1}, % Specify the x-axis ticks here | ||
ytick={-1, 1}, | ||
extra y ticks={-0.7, 0.3}, % Specify the positions of the special x-axis ticks together | ||
extra y tick style={yticklabel style={color=black}}, % Apply a style to all extra x ticks | ||
extra y tick labels={$-(1-\omega)$, $\omega$}, % Customize the labels of the special x-axis ticks | ||
] | ||
|
||
% Unconstrained solution | ||
\addplot [domain=-1:1, color=black] {0.3*x - (1-0.3)}; | ||
|
||
% Solution with monotonicity constraint | ||
\addplot [domain=-1:0, color=blue] {0.3*x - (1-0.3)}; | ||
\addplot [domain=0:1, color=blue] {x - (1-0.3)}; | ||
|
||
% Add text for each line | ||
\node at (axis cs:-0.25, 0.75) [color=black, anchor=west] {\footnotesize No Constraint}; | ||
\node at (axis cs:-0.25, 0.5) [color=blue, anchor=west] {\footnotesize Increasing MTR Functions}; | ||
|
||
\end{axis} | ||
\end{tikzpicture} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
\begin{tikzpicture} | ||
\begin{axis}[ | ||
xmin=-1.1, xmax=1.1, | ||
ymin=-1.1, ymax=1.1, | ||
xlabel=$\beta_s$, | ||
ylabel={$\overline{\beta^*}$}, | ||
xtick={-1, 0, 1}, % Specify the x-axis ticks here | ||
ytick={-1, 1}, | ||
extra y ticks={-0.3, 0.7}, % Specify the positions of the special x-axis ticks together | ||
extra y tick style={yticklabel style={color=black}}, % Apply a style to all extra x ticks | ||
extra y tick labels={$-\omega$, $1-\omega$}, % Customize the labels of the special x-axis ticks | ||
] | ||
|
||
% Unconstrained solution | ||
\addplot [domain=-1:1, color=black] {1-0.3 + 0.3*x}; | ||
|
||
% Solution with monotonicity constraint | ||
\addplot [domain=-1:0, color=blue] {x + 0.7}; | ||
\addplot [domain=0:1, color=blue] {0.3*x + 0.7}; | ||
|
||
% Add text for each line | ||
\node at (axis cs:-0.25, -0.5) [color=black, anchor=west] {\footnotesize No Constraint}; | ||
\node at (axis cs:-0.25, -0.75) [color=blue, anchor=west] {\footnotesize Increasing MTR Functions}; | ||
|
||
\end{axis} | ||
\end{tikzpicture} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
\begin{tikzpicture} | ||
\begin{axis}[ | ||
xmin=-0.1, xmax=1.1, | ||
ymin=-0.1, ymax=1.1, | ||
xlabel=$u$, | ||
ylabel={$\E[Y(d)|U=u]$}, | ||
xtick={0,1}, % Specify the x-axis ticks here | ||
extra x ticks={0.2, 0.5, 0.8}, % Specify the positions of the special x-axis ticks together | ||
extra x tick style={xticklabel style={color=black}}, % Apply a style to all extra x ticks | ||
extra x tick labels={$p(0)$, $p(1)$, $p(1) + \overline{u}$}, % Customize the labels of the special x-axis ticks | ||
] | ||
|
||
\addplot [domain=0.2:0.5, color=black] {0.2} node[pos=1, right] {\footnotesize $\theta_{20} = -\beta_s$}; | ||
\addplot [domain=0.2:0.5, color=black] {0} node[pos=1, right] {\footnotesize $\theta_{21} = 0$}; | ||
|
||
\draw [decorate,decoration={brace,amplitude=10pt,raise=0pt},yshift=0pt, xshift=-1pt] | ||
(axis cs:0.2,0) -- (axis cs:0.2,0.2) node [black,midway,xshift=-1cm] {\footnotesize$-\beta_s$}; | ||
|
||
\addplot [domain=0.5:0.8, color=red] {0.2} node[pos=1, right, color=red] {\footnotesize $\theta_{30} = -\beta_s$}; | ||
\addplot [domain=0.5:0.8, color=red, dashed] {0} node[pos=1, right, color=red] {\footnotesize Infeasible}; | ||
\addplot [domain=0.5:0.8, color=red] {1} node[pos=1, right, color=red] {\footnotesize $\theta_{31} = 1$}; | ||
|
||
\draw [decorate,decoration={brace,amplitude=10pt,mirror,raise=0pt},yshift=0pt, xshift=1pt, color=red] | ||
(axis cs:0.8,0.2) -- (axis cs:0.8,1) node [red,midway,xshift=1cm] {\footnotesize$\beta_u$}; | ||
|
||
|
||
\end{axis} | ||
\end{tikzpicture} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
\begin{tikzpicture} | ||
\begin{axis}[ | ||
xmin=-0.1, xmax=1.1, | ||
ymin=-0.1, ymax=1.1, | ||
xlabel=$u$, | ||
ylabel={$\E[Y(d)|U=u]$}, | ||
xtick={0,1}, % Specify the x-axis ticks here | ||
extra x ticks={0.2, 0.5, 0.8}, % Specify the positions of the special x-axis ticks together | ||
extra x tick style={xticklabel style={color=black}}, % Apply a style to all extra x ticks | ||
extra x tick labels={$p(0)$, $p(1)$, $p(1) + \overline{u}$}, % Customize the labels of the special x-axis ticks | ||
] | ||
|
||
\addplot [domain=0.2:0.5, color=black] {0} node[pos=1, right] {\footnotesize $\theta_{20} = 0$}; | ||
\addplot [domain=0.2:0.5, color=black] {0.2} node[pos=1, right] {\footnotesize $\theta_{21} = 0.2$}; | ||
|
||
\draw [decorate,decoration={brace,amplitude=10pt,raise=0pt},yshift=0pt, xshift=-1pt] | ||
(axis cs:0.2,0) -- (axis cs:0.2,0.2) node [black,midway,xshift=-1cm] {\footnotesize$\beta_s$}; | ||
|
||
\addplot [domain=0.5:0.8, color=red] {0} node[pos=1, right, color=red] {\footnotesize $\theta_{30} = 0$}; | ||
\addplot [domain=0.5:0.8, color=red] {1} node[pos=1, right, color=red] {\footnotesize $\theta_{31} = 1$}; | ||
|
||
\draw [decorate,decoration={brace,amplitude=10pt,mirror,raise=0pt},yshift=0pt, xshift=1pt, color=red] | ||
(axis cs:0.8,0) -- (axis cs:0.8,1) node [red,midway,xshift=1cm] {\footnotesize$\beta_u$}; | ||
|
||
|
||
\end{axis} | ||
\end{tikzpicture} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# MTE Papers | ||
|
||
A collection of papers related to the MTE framework. | ||
In particular, applied papers that employ the framework of Mogstad et al. ECMA. | ||
|
||
## Applied Papers using Mogstad et al. ECMA Framework | ||
|
||
### Rose and Shem-Tov 2021 JPE | ||
|
||
Title: *How Does Incarceration Affect Reoffending? Estimating the Dose-Response Function* | ||
|
||
They use and extend the MTE model for extrapolation. They don't provide inference. | ||
For example, see Figure 5 and Table 6. | ||
|
||
### Koichiro, Takanori Makoto AER | ||
|
||
Title: Selection on Welfare Gains: Experimental Evidence from Electricity Plan Choice† | ||
|
||
They don't seem to primarily use the MST method, but rather the parametric method of Brinch et al. | ||
|
||
|
||
### Shea WP | ||
|
||
https://jkcshea.github.io/ | ||
|
||
# To Check | ||
|
||
- https://direct.mit.edu/rest/article-abstract/doi/10.1162/rest_a_01483/124131/The-Value-of-Piped-Water-and-Sewers-Evidence-from?redirectedFrom=fulltext | ||
- https://direct.mit.edu/rest/article-abstract/105/3/646/102834/Reconciling-Seemingly-Contradictory-Results-from | ||
- https://academic.oup.com/ej/article-abstract/132/646/2231/6548192 | ||
- https://academic.oup.com/restud/article-abstract/90/1/432/6582594 | ||
- https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4405043 | ||
- https://www.aeaweb.org/articles?id=10.1257/aer.20181756 | ||
- Appendix of https://academic.oup.com/qje/article-abstract/133/4/1885/5025665 | ||
|
||
# Misc | ||
|
||
- Mismeasurement tratment: https://www.sciencedirect.com/science/article/pii/S0304407623002725 |
Oops, something went wrong.