USW-Tax-Analyzer

RUNSPEC CLI Examples
Login

Examples of Using the RUNSPEC CLI to USW-Tax-Analyzer

This document shows you how to use the RUNSPEC CLI to analyze any kind of parametric policy reform under static assumptions. It also illustrates non-static tax calculations using assumed household behavior responses caused by a reform.

It is recommended that you follow along with the examples below by executing the runs on your computer as you read. Start following along by reading the RUNSPEC CLI documentation and executing the
uswrun --test
command.

Below we use the $ character as the command prompt symbol, rather the the > character typical on Windows.

The contents of this document are as follows:

Comparing 2019 Results with BITSS OPA Results

We begin using the RUNSPEC CLI to verify that the model produces results similar to the 2019 results in the Open Policy Analysis (OPA) of Elizabeth Warren's proposal published by the Berkeley Initiative for Transparency in the Social Sciences (BITSS). First, we compare results assuming no avoidance response to the reform. Then we show how to assume a uniform 16% avoidance rate and compare the results under this assumption with those from the BITSS OPA.

This comparison is the same as conducted using the JSON CLI (as described here), except that we tell the model what to do by using the run specification language and the RUNSPEC CLI tool uswrun.

Comparing No-Avoidance Results

The no avoidance (or static analysis) run is specified as follows:

$ tacat ew_noavoid.run
use input tax.csv;  -- use tax data and weights built into model
use taxyear 2019;
use reform {
  /*
  Elizabeth Warren's 2019 wealth tax proposal as described
  in the BITSS Open Policy Analysis (OPA) at this URL:
      https://github.com/BITSS/opa-wealthtax
  The reform proposal calls for three wealth tax brackets,
  where each brakN policy parameter specifies the TOP of
  the taxable wealth bracket.
  */
  -- 1st is a zero rate bracket for wealth up to $50 million:
  set brak1 to 50e6 in 2019;  set rate1 to 0.00 in 2019;
  -- 2nd is a 2% rate bracket from $50 million to $1 billion:
  set brak2 to 1e9 in 2019;   set rate2 to 0.02 in 2019;
  -- 3rd is a 3% rate bracket for wealth over $1 billion:
  set brak3 to 9e99 in 2019;  set rate3 to 0.03 in 2019;
};

We produce results for the Warren reform assuming no avoidance behavior in response to the reform by using the RUNSPEC CLI as follows:

$ uswrun ew_noavoid.run
INPUT data are extrapolated to 2019 using default growth factors under CurLaw
INPUT data are extrapolated to 2019 using default growth factors under REFORM
Calculations for 2019 use no behavior response logic
Write minimal dump output file ew_noavoid-19.csv for 2019
Write table output file ew_noavoid-19.tab for 2019
Write REFORM parameter output file ew_noavoid-19.par for 2019
Write parameter changes output file ew_noavoid-19.pch for 2019
Run time is 0.2 seconds

When we tabulate the dump output using the same AWK script as used to tabulate the JSON CLI dump output, we get the same results:

$ awk -f opa.awk ew_noavoid-19.csv
BITSS-OPA-style results for 2019
total_wealth_tax_($b)= 254.7
total_households_(#m)= 156.436
taxed_households_(#)= 93895
percent_hhs_taxed(%)= 0.06

Comparing Uniform-Avoidance-Rate Results

Next we show how to specify responses to the Warren reform and compare results with those generated by the BITSS OPA model.

By default, USW-Tax-Analyzer generates static analysis of a reform, but it has the option to specify non-zero behavior elasticities. To make USW-Tax-Analyzer work like the BITSS OPA model assuming a uniform 16% avoidance rate, we add a specify a ew_avoid16p.run file that is the same as the ew_noavoid.run file except that non-zero behavior elasticities are specified in the response section. We can see the differences in those two files as follows:

$ tadiff ew_noavoid.run ew_avoid16p.run
18a19,52
> use response {
>   /*
>   Behavioral response to above reform that mimics the uniform 16% avoidance
>   response assumed in the BITSS OPA.
> 
>   The behavioral response logic built into USW-Tax-Analyzer assumes a
>   log-log response function, in which the assumed elasticity can vary
>   across pre-reform levels of the variable.  The substitution elasticity
>   is multiplied by the proportional change in the after-tax price of the
>   variable (that is, the proportional change in 1-MTR, where MTR is the
>   variable's marginal tax rate).  Because there is no wealth tax under
>   current law, the pre-reform after-tax price of wealth is 1.00.  In the
>   2% rate bracket, the post-reform after-tax price of wealth is 0.98, which
>   implies a proportional change of -0.02.  Assuming an elasticity of 8.0 is
>   required to replicate the 16% avoidance rate assumed by BITSS-OPA.
>   Because the proportional change in the top 3% bracket is -0.03, a lower
>   elasticity of 5.3333333 is required to replicate the uniform 16% avoidance
>   rate assumed by BITSS.
>   */
>   -- Two of the following instructions are commented out because
>   -- they are redundant; they are included only for clarity.
> 
>   -- response for those in the zero percent bracket:
>   set wealth_bin_edges to 50e6 in 2019 for bintop1;
>   /* set wealth_sub_elasticity to 0.0 in 2019 for elast1; */
> 
>   -- response for those in the two percent bracket:
>   set wealth_bin_edges to 1e9 in 2019 for bintop2;
>   set wealth_sub_elasticity to 8.0 in 2019 for elast2;
> 
>   -- response for those in the three percent bracket:
>   /* set wealth_bin_edges to 3e99 in 2019 for bintop3; */
>   set wealth_sub_elasticity to 5.3333333 in 2019 for elast3;
> };

Then to use these elasticities in the analysis, we execute this command:

$ uswrun ew_avoid16p.run
INPUT data are extrapolated to 2019 using default growth factors under CurLaw
INPUT data are extrapolated to 2019 using default growth factors under REFORM
Calculations for 2019 use behavior response logic
Write minimal dump output file ew_avoid16p-19.csv for 2019
Write table output file ew_avoid16p-19.tab for 2019
Write REFORM parameter output file ew_avoid16p-19.par for 2019
Write parameter changes output file ew_avoid16p-19.pch for 2019
Run time is 0.2 seconds

Tabulating the dump output yields these results:

$ awk -f opa.awk ew_avoid16p-19.csv
BITSS-OPA-style results for 2019
total_wealth_tax_($b)= 198.9
total_households_(#m)= 156.436
taxed_households_(#)= 78337
percent_hhs_taxed(%)= 0.05

These are the same results as generated by the JSON CLI.