Penn State 2023

Ken Judd Penn State Numerical Methods course

Return to Ken Judd’s Home Page

Return to Ken Judd’s Penn State Numerical Methods Course Home Page

PENN STATE 2023 LECTURES ON NUMERICAL METHODS 

KEN JUDD 

I will be visiting Penn State March 13 – March 24, 2023. My lectures will be
6-7:30 pm, 111 Chambers
March 14: Discussion of NFXP, MPEC and surrogate function approaches to structural estimation (topics 1, 2 and 3 below)
March 16: Discussion of BLP as an example of estimation using NFXP and Monte Carlo integration versus MPEC and quadrature
March 21: Discussion of estimating static games and solving dynamic games
March 23: Solving and estimating dynamic games

The links below take you to the papers related to the topics. I certainly cannot cover all of them in detail. I have included links presentations by Che-Lin Su and Ben Skrainka which do present the details. My focus will be on the general issues of how to solve dynamic problems, dynamic programming and games, how to estimate those models, and the basic computational challenges they present.

My slides and other documents are available at PSU2023.

1: Constrained Optimization: NFXP vs MPEC

Here is a basic lecture describing Nested Fixed Point and MPEC.  Computational mathematicians call the NFXP method “implicit programming.”

Nested Methods and a Superior Alternative

2: Structural Estimation: NFXP vs MPEC vs Surrogate

My slides are at PSU2023:
Su-Judd Basics, and
Surrogate Function Method

I have put Che-Lin’s code — AMPL and Matlab — in the Code folder in PSU2023.

Evolution of Su-Judd 

The SJ papers are versions of the Su-Judd paper on MPEC, a small piece of which was published in Econometrica as a note. Here are the four versions of Su-Judd, leading to the 2012 Econometrica paper. 

2007 SJ Working paper Nov07

2008 SJ Original submission to ECTA

2010 SJ First revision for ECTA

2012 SuJudd_ECTA2012g June 2014

Che-Lin Su Presentations

Su-ICE2012.pdf

Su-LBS-Jan2015.pdf

Su-ZICE2015.pdf

SuJudd-SAET07.pdf

Michelangeli thesis 

Valentina Michelangeli wrote an excellent dissertation using MPEC to estimate a DP life cycle problem with both continuous and discrete decisions. This problem is estimation of a dynamic programming model but with continuous as well as discrete state variables and was a finite-horizon problem.

I am too much of a coward to do empirical work, but I enjoy helping those brave souls who go down that road. I helped her develop the MPEC strategy but I must admit that I was shocked that it worked so well! Very little of it was published. Below are the papers.

Valentina Michelangeli_Dissertation.pdf

Valentina Michelangeli_IFS_slides.pdf

ValentinaMichelangeli_Appendix.pdf

ValentinaMichelangeli_DoesItPayToGetAReverseMortgage.pdf

Infinite- versus Finite-Horizon DP

The Rust bus model assumes that Zurcher will live forever, whereas his horizon was certainly finite. Therefore, the infinite-horizon assumption is a misspecification. Does that matter? Also, Rust has claimed that the discount factor is difficult to estimate even though it is likely a very important parameter.

A paper by Mueller and Reich has addressed both questions. They show that the discount rate likely exceeds 1. Contrary to standard beliefs in economics, this does not make solving the DP problem difficult. They use methods from the 1970’s to solve DP problems with arbitrary discount factors as part of an MPEC estimation approach. This is made easy by the use of homotopy solution methods. Furthermore, they show that while assuming an infinite horizon is wrong, it has little impact on the estimates because the DP solution is the limit of finite-horizon DP specifications.

They also show that there is a break in the estimated (real) discount factor at the same time that Volcker took over monetary policy and drove inflation down and increased real interest rates.

Rust comment:

In the 2014 and 2015 versions, Rust et al. compares NFXP and MPEC. They argue that NFXP is more stable and faster than MPEC. However, Che-Lin Su showed that the comparisons were not valid. See papers and slides at PSU2023.

Rust Iskhakov Schjerning June 2014

Rust et al. (January, 2015)

Rust et al. (January, 2016)

3: BLP: NFXP vs MPEC

