This document tells you how to use Behavioral-Responses, an open-source model in the Policy Simulation Library (PSL) collection of USA tax models. It assumes that you have already read the documentation introduction. You always use Behavioral-Responses in conjunction with Tax-Calculator, the static-analysis model in the PSL collection of USA tax models, by writing and executing a Python script. For an introduction to writing Python scripts using Tax-Calculator, read the tested recipes in our Tax-Calculator 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
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
The Behavioral-Responses parameters and logic are described in the behavior.py file, where the parameters are defined in the PARAM_INFO dictionary, and the logic of how those parameters 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.
A tested recipe for using the Behavioral-Responses parameters and response function is contained in recipe 2 of the Tax-Calculator cookbook and in the test_response_function in the test_behavior.py file.
Notice that when writing a script 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 behrespOr, 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 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.