Scale-type phase-out parameter structure
Opened this issue · 0 comments
MaxGhenis commented
Governments often structure benefit programs and tax credits with a maximum value, a phase-out start, and a phase-out rate. For example, the US Supplemental Security Income program phases out with income at 50% above an exemption; from the OpenFisca US docs:
We model these with sets of parameters for maximum_amount
, phase_out_start
, and phase_out_rate
(e.g. see the US Child Tax Credit), and then code structures like:
reduction = max_(0, income - phase_out_start) * phase_out_rate
return max_(0, maximum_amount - reduction)
I'd suggest a parameter structure that captures these elements and automatically computes the value via phase_out_parameter.calc(income)
, in the vein of parameter scales. I think this would reduce code duplication and room for error.