Change a tax law parameter - Example 2
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
macro.
You would consult the source code of %INIT
for the parameter names
and historic values. In this case the personal exemptions over time are held in an
array _amex(1993:2008)
. All TAXCALC
internal
variable names start with an underscore to avoid collisions with your
code.
We have to set _amex(2004)
to the historic value for every record -
%INIT
only initializes once per data step run. In this case we change
the exemption value every time a record is read, so that won't be sufficient.
The base law revenue is calculated with the %COMP
macro, 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 and recalculate the tax by
inserting %COMP
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.sas
. Nevertheless, you might want
to modify the source code, which is generally straightforward.