Change a tax law parameter - Example 2

/* Example 2 - Change a tax law parameter */ quietly include taxcalc init weight = s006/100 use puf_2004 generate tax0 = e10300 /* Store taxpayer value */ init comp /* Calculate tax liability under base law */ replace flpdyr = soiyr generate tax1 = c10300 /* Store calculated liability */ matrix _amex[1,2004-1992] = 4100 /* Set personal exemption for proposal */ comp generate tax2 = c10300 format %9.0f tax0 tax1 tax2 e10300 summarize tax0 tax1 tax2 [iw=weight],format

Notes

In this example we change the value of the personal exemption for 2004 from $3,100 to $4,100 and calculate the change in liability assuming no behavioral response

Tax law parameters are defined and initialized in the init.ado program. In this case the personal exemptions over time are held in the matrix _amex.

The base law revenue is calculated with the comp.ado command, which fills in a large number of intermediate tax calculations in addition to c10300, which is tax after credits.

We can change the personal exemption to $4,100 by changing the value of _amex[1,12] to 4100. In this case, the _amex[1,1] element is for 1993, and the second (leftmost) dimension is unused. We then recalculate the tax by executing comp.ado again. This writes over the original calculation of c10300, which is the reason it was saved as tax1. Since we don't explicitly save the intermediate values of the base case, they are lost.

The separation of initialization and computation saves us from rereading the entire dataset, while providing great flexibility for modifications of the calculation without editing taxcalc.do. Nevertheless, you might want to modify the source code, which is generally straightforward.