Skip to content
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

Renaming and restructuring of piecewise_polynomial parameters #462

Closed
wants to merge 3 commits into from

Conversation

LauraGergeleit
Copy link
Contributor

What problem do you want to solve?

Closes ##444. We should think about a renaming of the parameters used for piecewise_polynomial, so that we use piecewise_polynomial internally but 'hide' it from the parameter files.
Then, we could also avoid to specify values in the parameter file that are not specifically documented in the law but used in piecewise_polynomial, as it is the case for soli_st (s. ##444).

Remaining problem with 1: upper_threshold in soli_st:
While the threshold is overwritten with the correct value, the intercept_at_lower_threshold is calculated using the value specified in the parameter file. Thus, the test for soli_st still fail, when changing the parameter in the yaml-file.

@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Base: 91.41% // Head: 92.96% // Increases project coverage by +1.55% 🎉

Coverage data is based on head (3fae675) compared to base (53d665c).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 3fae675 differs from pull request most recent head c3d4e74. Consider uploading reports for the commit c3d4e74 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #462      +/-   ##
==========================================
+ Coverage   91.41%   92.96%   +1.55%     
==========================================
  Files          76       74       -2     
  Lines        4005     3937      -68     
==========================================
- Hits         3661     3660       -1     
+ Misses        344      277      -67     
Impacted Files Coverage Δ
gettsim/policy_environment.py 100.00% <100.00%> (ø)
dashboard/pre_processing_data.py 0.00% <0.00%> (ø)
src/_gettsim/visualization.py
src/_gettsim/transfers/unterhalt.py
src/_gettsim_tests/test_docs.py
...tsim/social_insurance_contributions/ges_pflegev.py
src/_gettsim/taxes/abgelt_st.py
...amic_pension_data/_create_custom_pension_params.py
src/_gettsim/demographic_vars.py
src/_gettsim_tests/__init__.py
... and 140 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hmgaudecker hmgaudecker marked this pull request as draft December 14, 2022 17:51
@hmgaudecker
Copy link
Collaborator

Thanks ! Apologies, I was not clear enough I think.

What I had in mind, and that is hopefully in line with @mjbloemer's line of thinking, was to

  1. only specify the parameters in the law in soli_st.yaml. From the top of my head, I might call them rate, tatsächliche_max_rate, freigrenze (not married to any of those)
  2. We'll call an internal function that translates these parameters to the parameters for piecewise polynomial we had before. Machinery similar to functions that vary by year.

This way, you only need to look at the law to implement parameters for a new year, everything else is handled behind the scenes.

Note: The implementation does not need to be super-pretty now, I am just thinking hard about how to best unify the DAG to include functions like this, will be working hard to have that in during the first quarter of 2023, so don't worry too much about that part.

@hmgaudecker
Copy link
Collaborator

Oh, and in c83f860 I made those updates. Note that the structure in 1991 was much simpler, the current stuff only started appearing in 1995. Rest would have to be adjusted accordingly and we need a function translating that to the previously-defined parameters for piecewise_polynomial

@hmgaudecker
Copy link
Collaborator

Let's tackle this once we have implemented GEP 6 #471 or similar.

@hmgaudecker hmgaudecker deleted the renaming_piecewise_parameters branch November 30, 2023 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants