Using Behavioral-Responses

This document tells you how to use Behavioral-Responses, an open-source model in the Policy Simulation Library (PSL) collection of USA tax models, the lastest release of which is: 0.11.0 (2020-09-22).

This documentation assumes that you have already read the documentation introduction. You always use Behavioral-Responses in conjunction with the latest version of Tax-Calculator, the static-analysis model in the PSL collection of USA tax models, by writing and executing a Python program. For an introduction to writing Python programs using Tax-Calculator, read the tested recipes in our Tax-Calculator Python Cookbook. If you want to participate in the development of Behavioral-Responses — by asking a question, reporting a bug, improving the documentation or making an enhancement to the Python source code — you should go to the developer website.

Please cite the source of your analysis as Behavioral-Responses release #.#.#, author's calculations. If you wish to link to Behavioral-Responses, this page is preferred. Additionally, we strongly recommend that you describe the elasticity parameters used, and provide a link to the materials required to replicate your analysis or, at least, note that those materials are available upon request.

Response Parameters and Logic

The Behavioral-Responses elasticity parameters and logic are described in the file, where the response function elasticities are defined in its docstring and the logic of how those elasticities are used along with Tax-Calculator results is defined in the higher-level response function. The lower-level quantity_response function is self-contained and described in the functions's docstring.

Basic Python Recipe

A tested recipe for using the Behavioral-Responses parameters and response function is contained in Tax-Calculator Python Cookbook recipe 2 and in the test_response_function in the file.

Notice that when writing a program like this you must import both the taxcalc package (to access Tax-Calculator) and the behresp package (to access Behavioral-Responses). Both these conda packages can be installed on your computer using this command at the operating-system command prompt:

  conda install -c PSLmodels behresp
Or, if you already have both of the packages installed but want to upgrade them to the most recent versions, use these commands at the operating-system command prompt:
  conda update -c PSLmodels taxcalc
  conda update -c PSLmodels behresp

The Behavioral-Responses logic assumes that the elasticity parameters apply to all filing units. If you want to estimate responses where the value of the elasticity parameters vary across (say, earnings) groups, you can use the quantity_response function. A recipe for doing this is contained in recipe 4 of the Tax-Calculator Python Cookbook. That recipe simply estimates the responses. But the techniques used in the Behavioral-Responses response function can be used to apply the estimated responses to the post-reform Tax-Calculator object and recompute tax liabilities, producing tax liability estimates that include the partial-equilibrium effects of the estimated behavioral responses.