PSLmodels / OG-USA

Overlapping-generations macroeconomic model for evaluating fiscal policy in the United States
https://pslmodels.github.io/OG-USA/
Creative Commons Zero v1.0 Universal
19 stars 34 forks source link

Tax function estimation #96

Open jdebacker opened 8 months ago

jdebacker commented 8 months ago

Beginning with PR #73, which updated the default calibration of OG-USA, we have observed some odd results related to the estimated tax functions. This issue will document what we've noticed in the hopes that we can address any issues with the tax function estimation routines or with the microsimulation model used to calibrate OG-USA (or both).

Things that haven't seemed quite right:

jdebacker commented 8 months ago

Some plots:

DEP functions estimated on Tax-Calculator 3.4.1 (each line is a different age- blues for younger, red for older): DEP_new

GS functions estimated on Tax-Calculator 3.5.1: GS_new

jdebacker commented 8 months ago

Some key questions:

  1. Are these odd functions and artifact of the microsimulation model output or txfunc.py (there have been changes to both)?
  2. Are these functions "correct" (i.e., do they fit the data best)?
  3. What is preventing estimation of the mono and mono2D functions?
jdebacker commented 8 months ago

Re (2) above, I don't see how these could be the best fit (albeit, the scatter plot dots do not reflect sampling weights):

ETRs for 40 year olds, DEP functions (tax year 2024): DEP_age40

MTR on labor income for 40 year olds, DEP functions (tax year 2024): DEP_age40_mtrx

jdebacker commented 6 months ago

I've started looking into the estimation of the tax functions. Some questions I have:

  1. Does the numerical optimization method in our minimization of the non-linear least squares estimator matter for our estimates? In particular, as seen above, it is not uncommon to see the fitted functions and see clear room for a different parameterization to fit better than what is returned from the optimizer.
  2. Are we using the good starting values in our optimization? Do "better" starting value help reduce variation across age?
  3. Is it particularly difficult to estimate MTRs since they display much more variation than ETRs? And if so, is it better to infer the MTRs from the ETRs? But then, how much of the variation in the data are we missing?
jdebacker commented 6 months ago

Re the method of numerical optimization, I'm seeing significant differences across the numerical algorithm used to minimize the nonlinear least squares function. Here are the tax functions for each age estimated using a few different algorithms:

DEP functional form:

L-BFGS-B method

CPS data

CPS_BFGS_mtrx

PUF data

PUF_BFGS_mtrx

SLSQP method

CPS data

DEP_CPS_SLSQP_mtrx

PUF data

DEP_PUF_SLSQP_mtrx

Nelder-Mead method

CPS data

CPS_NM_mtrx

PUF data

PUF_NM_mtrx

GS functional form:

L-BFGS-B method

CPS data

GS_CPS_mtrx

PUF data

GS_PUF_BFGS_mtrx

SLSQP

CPS data

GS_CPS_SLSQP_mtrx

PUF data

GS_PUF_SLSQP_mtrx

Nelder-Mead

CPS data

GS_CPS_NM_mtrx

PUF data

GS_PUF_NM_mtrx

Summary:

jdebacker commented 6 months ago

ETR function estimation

The above plots are of MTRs on labor income. ETRs seem to be more consistently estimated:

DEP

CPS

DEP_CPS_BFGS_ETR

PUF

DEP_PUF_BFGS_ETR

GS

CPS

GS_CPS_BFGS_etr

PUF

GS_PUF_BFGS_etr

GS, Nelder-Mead, PUF

GS_PUF_NM_etr