-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalize spline tax functions to 2D #828
Comments
@jdebacker @rickecon Should 'mono' also be included in the choices for |
The code for our one-dimensional monotone smoothing spline is in |
the |
Some other references:
cc: @jdebacker @prrathi |
@jdebacker @rickecon would you happen to have a pdf version of Unimodal smoothing by Eilers? I don't think I have institutional access to the paper |
@jdebacker @rickecon is monotonicity the only requirement here or does smoothness/continuity of derivatives matter? |
@prrathi monotonicity and C2 (continuity in the levels and in the first derivative) I don't think we need continuity in the second derivative, but I don't know. It probably depends on the optimizer. But I think a property of generalized additive models is that if the kernel is C2, then the final predictor is C2. |
@prrathi You could work with the micro data (produced from a Current Population Survey data file) that is in |
@rickecon @jdebacker able to fit the tax data using pyGAM. I first bin the data along both axes- labor income and capital income- (wrote a general function that should apply to any number of dimensions) and then fit the model using the weighted results. There are parameters/configurations to test around with like number and degree of splines, I've attached some pictures, the following three are different angles of same result for 100 by 100 bins with 20 splines for each labor and capital income: These three are for 100 by 100 bins with 100 splines for each labor and capital income: The data for the plots is only from the middle 50% of both labor and capital incomes to make trends more clear, but the models were trained on all data. For 20 splines fit mean deviation for middle 50% of both incomes is 0.08669 (units of etr), for 100 splines mean deviation for middle 50% is 0.08517, excluded some of the really big outliers (especially on the upper end) for this comparison |
This issue is to discuss the extrapolation of the spline tax functions introduced in PR #819 to two dimensions, where those two dimensions are capital and labor income.
The key is to continue to implement the constraints that ensure the functions are monotonic.
cc @prrathi @rickecon
The text was updated successfully, but these errors were encountered: