Can you reproduce what the papers claim, with only what you have learned?
HEC Montréal
The workshop is three hours at your own keyboard, in a folder of your own. It goes well if that folder is ready when you arrive, and badly if you spend the first hour installing.
| 1 | Re-read the four abstracts: the question, and what the data are | 10 min |
| 2 | Set up your session-07 folder: Python, four packages, the scripts | 15 min |
| 3 | Write two lines per paper, from memory | 5 min |
Everything on these slides is also on the pre-session page, 07-replication-workshop/00-pre-session/README.md, where the commands can be copied.
| # | Paper | What you will fit |
|---|---|---|
| 1 | Fraiberger, Lee, Puy & Ranciere (2021), Media sentiment and international asset prices | OLS, binary, ordinal and multinomial logits |
| 2 | Saganowski, Bródka, Koziarski & Kazienko (2019), Analysis of group evolution prediction … | binary, ordinal and multinomial logits |
| 3 | Blonigen & Piger (2014), Determinants of foreign direct investment | OLS, ridge, lasso, elastic net |
| 4 | Topalova & Khandelwal (2011), Trade liberalization and firm productivity | OLS, binary, ordinal and multinomial logits, ridge, lasso, elastic net |
You read these before sessions 2 to 6. Re-read the abstract and the description of the data: what one observation is, and what is measured.
Make an empty folder — Desktop/session-07 — and open it in VS Codium (File → Open Folder…). In its terminal: plain Python, four packages by name, the scripts, the check.
open /Applications/Python\ 3*/Install\ Certificates.command # python.org Python only, once
python3 -m venv .venv
source .venv/bin/activate
pip install pandas statsmodels scikit-learn matplotlib
curl -LO https://warint.github.io/quantitative-methods/session-07-scripts.zip
unzip session-07-scripts.zip
python check_setup.pypython3 -m venv .venv
source .venv/bin/activate
pip install pandas statsmodels scikit-learn matplotlib
curl -LO https://warint.github.io/quantitative-methods/session-07-scripts.zip
unzip session-07-scripts.zip
python check_setup.pyNo unzip? sudo apt install unzip (Debian, Ubuntu) or sudo dnf install unzip (Fedora).
py -m venv .venv
.venv\Scripts\Activate.ps1
pip install pandas statsmodels scikit-learn matplotlib
$zip = "https://warint.github.io/quantitative-methods/session-07-scripts.zip"
Invoke-WebRequest $zip -OutFile session-07-scripts.zip
Expand-Archive session-07-scripts.zip -DestinationPath .
python check_setup.pyNo requirements.txt, nothing to download from Dataverse: each script reads its paper’s data from the course site. Every line of the check should say OK.
Nothing to hand in, before or after: the workshop is practice, and revision for the midterm.
MATH60033A · Session 07 pre-session · Thierry Warin, PhD · HEC Montréal