Skip to content

Conversation

MImmesberger
Copy link
Collaborator

@MImmesberger MImmesberger commented Jul 9, 2025

What problem do you want to solve?

Closes #704

This PR attempts to remove the kind input variable. This is not a quick and innocent change because kind tells GETTSIM much about the role of group members when it comes to transfer eligibility.

I chose the following tricks to get rid of kind:

Unterhalt
Innocent changes.

Elterngeld / Erziehungsgeld
I didn't want to use the Familiengemeinschaft concept too much because it is not part of the Elterngeldgesetz. I added ist_leistungsbegründendes_kind which is True for children that may give rise to an Elterngeld/Erziehungsgeld claim.

I also added this concept to the Kindergeld, makes things much clearer IMO.

Alternative: As below, analyse the fg structure and look for children.

ALG2
Use ist_kind_in_bedarfsgemeinschaft / ist_kind_in_familiengemeinschaft in order to tell which data raw refers to a child in the SGB II sense.

Note that children who live in their own BG are now considered to be "adults" from the POV of GETTSIM's SGB II rules. See #1009. This might be correct or not.
Before, users could specify this themselves via the kind input. But I doubt anyone did that and we didn't support it systematically, so I wouldn't worry about this too much.

Wohngeld

Innocent changes I believe. I removed a wrong if statement in abzugsanteil_vom_einkommen_für_steuern_sozialversicherung and an unnecessary check in freibetrag_m_bis_2015.

Kinderzuschlag

I replaced the erwachsen conditions with a condition derived from parent-child links (hat_kind_in_gleicher_bedarfsgemeinschaft).

Again, treatment of children might be wrong here as children who live in their own BG are considered to be adults by GETTSIM.


In general, we are very bad when it comes to children who claim transfers for themselves (KiZ, ALG2, Wohngeld). But this is a general problem of GETTSIM; this PR highlights it but doesn't make it worse. See issue #1009 and related ones (#750, ...)

@hmgaudecker
Copy link
Collaborator

Thanks for the great analysis!

As discussed in #778/#779, let's get rid of bg_id and wthh_id as policy_functions and turn them into policy_inputs. Feel free to use this PR. Then some of the above should not be much of an issue.

If anything, add data consistency checks, but I'd be fine adding that to the list at #767 / #773.

@MImmesberger
Copy link
Collaborator Author

Updated the description!

@MImmesberger MImmesberger requested a review from hmgaudecker July 11, 2025 17:29
Copy link
Collaborator

@hmgaudecker hmgaudecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks! Just a few simple things left, nothing conceptual!

I changed the order of all files I saw so that things that are needed at other locations in the file come first (seems like you added many of the new functions at the bottom of files, which made them hard to read for me). Did not do that systematically, so maybe double-check when looking at it again.

@MImmesberger MImmesberger linked an issue Jul 12, 2025 that may be closed by this pull request
@MImmesberger MImmesberger merged commit 0f870c0 into collect-components-of-namespaces Jul 12, 2025
16 of 17 checks passed
@MImmesberger MImmesberger deleted the remove-kind-input-var branch July 12, 2025 11:29
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.

ENH: Get rid of input variable kind

2 participants