Module 6400
Probabilistic Programming for Applied Agricultural Economics
Lecturers
Hugo Storm, hugo.storm@ilr.uni-bonn.de
Thomas Heckelei, thomas.heckelei@ilr.uni-bonn.de
Course Description
Students learn to apply Probabilistic Programming to answer quantitative causal research questions. Probabilistic Programming is a novel data science tool combining Bayesian Statistical Modelling, Machine Learning, and standard econometrics. The course deepens students' quantitative skills and extends their methodical toolkit. Students will learn a basic workflow to perform theory-guided, applied statistical analysis of questions relevant to policy and business. The workflow is intensively practiced with guided coding examples and exercises (in Python and the NumPyro framework). Along the way, the course covers the basics of Bayesian modeling and how to interpret Bayesian modeling results. The course contributes to students' skills relevant to data analysis for jobs in research or private sector.
In the lab part, we apply the Probabilistic Programming workflow to (partially) replicate an existing paper. This allows us to practice the entire workflow in the context of an actual research paper. We use Jupyter notebooks to allow students to simplify technical setup and run code remotely.
Competence to have / things to do for students before course starts:
- Econometric requirements:
Econometric background at least at advanced master level - Coding requirements:
Guided coding examples and exercises will be provided in Python, but no previous Python experience is required. It is sufficient that students have gained some previous experience in coding in general. Nevertheless, a strong interest and motivation to use and learn Python basics is expected.
Background Links:
- Storm, H., Heckelei, T., Baylis, K. (2024). Probabilistic programming for embedding theory and quantifying uncertainty in econometric analysis. European Review of Agricultural Economics, 51(3), 589-616. https://doi.org/10.1093/erae/jbae016
- McElreath, Richard. 2020. Statistical Rethinking: A Bayesian Course with Examples in R and Stan. Chapman and Hall/CRC.
- NumPyro Documentation: https://num.pyro.ai/en/stable/
- Ghahramani, Zoubin. 2015. “Probabilistic Machine Learning and Artificial Intelligence.” Nature 521 (7553): 452–59.
General structure
The general daily organisation is such that there is a lecture in the morning (sometimes continues after lunch), a Q&A session and a lab session in the afternoon.
Day | Morning |
Afternoon |
1 |
Intro Probabilistic Programming and the Probabilistic Programming workflow |
Intro coding; Intro replication paper / assignments |
2 |
Statistical Rethinking: model building, interpretation, DAGs (Directed Acyclical Graphs) |
Assignment I (Workflow steps 1-3) |
3 |
Probabilistic Programming model implementation |
Assignment II (Workflow steps 4-5) |
4 |
Bayesian inference and prediction |
Assignment III (Workflow step 6) |
5 |
Model comparison, multilevel models |
Example applications, Wrap-up |
Grading: Pass/fail based on handing in assignments