When is a deliberately biased estimator the better one?
HEC Montréal
StandardScaler inside a pipelineRidge, Lasso, ElasticNet, knowing that scikit-learn calls \(\lambda\) alphaRidgeCV, LassoCV, ElasticNetCV| 1 | Read the paper | 45–60 min |
| 2 | Load both datasets — the paper’s, and your own angle | 10 min |
| 3 | Attempt the self-check | 15 min |
The lecture assumes all three are done. The practice assumes the data is already cached on your machine.
Blonigen & Piger (2014), Determinants of foreign direct investment, Canadian Journal of Economics 47(3), 775–812
Read the article · free preprint: NBER w16704
Empirical studies of FDI disagree about which variables belong in the regression. Blonigen and Piger collect 56 candidate determinants, run every model, and ask which variables survive. About sixteen do.
Read for the argument, not for coverage. Annotate four things:
| 1 | The research question, in one sentence |
| 2 | The method or design, and why they chose it |
| 3 | The strongest single piece of evidence |
| 4 | One limitation you would raise as a referee |
Two tables carry the paper. Table 1 shows eight prior studies disagreeing about what to include — that is the problem. Table 3 is the answer: 56 variables, an inclusion probability for each. Read those two before anything else.
Of 56 candidates, the ones that survive (log-levels, inclusion probability ≥ 85%):
And the ones that do not:
“Many covariates found significant by previous studies are not robust.” That sentence is the paper, and it is also the reason this session exists.
The practice uses two: the paper’s data, to test its result, and your own angle, to apply the method. Have both before you arrive.
a) The paper’s data, rebuilt
The authors published no replication package — the paper says only that a list of sources is available on request. So the course rebuilt their design from the three sources they name (CEPII’s gravity database, the World Development Indicators, the Penn World Tables) plus the OECD for the dependent variable, for 2019 instead of their 2000.
Everything in it is real. scripts/build_fdi_determinants.py is the script that built it, and the data dictionary names every source and every place the rebuild departs from the paper.
Because the year is different, the practice is a question, not an arithmetic check: do the determinants that held in 2000 still hold two decades on?
core = qmib.load("core") # the spine, shared by every group
mine = qmib.load("angle_c_country") # REPLACE with your own angle
print(core.shape, mine.shape)Run this before you arrive. It reads from the repository and caches as parquet, so the practice works whatever the room’s wifi is doing.
angle_c_country is an example, not your angle. Yours is named in RESEARCH-MANDATES.md.
Everything available: qmib.catalog()
Answer these on paper. If you cannot, that is what the lecture is for.
By the end of the session you should be able to:
Arrive with: the paper read and annotated · qmib.load("fdi") run at least once · your own angle loaded · your self-check answers on paper.
Everything runs in the VS Codium terminal, from the repository root, with the project environment active. Activate it in every new terminal, not only the first:
Your prompt must begin with (.venv). Without it python and pip are your system’s, and nothing the course installed is visible to them.
ModuleNotFoundError means the packages went somewhere else, or were never installed. Check the prompt first, then pip install -r requirements.txt — from the repository root, with the environment active. Building the environment from scratch is Session 01, step 1.4.
Session 05: README.md · the lecture: 01-lecture/
MATH60033A · Session 05 pre-session · Thierry Warin, PhD · HEC Montréal