The code in this repository analyses effective average tax rates, or "EATRs". The results are presented in the Treasury Analytical Note: Tax and Transfer Progressivity in New Zealand: Part 2 Results (AN 23/03).
The scripts are organised in the following general order:
- Create various datasets
- Run the TAWA model (including ACC income)
- ACC income data
- Run the TAWA model (excluding ACC income)
- PIE income data
- Wealth data
- Categorise Wealth data
- Subset Wealth data
- Capital gains
- Investment gains
- Owner-occupied gains
- Housing by territorial authority & number of bedrooms
- Housing costs
- Imputed rents
- Expenditure data
- HES19 GST data
- Impute GST onto HES18
- Assign Accommodation Supplement using the TAWA take-up rate
- Analyse the data
- Create person-level dataset
- Create family-level dataset
- Analysis of family EATRs
- Analysis of components of family EATRs
- Gini coefficients of EATR income distributions
- Create output for checking and release
This code is intended to be run in the IDI (Stats NZ's "Integrated Data Infrastructure"), and has some dependencies on packages and data developed by the Treasury's Analytics & Insights team.
Several of these scripts require access to particular input data and scripts for
running TAWA (the Treasury's Tax and Welfare Analysis model), including
the R packages TAWArun
and TAWApost
. The input data could be substituted with
Stats-derived data by an expert user, but this is not explicitly supported.
This code can be modified and customised by users to meet the needs of specific projects, and in all cases the Analytics and Insights Team, Te Tai Ōhanga, New Zealand Treasury must be acknowledged as a source. While all care and diligence has been used in developing this code, The Treasury gives no warranty it is error free and will not be liable for any loss or damage suffered as a result of its use, either directly or indirectly.