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=3)[source]#
Constructor for the IOT class.
This IOT class can be used to compute the 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) – compensated elasticity of taxable income w.r.t. the marginal tax rate
bandwidth (scalar) – size of income bins in units of income
lower_bound (scalar) – minimum income to consider
upper_bound (scalar) – maximum income to consider
dist_type (None or str) – type of distribution to use if parametric, if None, then non-parametric bin weights
mtr_smoother (None or str) – method used to smooth our mtr function, if None, then use bin average mtrs
- Returns:
IOT
- Return type:
class instance
- 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
- Returns:
- z (array_like): mean income at each bin in the income
distribution
f (array_like): density for income bin z
- f_prime (array_like): slope of the density function for
income bin z
- Return type:
tuple
- compute_mtr_dist(data, weight_var, income_measure, mtr_smoother, mtr_smooth_param)[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
mtr_smoother (None or str) – method used to smooth our mtr
function
None (if)
mtrs (then use bin average)
- 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
- Parameters:
None
- Returns:
- DataFrame with all inputs/outputs
for each income bin
- Return type:
df (Pandas DataFrame)
- sw_weights()[source]#
Returns 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}}\]- Parameters:
None
- Returns:
vector of social welfare weights across the income distribution
- Return type:
array_like