Nevo’s A Research Assistant’s Guide to Random Coefficients Discrete Choice Models of Demand describes the BLP model and a commonly used computational method. Che-Lin and I looked at Nevo’s code and found some obvious weaknesses. In particular, the stopping rules were too loose. I had Che-Lin use MPEC to solve the Nevo problem. He found a better value for the objective and was happy because he was trained as a computational mathematician. I told him that was not enough, and that he should check to see if Nevo’s estimate was statistically different than his result. It was. I decided my job was done. Che-Lin went on to write a paper with Dube and Fox.

AMPL code for MPEC applied to BLP.

Dubé, Fox, & Su (2012) compares Nevo to an MPEC approach

Dubé, Fox, Su Appendix

4: BLP: quadrature vs MC

We first examine the performance of simulation methods for a simple portfolio problem. It shows that using Monte Carlo integration to approximate the objective in an optimization problem is unreliable.

Portfolio problem PSU 2019 nb.pdf

Skrainka-Judd (2012) shows that these problems become serious for estimating BLP models, but also shows that numerical quadrature formulas are far more accurate and reliable. Essentially, Monte Carlos methods have a tendence to underestimate standard errors. Using Monte Carlo integration helps with publishing papers because (1) you are more likely to get identification, and (2) you can try different seeds for your RNG and use the one that gives you results the editor will like. Editors will likely detect “regression fishing” but I doubt that they are as good at detecting “seed fishing”.

 High Performance Quadrature Rules: How Numerical Integration Affects a Popular Model of Product Differentiation

5: Static games

We begin with a simple example of using MPEC to estimate a dynamic game. See MPEC simple game in

Che-Lin Su examined different methods for estimating static games:

Estimating discrete-choice games of incomplete information: Simple static examples by Che-Lin Su

6: Dynamic games

Solution methods:
Pakes-Mcguire: RAND, 1994
Doraszelski-Judd: QE 2012 (I will present “2 Doraszelski-Judd Slides”)
“Stochastic Games With Random Moves” indicates that the order of updating does not matter in many cases
Dynamic games can be solved using nonlinear equation solvers. I will present “6 2014 Ferris-Judd-Schmedders”
Polynomial solution methods can be used to find all pure strategy equilibria — “Finding all pure strategy equilibria” by Judd, Renner and Schmedders.

Estimation:
Egesdal-Lai-Su:
The paper is “Quantitative Economics – Estimating dynamic discrete-choice games of incomplete information” in the folder.
“LBS-May2014” is a presentation Che-Lin gave.
“OverviewEstimation” is a working paper by Che-Lin summarizing this work.

Folder Directory

Here the directory to the folder on games:

Office Hours:

I will also be available for office visits. Due to the disruptions of the past few years, most of you are unaware of how I do these office visits. First, send me something written that describes the computational aspects of what you are working on or want to work on. Second, do not assume that I have read the papers related to your research. Third, don’t be surprised if I tell you that some famous paper cannot be trusted. I will tell you a story about how we discovered that Nevo’s method for BLP was botched. 

Basically, the part of your research I can help with is the computational methods you use. Feel free to send me your writeup NOW so that I will be acquainted with your work when we meet.

Here is a conversation I had with Ariel Pakes many years ago that describes how these meetings will go:

Pakes: Ken, may I ask you about a computational problem?
Judd: Yes.
Pakes: First let me tell you the intuition of the problem.
Judd: STOP! I don’t want to hear about any economics details. Is this an optimization problem?
Pakes: Yes.
Judd: Is the objective concave? Smooth?
Pakes: Yes. It is actually linear.
Judd: Are the constraints smooth? Convex?
Pakes: Yes. In fact they are linear.
Judd: Can’t Matlab’s linear programming code handle your problem?
Pakes: Perhaps, but my RA wants to use fmincon.
Judd: (Probably some nasty comments about the blind leading the blind, Harvard, fmincon, etc.)

Don’t let this intimidate you. I tell you this so that we can quickly focus on how I can best help you. Everyone knows I can be very critical, but my aim is to help. Also, do not be afraid that I will mention your work in my blog. I have many Nobel Prize economists, Ivy economists, journal editors, and other bigshots to criticize. It would be very bad behavior for me to pick on you. 

Looking forward to seeing you soon.