Course: Advanced Econometrics MPE-2024
Professor: Hedibert Freitas Lopes - www.hedibert.org
Objective: The main objective of this course is to introduce basic aspects i) Statistical Learning and ii) Bayesian Learning, as well as iii) Micro-econometrics, and iv) Macro-econometrics, that are necessary for the master's degree program.
Brief course description:Regression with endogeneity, regression with measurement error, instrumental variables, potential outcomes, Neyman-Rubin model, selection bias, reverse causality, and omitted variables, panel data, hierarchical models, fixed effect, and random effect, difference-in-differences methods, ARIMA models; long memory; unit root, GARCH models, and stochastic volatility. Vector autoregressive models, factorial models with stochastic volatility, and multivariate models with time-varying parameters, logistic regression; performance metrics for classification, training and testing data; cross-validation, bias-variance trade-off, prior, posterior, and predictive distributions; sequential Bayes and conjugate analysis, Monte Carlo methods.
Teaching assistant: Guilherme Piantino (Doutorando no PhD em Economia dos Negócios)
Final exam: You will not be asked to write R script or similar during the final exam
Evaluation: 30% final exam, 60% homework assignments (15% cada um), 10% participation
Homework assignments: Homework can be done by groups of no more than 4 students.
- HW1 - Due date: October 30th 2024, no later than 7:30pm (Our TA will set it up via blackboard)
- HW2 - Due date: November 6th 2024, no later than 7:30pm (Our TA will set it up via blackboard)
- HW3- Due date: November 13th 2024, no later than 7:30pm (Our TA will set it up via blackboard)
- HW4 - Due data: November 22nd 2024, no later than 7:30pm (Our TA will set it up via blackboard) - (data question 1) + (data question 2)
Teaching material
- Class 1 (09/10): Brief review of basic ingredients: i) Parametric models, likelihoods, estimators and their sampling distributions; ii) Gaussian linear regression: estimation and variable selection; iii) AR(1) model: estimation, unit root, equilibrium distribution; iv) AR(p) model: connection to Gaussian linear regression; v) VAR(1) model: multivariate estimation, matrix notation.
- Poisson model: maximum likelihood estimation, sufficiency, unbiasedness, consistency, efficiency
- Comparing estimators: Mean Square Error (MSE)
- Poisson model: R code for the coal mining disaster data
- Poisson model: Our first Bayesian experience
- Gaussian linear regression (pages 1-22) - A few examples
- Autoregressive model of order one (pages 1-17) - A few examples
- Complementary bibliography: Introdução à Inferência Estatística (2010, Heleno Bolfarine & Monica Sandoval) - Sections 1.1.4, 1.3, 2.1, 2.2, 3.1, 3.2.
- Class 2 (16/10): Introduction to statistical learning: i) Linear and log-linear regression modeling; ii) Training and testing samples; iii) Validation. Bias-variance trade-off.
- Classes 3+4 (23+30/10): Introduction to Bayesian learning: Prior, posterior, and predictive distributions; Sequential Bayesian updating and conjugate analysis, Bayes factor, posterior model probability, model selection; Monte Carlo & Markov Chain Monte Carlo methods; Sparsity in linear and log-linear models.
- Classes 5+6 (06+08/11): Introduction to causal inference: Simpson’s Paradox, Directed Acyclic Graphs (Paths, Junctions, Chains, Forks, Colliders and d-separation), Potential outcome, average treatment effect (ATE), quantile treatment effect (QTE), conditional average treatment effect (CATE), Stable Unit Treatment Value Assumption (SUTVA), Instrumental Variables (IV), Difference in Difference (DiD) and Regression Discontinuity Design (RDD).
- Class 7 (13/11): More econometric models: i) General linear models: heteroskedasticity, Student's t errors and autoregressive errors); ii) Hierarchical models; iii) Limited dependent variable models (Tobit, probit, ordered probit, multinomial probit).
- Class 8 (22/11): Introduction to univariate time series econometrics: i) Autoregressive moving average models; ii) Unit root econometrics; iii) Seasonal models; iv) ARCH/GARCH and related models; v) Stochastic volatility models.
- Class 9 (27/11): Introduction to multivariate time series econometrics: i) Factor SV models; ii) Dynamic Conditional Correlation (DCC) models; iii) Vector autoregressive (VAR) models, impulses-response funtion, structural VAR (SVAR); iv) Large BVAR, Factor-augmented VAR (FAVAR); v) Time-varying parameter (TVP)-VAR; vi) Bayesian VAR (BVAR) and Bayesian FAVAR (BFAVAR).
- Class 10 (11/12): Final exam
Basic bibliography
- Mostly Harmless Econometrics: An Empiricist's Companion (Angrist and Pischke, 2009)
- Analysis of Financial Time Series, 3rd Edition (Tsay, 2010)
- An Introduction to Statistical Learning (James, Witten, Hastie and Tibshirani, 2023) – https://www.statlearning.com
- Introduction to Bayesian Econometrics (Greenberg, 2013)
Additional bibliography
- Introduction to Econometrics, 3rd edition (Stock and Watson, 2010)
- Introductory Econometrics: A Modern Approach (Wooldridge, 2012)
- Time Series Analysis (Hamilton, 1994)
- Aprendizado de Máquina: Uma Abordagem Estatística (Izbicki and Mendonça, 2020) - https://tiagoms.com/publications/ame
- Estatística e Ciência de Dados (Morettin and Singer, 2021) -https://www.ime.usp.br/~pam/cdadosf3.pdf
- Introduction to Modern Bayesian Econometrics (Lancaster, 2004)
- Bayesian Econometric Methods, 2a edição (Chan, Koop, Poirier and Tobias)
- Bayesian Statistics and Marketing (Rossi, Allenby and McCulloch, 2005)
- Time Series: Modeling, Computation, and Inference (Prado and West, 2010)
Course: BAYESIAN LEARNING - Professional Master in Economics - 2024
Professor: Hedibert Freitas Lopes - www.hedibert.org (hedibertfl@insper.edu.br)
Teaching assistant: Luiza Tuler Veloso (luizatv@insper.edu.br)
Syllabus: The ultimate goal of this course is to enable graduates to critically decide between the classical or Bayesian approach, or a combination of both, when faced with real-world decision-making problems under uncertainty. Areas where these real-world problems arise, as examples discussed throughout the course, include microeconomics, macroeconomics, finance, quantitative marketing, among many others. With this objective in mind, we will study the basic ingredients of the Bayesian paradigm: formulation of the binomial model-prior, model comparison and combination, computational aspects, and Bayesian decision-making. In the second part of the course, the Bayesian approach to traditional linear regression and logistic regression models will be introduced, as well as their modern versions where priors are treated as regularization mechanisms and sparsity inducers. Sparsity will be present throughout the 2nd and 3rd parts of the course when dealing with highly dimensional and/or highly complex models. In the third and final part of the course, we will present several statistical models currently used for this purpose, such as mixture models, hierarchical models, factor models, and regression tree models, as well as models based on neural networks and models that use texts and documents as data (text modeling). All, it is worth mentioning, under the unified and coherent Bayesian approach. All calculations during the course will be performed using the R statistical package.
Homework assignments: HW1 + HW2 + HW3 + HW4
Final project - paper presentation
Additional examples that were developed/discussed in class
- Class of April 23rd 2024:
- Class of April 30ht 2024:
- Class of May 7th 2024:
- Class of May 14th 2024:
- Class of May 21th 2024:
- Class of May 28th 2024:
- Class of June 7th 2024:
- Class of June 11th 2024:
Course notes (+ R code & references)
- Other important modeling structures
- Machine Learning 1: Tree models
- Machine Learning 2: Modeling text
- Machine Learning 3: Neural nets
Additional supporting material
Course: ADVANCED BAYESIAN ECONOMETRICS PhD-2024
Professor: Hedibert Freitas Lopes - www.hedibert.org
Objective: The end of the course goal is to allow the student to critically decide between a Bayesian, a frequentist or Bayesian-frequentist compromise when facing real world problems in the fields of micro- and macro-econometrics and finance, as well as in quantitative marketing, strategy and business administration. With this end in mind, we will visit well known Bayesian issues, such as prior specification and model comparison and model averaging, but also study regularization via Bayesian LASSO, Spike-and-Slab and related schemes, “small n, large p” issues, Bayesian statistical learning via additive regression trees, random forests, large-scale VAR and (dynamic) factor models.
Course description: Basic ingredients: prior, posterior, and predictive distributions, sequential Bayes, conjugate analysis, exchangeability, principles of data reduction and decision theory. Model criticism: Bayes factor, computing marginal likelihoods, Savage-Dickey ratio, reversible jump MCMC, Bayesian model averaging and deviance information criterion. Modern computation via (Markov chain) Monte Carlo methods: Monte Carlo integration, sampling-importance resampling, Gibbs sampler, Metropolis-Hastings algorithms. Mixture models, Hierarchical models, Bayesian regularization, Instrumental variables modeling, Large-scale (sparse) factor modeling, Bayesian additive regression trees (BART) and related topics, Dynamic models, Sequential Monte Carlo algorithms, Bayesian methods in microeconometrics, macroeconometrics, marketing and finance.
- Part I Bayesian ingredients: i) Inference: likelihood, prior, predictive and posterior distributions; ii) Model criticism: Marginal likelihoods, Bayes factor, model averaging and decision theory; and iii) Computation: An introduction (Markov chain and sequencial) Monte Carlo methods.
- Part II Multivariate models: i) Large-scale vector autoregressive models; ii) Factor models and other dimension reduction models; and iii) Time-varying high-dimensional covariance models.
- Part III Modern Bayesian statistical learning: i) Mixture models and the Dirichlet process: handling non-Gaussian models; ii) Regularization: sparsity via shrinkage and variable selection; iii) Large vector-autoregressive and factor models: combining sparsity and parsimony; iv) Classification and support vector machines; v) Regression trees and random forests; and vi) Latent Dirichlet allocation: Text as data, text mining.
Take-home midterm exam: Start: 10am, October 5th, 2024 - End: 10pm, October 7th, 2024 (60 hours later!) - Derivations + R code
Paper presentations: List of papers - On November 12, 2024, between 9 AM and 12 PM, 10 presentations will be given, each lasting no less than 10 minutes and no more than 15 minutes. On the same day, and no later than 9 AM, a PDF summary of 5 to 7 pages must be submitted directly to me via my institutional email hedibertfl@insper.edu.br.
Homework assignments
- First homework assignment: iid Bernoulli-mixture of Beta prior (Due date: September 3rd, 2024, 9am) - Posterior derivations + R code
- Second homework assignment: MC integration and sampling (Due date: September 10th, 2024, 9am) - Solution in R
- Third homework assignment: Nonlinear Gaussian regression (Due date: September 17th, 2024, 9am)
- Quiz: Poisson-Gamma model (Solution) - September 24th 2024, 10am-11am
- Fourth homework assignment: AR(1) plus noise NDLM (Due date: Monday, September 30th, 2024, 9am) - Full conditional distributions - R code
Examples developed in class
- Class 7 - October 8th, 2024:
- Class 8 - October 15th, 2024:
- Class 9 - October 22nd, 2024:
- Class 10 - October 29th, 2024:
- Class 11 - November 5th, 2024:
- Class 12 - November 12th, 2024: Final presentations
LECTURE NOTES
PART I: Bayesian ingredients
- Basic Bayes
- Exchangeability
- Principles of data reduction
- More on estimators
- Decision theory (Nuisance parameters + travel insurance example)
- Decision Theory: Principles and Approaches, by Parmigiani and Inoue (with contributions by Lopes), 2009, Wiley. (TOC)
- Bayesian model criticism (pages 1-6 & 32-34)
- Additional reading material:
- Discussion about p-values
PART II: Bayesian Computation
- Monte Carlo (MC) methods
- Markov chain: a brief review
- Markov chain Monte Carlo (MCMC) algorithms
- Hamiltonian Monte Carlo: A toy example
- Stan/rstan for posterior inference: Hamiltonian MC (HMC) methods
- MC and MCMC: Key References
- More on Bayesian model criticism
PART III: Bayesian Learning
- Fundamentos de Aprendizagem Estatística + R code + MC exercise
- Multiple linear regression: selection, shrinkage, sparsity
- Classification: logistic regression and discriminant analysis
- Multivariate models and dimension reduction
- Classification and regression trees (CART)
- Bayesian CART
- Bootstrap aggregating (bagging)
- Bayesian additive regression trees (BART)
- Latent Dirichlet Allocation (LDA)
- Neural Networks
Complementary material to PART III
- Boosting (weak/stronger learners)
- Random forests
- Bayesian instrumental variables
- General linear and hierarchical models
- Limited dependent variable models
- Finite mixture of distributions
- Spatial models
- P.Richard Hahn's top 25 books on Statistics, Causal Inference, Statistical Computing, Machine Learning and Data Science
Bibliography: Bayesian econometrics
- Zellner (1971) An Introduction to Bayesian Inference in Econometrics
- Goel and Iyngar (1992) Bayesian Analysis in Statistics and Econometrics
- West and Harrison (1997) Bayesian Forecasting and Dynamic Models (2nd edition)
Dorfman (1997) Bayesian Economics Through Numerical Methods
- Bauwens, Lubrano and Richard (2000) Bayesian Inference in Dynamic Econometric Models
- Koop (2003) Bayesian Econometrics
- Geweke (2005) Contemporary Bayesian Econometrics and Statistics
- Lancaster (2004) Introduction to Modern Bayesian Econometrics
- Rossi, Allenby and McCulloch (2005) Bayesian Statistics and Marketing
- Prado and West (2010) Time Series: Modeling, Computation and Inference
- Geweke, Koop and Van Dijk (2011) The Oxford Handbook of Bayesian Econometrics
- Greenberg (2013) Introduction to Bayesian Econometrics
- Herbst and Schorfheide (2015) Bayesian Estimation of DSGE Models
- Chan, Koop, Poirier and Tobias (2019) Bayesian Econometric Methods (2nd edition)
- Broemeling (2019) Bayesian Analysis of Time Series
- Bernardi, Grassi and Ravazzolo (2020) Bayesian Econometrics
Bibliography: Bayesian statistics
- Berger (1985) Statistical Decision Theory and Bayesian Analysis
- Bernardo and Smith (2000) Bayesian Theory
- Gelman and Hill (2006) Data Analysis Using Regression and Multilevel/Hierarchical Models
- Robert (2007) The Bayesian Choice: From Decision-Theoretic Foundations to Computational Implementation
- Hoff (2009) A First Course in Bayesian Statistical Methods
- Carlin and Louis (2009) Bayesian Methods for Data Analysis (3rd edition)
- Gelman, Carlin, Stern, Dunson, Vehtari and Rubin (2016) Bayesian Data Analysis
- Migon, Gamerman and Louzada (2015) Statistical Inference: An Integrated Approach (2nd edition)
- Reich and Ghosh (2019) Bayesian Statistical Methods
- Held and Sabanes-Bove (2020) Likelihood and Bayesian Inference: With Applications in Biology and Medicine
Bibliography: Bayesian computation
Gilks, Richardson and Spiegelhalter (1995) Markov Chain Monte Carlo in Practice
- Doucet, de Freitas and Gordon (2001) Sequential Monte Carlo Methods in Practice
- Robert and Casella (2004) Monte Carlo Statistical Methods (2nd edition)
- Gamerman and Lopes (2006) MCMC: Stochastic Simulation for Bayesian Inference, Second Edition
- Marin and Robert (2007) Bayesian Core: A Practical Approach to Computational Bayesian Statistics
- Albert (2009) Bayesian Computation with R
- Brooks, Gelman, Jones and Meng (2011) Handbook of Markov Chain Monte Carlo
- Givens and Hoeting (2012) Computational Statistics (2nd edition)
- Marin and Robert (2014) Bayesian Essentials with R (complete solution manual)
- Turkman, Paulino and Mueller (2019) Computational Bayesian Statistics: An Introduction
- McElreath (2020) Statistical Rethinking: A Bayesian course with Examples in R and STAN
- Chopin and Papaspiliopoulos (2020) An Introduction to Sequential Monte Carlo
Bibliography: (Bayesian) statistical learning
- Bishop (2006) Pattern Recognition and Machine Learning
- Hastie, Tibshirani and Friedman (2008) The Elements of Statistical Learning, 2nd edition
- Murphy (2012) Machine Learning: A Probabilistic Perspective
- Barber (2012) Bayesian Reasoning and Machine Learning
- James, Witten, Hastie and Tibshirani (2013) An Introduction to Statistical Learning
- Hastie, Tibshirani and Wainwright (2015) Statistical Learning with Sparsity
- Efron and Hastie (2016) Computer Age Statistical Inference: Algorithms, Evidence and Data Science
- Fernandez and Marques (2018) Data Science, Marketing and Business
- Izbicki & Santos (2020) Aprendizado de máquina: uma abordagem estatística
Bibliography: Classical Monte Carlo papers
- Metropolis and Ulam (1949) The Monte Carlo method. JASA, 44, 335-341.
- Metropolis, Rosenbluth, Rosenbluth, Teller and Teller (1953) Equation of state calculations by fast computing machines. Journal of Chemical Physics, 21, 2087-1092.
- Hastings (1970) Monte Carlo sampling methods using Markov chains and their applications. Biometrika, 57, 97-109.
- Peskun (1973) Optimum Monte Carlo sampling using Markov chains. Biometrika, 60, 607-612.
- Besag (1974) Spatial Interaction and the Statistical Analysis of Lattice Systems. JRSS-B, 36, 192-236.
- Kirkpatrick, Gelatt and Vecchi (1983) Optimization by Simulated Annealing. Science, 220 (4598), 671-680.
- Geman and Geman (1984) Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images. IEEE Trans. Pattern Analysis and Machine Intelligence, 6, 721-741.
- Pearl (1987) Evidential reasoning using stochastic simulation of causal models. Artificial intelligence, 32, 245-257.
- Tanner and Wong (1987) The Calculation of Posterior Distributions by Data Augmentation. JASA, 82, 528-540.
- Geweke (1989) Bayesian Inference in Econometric Models Using Monte Carlo Integration. Econometrica, 57, 1317-1339.
- Gelfand and Smith (1990) Sampling-Based Approaches to Calculating Marginal Densities. JASA, 85, 398-409.
- Casella and George (1992) Explaining the Gibbs Sampler. The American Statistician, 46, 167-174.
- Gilks and Wild (1992) Adaptive Rejection Sampling for Gibbs Sampling. Applied Statistics, 41, 337-348.
- Smith and Gelfand (1992) Bayesian Statistics without Tears: A Sampling-Resampling Perspective. The American Statistician, 46, 84-88.
- Chib and Greenberg (1995) Understanding the Metropolis-Hastings algorithm. The American Statistician, 49, 327-335.