Inverse Optimal Tax Class Object#
inverse_optimal_tax.py Class
iot.inverse_optimal_tax#
- class iot.inverse_optimal_tax.IOT(data, income_measure='e00200', weight_var='s006', eti=0.25, dist_type='log_normal', kde_bw=None, mtr_smoother='kreg', mtr_smooth_param=1000, kreg_bw=[120000])[source]#
Computes social welfare weights across the income distribution given data, tax policy parameters, and behavioral parameters.
- Parameters:
data (Pandas DataFrame) – micro data representing tax payers. Must include the following columns: income_measure, weight_var, mtr
income_measure (str) – name of income measure from data to use
weight_var (str) – name of weight measure from data to use
eti (scalar or dict) – compensated elasticity of taxable income w.r.t. the marginal tax rate. If a dict, must have keys
knot_pointsandeti_valueswith equal-length lists.dist_type (None or str) – type of distribution to use if parametric; if None, then non-parametric bin weights
kde_bw (scalar or None) – bandwidth for KDE estimation
mtr_smoother (None or str) – method used to smooth the mtr function; if None, then use bin average mtrs
mtr_smooth_param (scalar) – parameter for mtr_smoother
kreg_bw (array_like) – bandwidth for kernel regression
- compute_income_dist(data, income_measure, weight_var, dist_type, kde_bw=None)[source]#
Compute the distribution of income (parametrically or not) from the raw data.
This method computes the probability density function and its derivative.
- Parameters:
data (Pandas DataFrame) – micro data representing tax payers. Must include the following columns: income_measure, weight_var, mtr
income_measure (str) – name of income measure from data to use
weight_var (str) – name of weight measure from data to use
dist_type (None or str) – type of distribution to use if parametric, if None, then non-parametric bin weights
kde_bw (array_like) – bandwidth for kernel regression
- Returns:
z (array_like): income grid points
F (array_like): cumulative distribution function at each z
f (array_like): density at each z
f_prime (array_like): slope of the density function at each z
- Return type:
tuple
- compute_mtr_dist(data, weight_var, income_measure, mtr_smoother, mtr_smooth_param, kreg_bw)[source]#
Compute marginal tax rates over the income distribution and their derivative.
- Parameters:
data (Pandas DataFrame) – micro data representing tax payers. Must include the following columns: income_measure, weight_var, mtr
weight_var (str) – name of weight measure from data to use
income_measure (str) – name of income measure from data to use
mtr_smoother (None or str) – method used to smooth the mtr function; if None, then use bin average mtrs
mtr_smooth_param (scalar) – parameter for mtr_smoother
kreg_bw (array_like) – bandwidth for kernel regression
- Returns:
mtr (array_like): mean marginal tax rate for each income bin
- mtr_prime (array_like): rate of change in marginal tax rates
for each income bin
- Return type:
tuple
- df()[source]#
Return all vector attributes in a DataFrame format.
- Returns:
- DataFrame with all inputs/outputs
for each income bin
- Return type:
df (Pandas DataFrame)
- sw_weights()[source]#
Return the social welfare weights for a given tax policy.
See Jacobs, Jongen, and Zoutman (2017) and Lockwood and Weinzierl (2016) for details.
\[g_{z} = 1 + \theta_z \varepsilon^{c}\frac{T'(z)}{1-T'(z)} + \varepsilon^{c}\frac{zT''(z)}{(1-T'(z))^{2}}\]- Returns:
- g_z (array_like): social welfare weights via analytical
formula
- g_z_numerical (array_like): social welfare weights via
the Lockwood and Weinzierl numerical formula
- Return type:
tuple