This repository hosts a replication package for
-
Ziwei Mei, Liugang Sheng, Zhentao Shi (2026), "Nickell Bias in Panel Local Projection: Financial Crises Are Worse Than You Think," Journal of International Economics, 104210. [arxiv:2302.13455].
-
paper_summary.pdfis a minimum non-technical summary of the paper.
The replication code is written in R.
applications/: Empirical applications. Contains the data files (empirical_*.csv), the main R routine (LP_panel_all.r). The Jupyter notebookreplication.ipynbreproduces the results and figures of all the four empirical application in the paper (Running time: <=30 seconds).simulations/: Monte Carlo simulations for the main text (Figures 1-3). Seesimulations/README.mdfor details about the scripts and figures.simulations_appendix/: Simulation code for Appendix C (Figures C1-C12). The workflow is explained insimulations_appendix/readme.mdfor instructions.
In short:
- Empirical results ->
applications/ - Main-text simulations ->
simulations/ - Appendix simulations ->
simulations_appendix/
-
R package provides functions to implement the estimation method.
-
Python package is a replica of the R package
An R environment is provided at DockerHub. It can run in Github's codespaces directly (Install a Jupyter Kernel extension in the remote vscode if popped up.)
To run the R notebook in a fully reproducible environment, build the Docker image from the repository root:
docker build -t plp .Launch the container, exposing JupyterLab on port 8888 and mounting the repository so that changes persist:
docker run --rm -it -p 8888:8888 \
-e JUPYTER_TOKEN=panel-lp \
-v ${PWD}:/home/jovyan/work \
plpThe container will print a URL containing the token (or the JUPYTER_TOKEN you supplied). Open that link in a browser to access JupyterLab, then open applications/replication.ipynb. All required R packages (ggplot2, reshape2, ggpubr) are pre-installed in the image.
The GitHub Pages site in docs/ can be previewed locally with Jekyll:
cd docs
bundle install
bundle exec jekyll serve --livereloadThis requires Ruby (>=3.0 recommended) and Bundler. Once the server is running, open the URL printed in the terminal (typically http://127.0.0.1:4000) to browse the site.
- Pan Ji, Shen Shu, Shi Zhentao
- Please contact Shen Shu if you have any inquiries.
This work is licensed under the MIT License.