iza-institute-of-labor-economics / gettsim

The GErman Taxes and Transfers SIMulator
https://gettsim.readthedocs.io/
GNU Affero General Public License v3.0
54 stars 32 forks source link

BUG: Time conversion fails for user inputs #699

Closed MImmesberger closed 6 months ago

MImmesberger commented 6 months ago

Bug description

When playing around with the tests for Elterngeld in #694, I noticed that eink_st_m_sn is not recognised as a the time converted counterpart of eink_st_y_sn. The same happens for soli_st_m_sn. Changing the income tax input in any of the Elterngeld tests reproduces the error.

Is it intentional that we don't convert data inputs or is that a bug?

On main the Elterngeld test takes care of this via

df["soli_st_y_tu"] = df["soli_st_m"].groupby(df["tu_id"]).transform("sum") * 12
hmgaudecker commented 6 months ago

Sounds like a case we did not think about to me! Can you check, please, @lars-reimann ?

lars-reimann commented 6 months ago

That happens because there are policy functions with the correct names (eink_st_y_sn and soli_st_y_sn). Those exact matches currently have higher priority than data columns for different time periods. Should that be changed?

hmgaudecker commented 6 months ago

Yes, I think that's a reasonable change. We would create endless confusion if we kept the current state and claimed something like "time period does not matter".