diff --git a/AGENTS.md b/AGENTS.md index 466aa98bb6..d7de92190f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -189,7 +189,7 @@ def höchstbetrag_m(...) -> float: ... - `_hh` (Haushalt - household) - `_fg` (Familiengemeinschaft) - `_bg` (Bedarfsgemeinschaft) -- `_eg` (Einstandsgemeinschaft) +- `_eg` (Einsatzgemeinschaft) - `_ehe` (Ehegemeinschaft) Example: `arbeitslosengeld_2__betrag_m_bg` = monthly ALG2 amount at Bedarfsgemeinschaft diff --git a/CHANGES.md b/CHANGES.md index 5b38088e31..08e671e625 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,8 @@ All releases are available on [Anaconda.org](https://anaconda.org/conda-forge/ge ## Unreleased +- {gh}`1159` Add Einsatzgemeinschaft (SGB XII); remove Einstandsgemeinschaft. + ({ghuser}`MImmesberger`) - {gh}`1154` Fix Freibetrag for pension income from all pillars for Grundsicherung im Alter. ({ghuser}`MImmesberger`) - {gh}`1155` Fix Vermögensfreibetrag for Grundsicherung im Alter. diff --git a/docs/geps/gep-01.md b/docs/geps/gep-01.md index d9d616518d..ce65773c47 100644 --- a/docs/geps/gep-01.md +++ b/docs/geps/gep-01.md @@ -101,16 +101,16 @@ GETTSIM knows about the following units: unit is based on the priority check via `vorrangprüfungen__wohngeld_vorrang_vor_arbeitslosengeld_2_bg` and `vorrangprüfungen__wohngeld_und_kinderzuschlag_vorrang_vor_arbeitslosengeld_2_bg`. -- `arbeitslosengeld_2__fg_id`: Familiengemeinschaft. Maximum of two generations, the - relevant unit for Bürgergeld / Arbeitslosengeld 2. Another way to think about this is - the potential Bedarfsgemeinschaft before making checks for whether children have - enough income fend for themselves. Subset of `hh`. -- `arbeitslosengeld_2__bg_id`: Bedarfsgemeinschaft, i.e., Familiengemeinschaft excluding - children who have enough income to fend for themselves (they will form separate - `bg`s). Subset of `arbeitslosengeld_2__fg_id`. -- `arbeitslosengeld_2__eg_id`: Einstandsgemeinschaft, a couple whose members are deemed - to be responsible for each other. This includes couples that live together and may or - may not be married or in a civil union. +- `arbeitslosengeld_2__fg_id` and `bürgergeld__fg_id`: Familiengemeinschaft. Maximum of + two generations, the relevant unit for Bürgergeld / Arbeitslosengeld 2. Another way to + think about this is the potential Bedarfsgemeinschaft before making checks for whether + children have enough income fend for themselves. Subset of `hh`. +- `arbeitslosengeld_2__bg_id` and `bürgergeld__bg_id`: Bedarfsgemeinschaft, i.e., + Familiengemeinschaft excluding children who have enough income to fend for themselves + (they will form separate `bg`s). Subset of `arbeitslosengeld_2__fg_id` / + `bürgergeld__fg_id`. +- `grundsicherung__eg_id`: Einsatzgemeinschaft according to § 27 Abs. 2 SGB XII. Maximum + of two generations, the relevant unit for Grundsicherung im Alter / Sozialhilfe. - `familie__ehe_id`: Ehegemeinschaft, i.e. couples that are married or in a civil union. - `einkommensteuer__sn_id`: Steuernummer (same for spouses filing taxes jointly, not the same as the Germany-wide Steuer-ID) diff --git a/docs/tt_explanations/hh_concepts.md b/docs/tt_explanations/hh_concepts.md index 9df5d7f147..75414a8c5c 100644 --- a/docs/tt_explanations/hh_concepts.md +++ b/docs/tt_explanations/hh_concepts.md @@ -24,7 +24,7 @@ The units are: | Bedarfsgemeinschaft | arbeitslosengeld_2\_\_bg_id | Familiengemeinschaft except for children who have enough income to fend for themselves. Relevant unit for Bürgergeld / Arbeitslosengeld 2. | yes | | Steuernummer | einkommensteuer\_\_sn_id | Spouses filing taxes jointly or individuals. | yes | | Ehepartner | familie\_\_ehe_id | Couples that are either married or in a civil union. | yes | -| Einstandsgemeinschaft | arbeitslosengeld_2\_\_eg_id | A couple whose members are deemed to be responsible for each other. | yes | +| Einsatzgemeinschaft | grundsicherung\_\_eg_id | Einsatzgemeinschaft according to § 27 Abs. 2 SGB XII. Maximum of two generations, the relevant base unit for Grundsicherung im Alter / Sozialhilfe. | yes | Note that GETTSIM handles only simple cases (`hh_id` = `fg_id` = `bg_id` = `wthh_id`) out of the box. If you need to handle more complex cases, you will need to pass all of @@ -167,7 +167,8 @@ the [dedicated repository](https://github.com/ttsim-dev/gettsim-crazy-grouping-r #### Description - Bedarfsgemeinschaft comprised of: - - Einstandsgemeinschaft (SGB II - max 2 adults, marriage-like relationships) + - A single or a couple (Einstandspartner) whose members are deemed to be responsible + for each other - Children under 18/25 whose income does not exceed their own needs. - The "Kinderwohngeld" allows children to leave the Bedarfsgemeinschaft if Wohngeld (and other sourced of income) is sufficient to cover their needs. Not implemented yet. @@ -192,7 +193,7 @@ the [dedicated repository](https://github.com/ttsim-dev/gettsim-crazy-grouping-r Government expenditures: 1.5 Mrd € -- Entitled to benefits: Einstandsgemeinschaft (SGB XII) - §27 SGB XII +- Entitled to benefits: Einsatzgemeinschaft (SGB XII) - §27 SGB XII - max 2 adults, marriage-like relationships - Their children under 18 living in the same household whose income does not exceed their own needs @@ -214,8 +215,7 @@ Regarding the household definition: #### Aggregation unit -- Not implemented yet. The current `arbeitslosengeld_2__eg_id`/`bürgergeld__eg_id` is - not sufficient as it doesn't include children (it follows the SGB II definition). +- `grundsicherung__eg_id` (Einsatzgemeinschaft) #### Pointers @@ -230,7 +230,7 @@ Regarding the household definition: Government expenditures: 7 Mrd € -- Entitled to benefits: Einstandsgemeinschaft (SGB XII) - §27 SGB XII +- Entitled to benefits: Einsatzgemeinschaft (SGB XII) - §27 SGB XII - max 2 adults, marriage-like relationships - Their children under 18 living in the same household whose income does not exceed their own needs @@ -240,10 +240,7 @@ Government expenditures: 7 Mrd € #### Aggregation unit -- Currently: `arbeitslosengeld_2__eg_id` until 2022; `bürgergeld__eg_id` since 2023 - (endogenous) -- The current implementation of `arbeitslosengeld_2__eg_id`/`bürgergeld__eg_id` is not - sufficient as it doesn't include children (it follows the SGB II definition). +- `grundsicherung__eg_id` (Einsatzgemeinschaft, endogenous) #### Pointers @@ -327,24 +324,6 @@ Government expenditures: 4 Mrd € - Does not happen automatically, but upon request by the parents - Not implemented yet. -## Limitations - -- Within a Wohngeldhaushalt, no distinction can be made between persons without - Einstandsverpflichtung according to SGB II or SGB XII and those with - Einstandsverpflichtung - -- Can only show the two extreme cases - - 1. all non-vertical or partner relationships not a candidate for Haushaltsgemeinschaft - according to SGB II / SGB XII - 1. all non-vertical or partner relationships are candidates for Haushaltsgemeinschaft - according to SGB II / SGB XII - - Typically, 1. will be the solution (hurdles for joint economic activity are high). - -- An alternative would be another ID variable that specifies Einstandsgemeinschaft - according to SGB II and SGB XII. - ### Parts of the data not available - Adult children exist, but not in the dataset diff --git a/src/gettsim/germany/familie/familie.py b/src/gettsim/germany/familie/familie.py index 2eb4943fd2..a0351def3a 100644 --- a/src/gettsim/germany/familie/familie.py +++ b/src/gettsim/germany/familie/familie.py @@ -236,43 +236,50 @@ def alleinerziehend_sn(familie__alleinerziehend: bool, sn_id: int) -> bool: pass -@policy_function() -def ist_kind_in_einstandsgemeinschaft(alter: int) -> bool: - """Determines whether the given person is a child in a Einstandsgemeinschaft. - - The 'child' definition follows §27 SGB XII. - """ - # TODO(@MImmesberger): This assumes that parents are part of the minor's (SGB XII) - # Einstandsgemeinschaft. This is not necessarily true. Rewrite once we refactor SGB - # XII. - # https://github.com/ttsim-dev/gettsim/issues/738 - return alter <= 17 +@policy_function(start_date="2005-01-01", vectorization_strategy="not_required") +def ist_kind_in_einsatzgemeinschaft( + p_id_elternteil_1: IntColumn, + p_id_elternteil_2: IntColumn, + p_id: IntColumn, + eg_id: IntColumn, + xnp: ModuleType, +) -> BoolColumn: + """Child in an Einsatzgemeinschaft (§ 27 Abs. 2 SGB XII).""" + eg_id_elternteil_1 = join( + foreign_key=p_id_elternteil_1, + primary_key=p_id, + target=eg_id, + value_if_foreign_key_is_missing=-1, + xnp=xnp, + ) + eg_id_elternteil_2 = join( + foreign_key=p_id_elternteil_2, + primary_key=p_id, + target=eg_id, + value_if_foreign_key_is_missing=-1, + xnp=xnp, + ) + in_gleicher_eg_wie_elternteil_1 = eg_id_elternteil_1 == eg_id + in_gleicher_eg_wie_elternteil_2 = eg_id_elternteil_2 == eg_id + return in_gleicher_eg_wie_elternteil_1 | in_gleicher_eg_wie_elternteil_2 -@policy_function() -def ist_erwachsener_in_einstandsgemeinschaft( - ist_kind_in_einstandsgemeinschaft: bool, +@policy_function(start_date="2005-01-01") +def ist_erwachsener_in_einsatzgemeinschaft( + ist_kind_in_einsatzgemeinschaft: bool, ) -> bool: - """ - Determines whether the given person is an adult in a Einstandsgemeinschaft. - - The 'adult' definition follows §27 SGB XII. - """ - # TODO(@MImmesberger): This assumes that parents are part of the minor's - # Einstandsgemeinschaft. This is not necessarily true. Rewrite once we refactor SGB - # XII. - # https://github.com/ttsim-dev/gettsim/issues/738 - return not ist_kind_in_einstandsgemeinschaft + """Adult in an Einsatzgemeinschaft (§ 27 Abs. 2 SGB XII).""" + return not ist_kind_in_einsatzgemeinschaft @agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) -def anzahl_kinder_eg(ist_kind_in_einstandsgemeinschaft: bool, eg_id: int) -> int: +def anzahl_kinder_eg(ist_kind_in_einsatzgemeinschaft: bool, eg_id: int) -> int: pass @agg_by_group_function(start_date="2005-01-01", agg_type=AggType.SUM) def anzahl_erwachsene_eg( - ist_erwachsener_in_einstandsgemeinschaft: bool, eg_id: int + ist_erwachsener_in_einsatzgemeinschaft: bool, eg_id: int ) -> int: pass diff --git a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py index 97610d57af..f172ac492f 100644 --- a/src/gettsim/germany/grundsicherung/im_alter/im_alter.py +++ b/src/gettsim/germany/grundsicherung/im_alter/im_alter.py @@ -26,7 +26,7 @@ def betrag_m_eg_bis_2022( familie__anzahl_kinder_eg: int, familie__anzahl_personen_eg: int, ) -> float: - """Calculate Grundsicherung im Alter on household level. + """Grundsicherung im Alter. # ToDo: There is no check for Wohngeld included as Wohngeld is # ToDo: currently not implemented for retirees. @@ -82,7 +82,7 @@ def betrag_m_eg_ab_2023( familie__anzahl_kinder_eg: int, familie__anzahl_personen_eg: int, ) -> float: - """Calculate Grundsicherung im Alter on household level. + """Grundsicherung im Alter. # ToDo: There is no check for Wohngeld included as Wohngeld is # ToDo: currently not implemented for retirees. @@ -131,7 +131,7 @@ def mehrbedarf_schwerbehinderung_g_m( mehrbedarf_bei_schwerbehinderungsgrad_g: float, grundsicherung__regelbedarfsstufen: Regelbedarfsstufen, ) -> float: - """Calculate additional allowance for individuals with disabled person's pass G.""" + """Additional allowance for individuals with disabled person's pass G.""" mehrbedarf_single = ( grundsicherung__regelbedarfsstufen.rbs_1 ) * mehrbedarf_bei_schwerbehinderungsgrad_g @@ -151,14 +151,12 @@ def mehrbedarf_schwerbehinderung_g_m( @policy_function(start_date="2005-01-01") def vermögensfreibetrag_eg( - familie__anzahl_kinder_fg: int, - familie__anzahl_erwachsene_fg: int, + familie__anzahl_kinder_eg: int, + familie__anzahl_erwachsene_eg: int, parameter_vermögensfreibetrag: dict[str, float], ) -> float: - """Calculate wealth not considered for Grundsicherung im Alter on household - level. - """ + """Wealth not considered for Grundsicherung im Alter.""" return ( - parameter_vermögensfreibetrag["erwachsene"] * familie__anzahl_erwachsene_fg - + parameter_vermögensfreibetrag["kinder"] * familie__anzahl_kinder_fg + parameter_vermögensfreibetrag["erwachsene"] * familie__anzahl_erwachsene_eg + + parameter_vermögensfreibetrag["kinder"] * familie__anzahl_kinder_eg ) diff --git a/src/gettsim/germany/ids.py b/src/gettsim/germany/ids.py index 9522101855..b229936735 100644 --- a/src/gettsim/germany/ids.py +++ b/src/gettsim/germany/ids.py @@ -31,7 +31,7 @@ def ehe_id( xnp: ModuleType, ) -> IntColumn: """Couples that are either married or in a civil union.""" - n = xnp.max(p_id) + 1 + n = p_id.shape[0] p_id_ehepartner_or_own_p_id = xnp.where( familie__p_id_ehepartner < 0, p_id, @@ -112,17 +112,7 @@ def sgb_ii_fg_id_formula( backend: Literal["numpy", "jax"], ) -> IntColumn: """Formula to compute the FG ID for SGB II transfers""" - n = xnp.max(p_id) + 1 - - # Sort all arrays according to p_id to make the id equal location in array - sorting = xnp.argsort(p_id) - index_after_sort = xnp.argsort(xnp.arange(p_id.shape[0])[sorting]) - sorted_p_id = p_id[sorting] - sorted_hh_id = hh_id[sorting] - sorted_alter = alter[sorting] - sorted_p_id_elternteil_1 = p_id_elternteil_1[sorting] - sorted_p_id_elternteil_2 = p_id_elternteil_2[sorting] - sorted_p_id_einstandspartner = p_id_einstandspartner[sorting] + n = p_id.shape[0] # Necessary because JAX's `isin` uses keyword `method` instead of NumPy's `kind` # See https://github.com/ttsim-dev/ttsim/pull/41#issuecomment-3180607171 @@ -131,41 +121,39 @@ def sgb_ii_fg_id_formula( else: isin = xnp.isin - children = isin(sorted_p_id, sorted_p_id_elternteil_1) | isin( - sorted_p_id, sorted_p_id_elternteil_2 - ) + children = isin(p_id, p_id_elternteil_1) | isin(p_id, p_id_elternteil_2) # Assign the same fg_id to everybody who has an Einstandspartner, # otherwise create a new one from p_id out = xnp.where( - sorted_p_id_einstandspartner < 0, - sorted_p_id + sorted_p_id * n, - xnp.maximum(sorted_p_id, sorted_p_id_einstandspartner) - + xnp.minimum(sorted_p_id, sorted_p_id_einstandspartner) * n, + p_id_einstandspartner < 0, + p_id + p_id * n, + xnp.maximum(p_id, p_id_einstandspartner) + + xnp.minimum(p_id, p_id_einstandspartner) * n, ) out = _assign_parents_fg_id( fg_id=out, - p_id=sorted_p_id, - p_id_elternteil_loc=sorted_p_id_elternteil_1, - hh_id=sorted_hh_id, - alter=sorted_alter, + p_id=p_id, + p_id_elternteil_loc=p_id_elternteil_1, + hh_id=hh_id, + alter=alter, children=children, n=n, xnp=xnp, ) out = _assign_parents_fg_id( fg_id=out, - p_id=sorted_p_id, - p_id_elternteil_loc=sorted_p_id_elternteil_2, - hh_id=sorted_hh_id, - alter=sorted_alter, + p_id=p_id, + p_id_elternteil_loc=p_id_elternteil_2, + hh_id=hh_id, + alter=alter, children=children, n=n, xnp=xnp, ) - return out[index_after_sort] + return out def _assign_parents_fg_id( @@ -175,7 +163,7 @@ def _assign_parents_fg_id( hh_id: IntColumn, alter: IntColumn, children: IntColumn, - n: IntColumn, + n: int, xnp: ModuleType, ) -> IntColumn: """Return the fg_id of the child's parents.""" @@ -220,16 +208,27 @@ def bg_id( def eg_id_arbeitslosengeld_2( arbeitslosengeld_2__p_id_einstandspartner: IntColumn, p_id: IntColumn, + hh_id: IntColumn, + alter: IntColumn, + familie__p_id_elternteil_1: IntColumn, + familie__p_id_elternteil_2: IntColumn, xnp: ModuleType, + backend: Literal["numpy", "jax"], ) -> IntColumn: - """Einstandsgemeinschaft / Einstandspartner according to SGB II. + """Einsatzgemeinschaft according to § 27 Abs. 2 SGB XII. - A couple whose members are deemed to be responsible for each other. + Maximum of two generations, the relevant base unit for Grundsicherung im Alter / + Sozialhilfe, before excluding children who have enough income to fend for themselves. """ - return sgb_ii_eg_id_formula( + return _eg_id_formula( p_id_einstandspartner=arbeitslosengeld_2__p_id_einstandspartner, p_id=p_id, + hh_id=hh_id, + alter=alter, + p_id_elternteil_1=familie__p_id_elternteil_1, + p_id_elternteil_2=familie__p_id_elternteil_2, xnp=xnp, + backend=backend, ) @@ -237,38 +236,107 @@ def eg_id_arbeitslosengeld_2( def eg_id_bürgergeld( bürgergeld__p_id_einstandspartner: IntColumn, p_id: IntColumn, + hh_id: IntColumn, + alter: IntColumn, + familie__p_id_elternteil_1: IntColumn, + familie__p_id_elternteil_2: IntColumn, xnp: ModuleType, + backend: Literal["numpy", "jax"], ) -> IntColumn: - """Einstandsgemeinschaft / Einstandspartner according to SGB II. + """Einsatzgemeinschaft according to § 27 Abs. 2 SGB XII. - A couple whose members are deemed to be responsible for each other. + Maximum of two generations, the relevant base unit for Grundsicherung im Alter / + Sozialhilfe, before excluding children who have enough income to fend for themselves. """ - return sgb_ii_eg_id_formula( + return _eg_id_formula( p_id_einstandspartner=bürgergeld__p_id_einstandspartner, p_id=p_id, + hh_id=hh_id, + alter=alter, + p_id_elternteil_1=familie__p_id_elternteil_1, + p_id_elternteil_2=familie__p_id_elternteil_2, xnp=xnp, + backend=backend, ) -def sgb_ii_eg_id_formula( +def _eg_id_formula( p_id_einstandspartner: IntColumn, p_id: IntColumn, + hh_id: IntColumn, + alter: IntColumn, + p_id_elternteil_1: IntColumn, + p_id_elternteil_2: IntColumn, xnp: ModuleType, + backend: Literal["numpy", "jax"], ) -> IntColumn: - """Einstandsgemeinschaft / Einstandspartner according to SGB II. + """Formula to compute the EG ID.""" + n = p_id.shape[0] - A couple whose members are deemed to be responsible for each other. - """ - n = xnp.max(p_id) + 1 - p_id_einstandspartner__or_own_p_id = xnp.where( + # Necessary because JAX's `isin` uses keyword `method` instead of NumPy's `kind` + # See https://github.com/ttsim-dev/ttsim/pull/41#issuecomment-3180607171 + if backend == "jax": + isin = functools.partial(xnp.isin, method="sort") + else: + isin = xnp.isin + + children = isin(p_id, p_id_elternteil_1) | isin(p_id, p_id_elternteil_2) + + # Assign the same eg_id to everybody who has an Einstandspartner, + # otherwise create a new one from p_id + out = xnp.where( p_id_einstandspartner < 0, - p_id, - p_id_einstandspartner, + p_id + p_id * n, + xnp.maximum(p_id, p_id_einstandspartner) + + xnp.minimum(p_id, p_id_einstandspartner) * n, ) - return ( - xnp.maximum(p_id, p_id_einstandspartner__or_own_p_id) - + xnp.minimum(p_id, p_id_einstandspartner__or_own_p_id) * n + out = _assign_parents_eg_id( + eg_id=out, + p_id=p_id, + p_id_elternteil_loc=p_id_elternteil_1, + hh_id=hh_id, + alter=alter, + children=children, + n=n, + xnp=xnp, + ) + out = _assign_parents_eg_id( + eg_id=out, + p_id=p_id, + p_id_elternteil_loc=p_id_elternteil_2, + hh_id=hh_id, + alter=alter, + children=children, + n=n, + xnp=xnp, + ) + + return out + + +def _assign_parents_eg_id( + eg_id: IntColumn, + p_id: IntColumn, + p_id_elternteil_loc: IntColumn, + hh_id: IntColumn, + alter: IntColumn, + children: IntColumn, + n: int, + xnp: ModuleType, +) -> IntColumn: + """Return the eg_id of the child's parents.""" + # TODO(@MImmesberger): Remove hard-coded number + # https://github.com/ttsim-dev/gettsim/issues/668 + + return xnp.where( + (p_id_elternteil_loc >= 0) + * (eg_id == p_id + p_id * n) + * (hh_id == hh_id[p_id_elternteil_loc]) + * (alter < 18) # noqa: PLR2004 + * (1 - children), + eg_id[p_id_elternteil_loc], + eg_id, ) @@ -303,7 +371,7 @@ def sn_id( xnp: ModuleType, ) -> IntColumn: """Steuernummer. Spouses filing taxes jointly or individuals.""" - n = xnp.max(p_id) + 1 + n = p_id.shape[0] p_id_ehepartner_or_own_p_id = xnp.where( (familie__p_id_ehepartner >= 0) * (einkommensteuer__gemeinsam_veranlagt), diff --git a/src/gettsim/tests_germany/policy_cases/arbeitslosengeld_2/2005-01-01/fg_id_not_sensitive_to_order.yaml b/src/gettsim/tests_germany/policy_cases/arbeitslosengeld_2/2005-01-01/fg_id_not_sensitive_to_order.yaml index f6f4e755ca..be4f5a9cf0 100644 --- a/src/gettsim/tests_germany/policy_cases/arbeitslosengeld_2/2005-01-01/fg_id_not_sensitive_to_order.yaml +++ b/src/gettsim/tests_germany/policy_cases/arbeitslosengeld_2/2005-01-01/fg_id_not_sensitive_to_order.yaml @@ -58,13 +58,6 @@ outputs: - 0 - 0 - 0 - eg_id: - - 0 - - 1 - - 2 - - 3 - - 4 - - 1 fg_id: - 0 - 0 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/alleinerziehend_anderer_elternteil_in_anderem_haushalt.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/alleinerziehend_anderer_elternteil_in_anderem_haushalt.yaml index ee4c392b06..5a9bf37969 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/alleinerziehend_anderer_elternteil_in_anderem_haushalt.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/alleinerziehend_anderer_elternteil_in_anderem_haushalt.yaml @@ -61,9 +61,9 @@ outputs: - 0 - 1 eg_id: + - 0 - 0 - 1 - - 2 ehe_id: - 0 - 1 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/alleinerziehend_anderer_elternteil_unbekannt.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/alleinerziehend_anderer_elternteil_unbekannt.yaml index 8eb07a6dcc..ce09d0f5e6 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/alleinerziehend_anderer_elternteil_unbekannt.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/alleinerziehend_anderer_elternteil_unbekannt.yaml @@ -48,7 +48,7 @@ outputs: - 0 eg_id: - 0 - - 1 + - 0 ehe_id: - 0 - 1 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_unverheiratet_2_kinder.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_unverheiratet_2_kinder.yaml index 57cc888aac..6835da3fa0 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_unverheiratet_2_kinder.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_unverheiratet_2_kinder.yaml @@ -73,8 +73,8 @@ outputs: eg_id: - 0 - 0 - - 1 - - 2 + - 0 + - 0 ehe_id: - 0 - 1 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_junges_1_erwachsenes_kind.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_junges_1_erwachsenes_kind.yaml index 83e7d2c3f1..48fe054d08 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_junges_1_erwachsenes_kind.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_junges_1_erwachsenes_kind.yaml @@ -74,7 +74,7 @@ outputs: - 0 - 0 - 1 - - 2 + - 0 ehe_id: - 0 - 0 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_17_1_kind_18.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_17_1_kind_18.yaml new file mode 100644 index 0000000000..3a721c26e6 --- /dev/null +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_17_1_kind_18.yaml @@ -0,0 +1,95 @@ +--- +info: + note: |- + Married couple with two children: one aged 17 (in both fg_id and eg_id with parents) + and one aged 18 (in fg_id but NOT in eg_id with parents). Tests the eg_id age + boundary at alter < 18 vs fg_id boundary at alter < 25. + precision_atol: 0.01 + source: Self-created test case +inputs: + assumed: {} + provided: + alter: + - 45 + - 48 + - 17 + - 18 + bürgergeld: + p_id_einstandspartner: + - 1 + - 0 + - -1 + - -1 + einkommensteuer: + gemeinsam_veranlagt: + - true + - true + - false + - false + familie: + p_id_ehepartner: + - 1 + - 0 + - -1 + - -1 + p_id_elternteil_1: + - -1 + - -1 + - 0 + - 0 + p_id_elternteil_2: + - -1 + - -1 + - 1 + - 1 + geburtsjahr: + - 1978 + - 1975 + - 2005 + - 2004 + geburtsmonat: + - 7 + - 7 + - 10 + - 3 + geburtstag: + - 14 + - 14 + - 1 + - 1 + hh_id: + - 0 + - 0 + - 0 + - 0 + p_id: + - 0 + - 1 + - 2 + - 3 +outputs: + bg_id: + - 0 + - 0 + - 0 + - 0 + eg_id: + - 0 + - 0 + - 0 + - 1 + ehe_id: + - 0 + - 0 + - 1 + - 2 + fg_id: + - 0 + - 0 + - 0 + - 0 + sn_id: + - 0 + - 0 + - 1 + - 2 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_anderer_verwandter.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_anderer_verwandter.yaml index 6cd8bea879..d01ec0711b 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_anderer_verwandter.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_anderer_verwandter.yaml @@ -71,10 +71,10 @@ outputs: - 0 - 1 eg_id: + - 0 - 0 - 0 - 1 - - 2 ehe_id: - 0 - 0 diff --git "a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_gro\303\237elternteil.yaml" "b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_gro\303\237elternteil.yaml" index ad3787a7ec..c03e5a001b 100644 --- "a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_gro\303\237elternteil.yaml" +++ "b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_gro\303\237elternteil.yaml" @@ -71,10 +71,10 @@ outputs: - 0 - 1 eg_id: + - 0 - 0 - 0 - 1 - - 2 ehe_id: - 0 - 0 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_mit_eigenem_kind.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_mit_eigenem_kind.yaml index 3a9adb3228..bba024f31f 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_mit_eigenem_kind.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_1_kind_mit_eigenem_kind.yaml @@ -85,11 +85,11 @@ outputs: - 1 - 1 eg_id: + - 0 - 0 - 0 - 1 - - 2 - - 2 + - 1 ehe_id: - 0 - 1 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_2_kinder.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_2_kinder.yaml index 8ffc96f192..8478f49f02 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_2_kinder.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_2_kinder.yaml @@ -73,8 +73,8 @@ outputs: eg_id: - 0 - 0 - - 1 - - 2 + - 0 + - 0 ehe_id: - 0 - 0 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_getrennt_veranlagt_2_kinder.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_getrennt_veranlagt_2_kinder.yaml index d0f530250c..2fea5b74af 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_getrennt_veranlagt_2_kinder.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/eltern_verheiratet_getrennt_veranlagt_2_kinder.yaml @@ -73,8 +73,8 @@ outputs: eg_id: - 0 - 0 - - 1 - - 2 + - 0 + - 0 ehe_id: - 0 - 0 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/mehrere_haushalte_durchmischt.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/mehrere_haushalte_durchmischt.yaml index e3c0d37c2f..7bb9700ae9 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/mehrere_haushalte_durchmischt.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/mehrere_haushalte_durchmischt.yaml @@ -97,10 +97,10 @@ outputs: eg_id: - 0 - 1 - - 4 + - 0 - 2 - - 3 - - 5 + - 2 + - 1 ehe_id: - 0 - 1 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_unverheirateter_partner_1_kind_im_haushalt_anderer_elternteil_in_anderem_haushalt.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_unverheirateter_partner_1_kind_im_haushalt_anderer_elternteil_in_anderem_haushalt.yaml index 47241559ef..ab41b1f7fd 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_unverheirateter_partner_1_kind_im_haushalt_anderer_elternteil_in_anderem_haushalt.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_unverheirateter_partner_1_kind_im_haushalt_anderer_elternteil_in_anderem_haushalt.yaml @@ -73,10 +73,10 @@ outputs: - 0 - 1 eg_id: + - 0 - 0 - 0 - 1 - - 2 ehe_id: - 0 - 1 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_unverheirateter_partner_1_kind_im_haushalt_anderer_elternteil_unbekannt.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_unverheirateter_partner_1_kind_im_haushalt_anderer_elternteil_unbekannt.yaml index 18653a03dd..a6fafa4d9b 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_unverheirateter_partner_1_kind_im_haushalt_anderer_elternteil_unbekannt.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_unverheirateter_partner_1_kind_im_haushalt_anderer_elternteil_unbekannt.yaml @@ -61,7 +61,7 @@ outputs: eg_id: - 0 - 0 - - 1 + - 0 ehe_id: - 0 - 1 diff --git a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_verheirateter_partner_1_kind_im_haushalt_anderer_elternteil_in_anderem_haushalt.yaml b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_verheirateter_partner_1_kind_im_haushalt_anderer_elternteil_in_anderem_haushalt.yaml index 1a1dd9de7f..882292c4e9 100644 --- a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_verheirateter_partner_1_kind_im_haushalt_anderer_elternteil_in_anderem_haushalt.yaml +++ b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/neuer_verheirateter_partner_1_kind_im_haushalt_anderer_elternteil_in_anderem_haushalt.yaml @@ -73,10 +73,10 @@ outputs: - 0 - 1 eg_id: + - 0 - 0 - 0 - 1 - - 2 ehe_id: - 0 - 0 diff --git "a/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/skip_eltern_kinder_widerspr\303\274chliche_einstandspartner.yaml" "b/src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/skip_eltern_kinder_widerspr\303\274chliche_lebenspartner.yaml" similarity index 100% rename from "src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/skip_eltern_kinder_widerspr\303\274chliche_einstandspartner.yaml" rename to "src/gettsim/tests_germany/policy_cases/groupings/2023-01-01/skip_eltern_kinder_widerspr\303\274chliche_lebenspartner.yaml" diff --git a/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2021-07-01/hh_id_5.yaml b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2021-07-01/hh_id_5.yaml index 3099a3b36e..d65da5c721 100644 --- a/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2021-07-01/hh_id_5.yaml +++ b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2021-07-01/hh_id_5.yaml @@ -50,8 +50,6 @@ inputs: - false p_id_ehepartner: - -1 - p_id_einstandspartner: - - -1 p_id_elternteil_1: - -1 p_id_elternteil_2: diff --git a/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2022-07-01/hh_id_25.yaml b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2022-07-01/hh_id_25.yaml index 87e0146ac2..8d4af33203 100644 --- a/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2022-07-01/hh_id_25.yaml +++ b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2022-07-01/hh_id_25.yaml @@ -157,4 +157,4 @@ outputs: im_alter: betrag_m_eg: - 852.71 - - 0.0 + - 852.71 diff --git a/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/erwachsenes_kind_eigene_eg.yaml b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/erwachsenes_kind_eigene_eg.yaml new file mode 100644 index 0000000000..a732b12b8f --- /dev/null +++ b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/erwachsenes_kind_eigene_eg.yaml @@ -0,0 +1,166 @@ +--- +info: + note: |- + Retired parent (age 70) with adult child (age 22) on Erwerbsminderungsrente. + Child is in the same fg_id (age < 25) but NOT in the same eg_id (age >= 18). + Each person forms their own Einsatzgemeinschaft, so betrag_m_eg differs per + person. This tests the eg_id age boundary for Grundsicherung im Alter and the + correct use of _eg (not _fg) aggregation for vermögensfreibetrag_eg. + precision_atol: 0.01 + source: Self-created test case +inputs: + assumed: {} + provided: + alter: + - 70 + - 22 + bürgergeld: + bezug_im_vorjahr: + - false + - false + p_id_einstandspartner: + - -1 + - -1 + einkommensteuer: + betrag_y_sn: + - 0.0 + - 0.0 + einkünfte: + aus_selbstständiger_arbeit: + betrag_m: + - 0.0 + - 0.0 + aus_vermietung_und_verpachtung: + betrag_m: + - 0.0 + - 0.0 + sonstige: + alle_weiteren_m: + - 0.0 + - 0.0 + gemeinsam_veranlagt: + - false + - false + einnahmen: + bruttolohn_m: + - 0.0 + - 0.0 + kapitalerträge_m: + - 0.0 + - 0.0 + renten: + betriebliche_altersvorsorge_m: + - 0.0 + - 0.0 + geförderte_private_vorsorge_m: + - 0.0 + - 0.0 + sonstige_private_vorsorge_m: + - 0.0 + - 0.0 + aus_berufsständischen_versicherungen_m: + - 0.0 + - 0.0 + elterngeld: + anrechenbarer_betrag_m: + - 0.0 + - 0.0 + betrag_m: + - 0.0 + - 0.0 + familie: + alleinerziehend: + - true + - false + p_id_ehepartner: + - -1 + - -1 + p_id_elternteil_1: + - -1 + - 0 + p_id_elternteil_2: + - -1 + - -1 + geburtsjahr: + - 1953 + - 2001 + geburtsmonat: + - 1 + - 1 + geburtstag: + - 1 + - 1 + hh_id: + - 0 + - 0 + kindergeld: + betrag_m_eg: + - 0.0 + - 0.0 + p_id_empfänger: + - -1 + - 0 + p_id: + - 0 + - 1 + schwerbehindert_grad_g: + - false + - false + solidaritätszuschlag: + betrag_y_sn: + - 0.0 + - 0.0 + sozialversicherung: + arbeitslosen: + betrag_m: + - 0.0 + - 0.0 + beiträge_versicherter_m: + - 0.0 + - 0.0 + rente: + altersrente: + betrag_m: + - 300.0 + - 0.0 + bezieht_rente: + - true + - true + erwerbsminderung: + betrag_m: + - 0.0 + - 200.0 + grundrente: + grundrentenzeiten_monate: + - 500 + - 0 + unterhalt: + tatsächlich_erhaltener_betrag_m: + - 0.0 + - 0.0 + unterhaltsvorschuss: + betrag_m_eg: + - 0.0 + - 0.0 + vermögen_eg: + - 0.0 + - 0.0 + wohnen: + bewohnt_eigentum_hh: + - false + - false + bruttokaltmiete_m_hh: + - 350.0 + - 350.0 + heizkosten_m_hh: + - 60.0 + - 60.0 + wohnfläche_hh: + - 50.0 + - 50.0 +outputs: + grundsicherung: + im_alter: + betrag_m_eg: + - 1194.0 + - 1134.0 diff --git "a/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/freibetrag_zus\303\244tzliche_altersvorsorge_unter_100.yaml" "b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/freibetrag_zus\303\244tzliche_altersvorsorge_unter_100.yaml" new file mode 100644 index 0000000000..cad2a25803 --- /dev/null +++ "b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/freibetrag_zus\303\244tzliche_altersvorsorge_unter_100.yaml" @@ -0,0 +1,166 @@ +--- +info: + note: |- + Two single retirees in separate households. Person 0 receives 100 EUR/month in + supplementary pension (50 betriebliche + 50 Riester), which is fully covered by + the Freibetrag (§ 82 Abs. 4, 5 SGB XII: first 100 EUR are exempt). Person 1 has + no supplementary pension. Both have the same gesetzliche Rente, so the identical + betrag_m_eg demonstrates that the Freibetrag fully offsets the supplementary income. + precision_atol: 0.01 + source: Self-created test case +inputs: + assumed: {} + provided: + alter: + - 73 + - 73 + bürgergeld: + bezug_im_vorjahr: + - false + - false + p_id_einstandspartner: + - -1 + - -1 + einkommensteuer: + betrag_y_sn: + - 0.0 + - 0.0 + einkünfte: + aus_selbstständiger_arbeit: + betrag_m: + - 0.0 + - 0.0 + aus_vermietung_und_verpachtung: + betrag_m: + - 0.0 + - 0.0 + sonstige: + alle_weiteren_m: + - 0.0 + - 0.0 + gemeinsam_veranlagt: + - false + - false + einnahmen: + bruttolohn_m: + - 0.0 + - 0.0 + kapitalerträge_m: + - 0.0 + - 0.0 + renten: + betriebliche_altersvorsorge_m: + - 50.0 + - 0.0 + geförderte_private_vorsorge_m: + - 50.0 + - 0.0 + sonstige_private_vorsorge_m: + - 0.0 + - 0.0 + aus_berufsständischen_versicherungen_m: + - 0.0 + - 0.0 + elterngeld: + anrechenbarer_betrag_m: + - 0.0 + - 0.0 + betrag_m: + - 0.0 + - 0.0 + familie: + alleinerziehend: + - false + - false + p_id_ehepartner: + - -1 + - -1 + p_id_elternteil_1: + - -1 + - -1 + p_id_elternteil_2: + - -1 + - -1 + geburtsjahr: + - 1950 + - 1950 + geburtsmonat: + - 1 + - 1 + geburtstag: + - 1 + - 1 + hh_id: + - 0 + - 1 + kindergeld: + betrag_m_eg: + - 0.0 + - 0.0 + p_id_empfänger: + - -1 + - -1 + p_id: + - 0 + - 1 + schwerbehindert_grad_g: + - false + - false + solidaritätszuschlag: + betrag_y_sn: + - 0.0 + - 0.0 + sozialversicherung: + arbeitslosen: + betrag_m: + - 0.0 + - 0.0 + beiträge_versicherter_m: + - 0.0 + - 0.0 + rente: + altersrente: + betrag_m: + - 500.0 + - 500.0 + bezieht_rente: + - true + - true + erwerbsminderung: + betrag_m: + - 0.0 + - 0.0 + grundrente: + grundrentenzeiten_monate: + - 500 + - 500 + unterhalt: + tatsächlich_erhaltener_betrag_m: + - 0.0 + - 0.0 + unterhaltsvorschuss: + betrag_m_eg: + - 0.0 + - 0.0 + vermögen_eg: + - 0.0 + - 0.0 + wohnen: + bewohnt_eigentum_hh: + - false + - false + bruttokaltmiete_m_hh: + - 350.0 + - 350.0 + heizkosten_m_hh: + - 60.0 + - 60.0 + wohnfläche_hh: + - 45.0 + - 45.0 +outputs: + grundsicherung: + im_alter: + betrag_m_eg: + - 632.0 + - 632.0 diff --git "a/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/paar_freibetrag_zus\303\244tzliche_altersvorsorge.yaml" "b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/paar_freibetrag_zus\303\244tzliche_altersvorsorge.yaml" new file mode 100644 index 0000000000..72dd254ace --- /dev/null +++ "b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/paar_freibetrag_zus\303\244tzliche_altersvorsorge.yaml" @@ -0,0 +1,253 @@ +--- +info: + note: |- + Two retired couples in separate households. Couple A (persons 0, 1) receives + 100 EUR/month in supplementary pension (50 betriebliche + 50 Riester on person 0), + which is fully covered by the Freibetrag (§ 82 Abs. 4, 5 SGB XII: first 100 EUR + are exempt). Couple B (persons 2, 3) has no supplementary pension. Both couples + have the same gesetzliche Rente, so the identical betrag_m_eg demonstrates that + the Freibetrag fully offsets the supplementary income at the couple level. + precision_atol: 0.01 + source: Self-created test case +inputs: + assumed: {} + provided: + alter: + - 70 + - 67 + - 70 + - 67 + bürgergeld: + bezug_im_vorjahr: + - false + - false + - false + - false + p_id_einstandspartner: + - 1 + - 0 + - 3 + - 2 + einkommensteuer: + betrag_y_sn: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + einkünfte: + aus_selbstständiger_arbeit: + betrag_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + aus_vermietung_und_verpachtung: + betrag_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + sonstige: + alle_weiteren_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + gemeinsam_veranlagt: + - true + - true + - true + - true + einnahmen: + bruttolohn_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + kapitalerträge_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + renten: + betriebliche_altersvorsorge_m: + - 50.0 + - 0.0 + - 0.0 + - 0.0 + geförderte_private_vorsorge_m: + - 50.0 + - 0.0 + - 0.0 + - 0.0 + sonstige_private_vorsorge_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + aus_berufsständischen_versicherungen_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + elterngeld: + anrechenbarer_betrag_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + betrag_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + familie: + alleinerziehend: + - false + - false + - false + - false + p_id_ehepartner: + - 1 + - 0 + - 3 + - 2 + p_id_elternteil_1: + - -1 + - -1 + - -1 + - -1 + p_id_elternteil_2: + - -1 + - -1 + - -1 + - -1 + geburtsjahr: + - 1953 + - 1956 + - 1953 + - 1956 + geburtsmonat: + - 1 + - 1 + - 1 + - 1 + geburtstag: + - 1 + - 1 + - 1 + - 1 + hh_id: + - 0 + - 0 + - 1 + - 1 + kindergeld: + betrag_m_eg: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + p_id_empfänger: + - -1 + - -1 + - -1 + - -1 + p_id: + - 0 + - 1 + - 2 + - 3 + schwerbehindert_grad_g: + - false + - false + - false + - false + solidaritätszuschlag: + betrag_y_sn: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + sozialversicherung: + arbeitslosen: + betrag_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + beiträge_versicherter_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + rente: + altersrente: + betrag_m: + - 400.0 + - 500.0 + - 400.0 + - 500.0 + bezieht_rente: + - true + - true + - true + - true + erwerbsminderung: + betrag_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + grundrente: + grundrentenzeiten_monate: + - 500 + - 500 + - 500 + - 500 + unterhalt: + tatsächlich_erhaltener_betrag_m: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + unterhaltsvorschuss: + betrag_m_eg: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + vermögen_eg: + - 0.0 + - 0.0 + - 0.0 + - 0.0 + wohnen: + bewohnt_eigentum_hh: + - false + - false + - false + - false + bruttokaltmiete_m_hh: + - 400.0 + - 400.0 + - 400.0 + - 400.0 + heizkosten_m_hh: + - 80.0 + - 80.0 + - 80.0 + - 80.0 + wohnfläche_hh: + - 60.0 + - 60.0 + - 60.0 + - 60.0 +outputs: + grundsicherung: + im_alter: + betrag_m_eg: + - 892.0 + - 892.0 + - 892.0 + - 892.0 diff --git "a/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/paar_mit_kind_verm\303\266gen_unter_freibetrag.yaml" "b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/paar_mit_kind_verm\303\266gen_unter_freibetrag.yaml" new file mode 100644 index 0000000000..4d5596e077 --- /dev/null +++ "b/src/gettsim/tests_germany/policy_cases/grundsicherung/im_alter/2023-07-01/paar_mit_kind_verm\303\266gen_unter_freibetrag.yaml" @@ -0,0 +1,208 @@ +--- +info: + note: |- + Married retired couple with one child (age 10). Child is in the same eg_id as the + parents (age < 18). Tests vermögensfreibetrag_eg with 2023 parameters at the eg + level: 2 * 10,000 (adults) + 1 * 10,000 (child) = 30,000 EUR. + Wealth of 15,000 is below this threshold, so entitlement is not blocked. + precision_atol: 0.01 + source: Self-created test case +inputs: + assumed: {} + provided: + alter: + - 70 + - 67 + - 10 + bürgergeld: + bezug_im_vorjahr: + - false + - false + - false + p_id_einstandspartner: + - 1 + - 0 + - -1 + einkommensteuer: + betrag_y_sn: + - 0.0 + - 0.0 + - 0.0 + einkünfte: + aus_selbstständiger_arbeit: + betrag_m: + - 0.0 + - 0.0 + - 0.0 + aus_vermietung_und_verpachtung: + betrag_m: + - 0.0 + - 0.0 + - 0.0 + sonstige: + alle_weiteren_m: + - 0.0 + - 0.0 + - 0.0 + gemeinsam_veranlagt: + - true + - true + - false + einnahmen: + bruttolohn_m: + - 0.0 + - 0.0 + - 0.0 + kapitalerträge_m: + - 0.0 + - 0.0 + - 0.0 + renten: + betriebliche_altersvorsorge_m: + - 0.0 + - 0.0 + - 0.0 + geförderte_private_vorsorge_m: + - 0.0 + - 0.0 + - 0.0 + sonstige_private_vorsorge_m: + - 0.0 + - 0.0 + - 0.0 + aus_berufsständischen_versicherungen_m: + - 0.0 + - 0.0 + - 0.0 + elterngeld: + anrechenbarer_betrag_m: + - 0.0 + - 0.0 + - 0.0 + betrag_m: + - 0.0 + - 0.0 + - 0.0 + familie: + alleinerziehend: + - false + - false + - false + p_id_ehepartner: + - 1 + - 0 + - -1 + p_id_elternteil_1: + - -1 + - -1 + - 0 + p_id_elternteil_2: + - -1 + - -1 + - 1 + geburtsjahr: + - 1953 + - 1956 + - 2013 + geburtsmonat: + - 1 + - 1 + - 6 + geburtstag: + - 1 + - 1 + - 15 + hh_id: + - 0 + - 0 + - 0 + kindergeld: + betrag_m_eg: + - 0.0 + - 0.0 + - 0.0 + p_id_empfänger: + - -1 + - -1 + - 0 + p_id: + - 0 + - 1 + - 2 + schwerbehindert_grad_g: + - false + - false + - false + solidaritätszuschlag: + betrag_y_sn: + - 0.0 + - 0.0 + - 0.0 + sozialversicherung: + arbeitslosen: + betrag_m: + - 0.0 + - 0.0 + - 0.0 + beiträge_versicherter_m: + - 0.0 + - 0.0 + - 0.0 + rente: + altersrente: + betrag_m: + - 400.0 + - 500.0 + - 0.0 + bezieht_rente: + - true + - true + - false + erwerbsminderung: + betrag_m: + - 0.0 + - 0.0 + - 0.0 + grundrente: + grundrentenzeiten_monate: + - 500 + - 500 + - 0 + unterhalt: + tatsächlich_erhaltener_betrag_m: + - 0.0 + - 0.0 + - 0.0 + unterhaltsvorschuss: + betrag_m_eg: + - 0.0 + - 0.0 + - 0.0 + vermögen_eg: + - 15000.0 + - 15000.0 + - 15000.0 + wohnen: + bewohnt_eigentum_hh: + - false + - false + - false + bruttokaltmiete_m_hh: + - 500.0 + - 500.0 + - 500.0 + heizkosten_m_hh: + - 100.0 + - 100.0 + - 100.0 + wohnfläche_hh: + - 75.0 + - 75.0 + - 75.0 +outputs: + grundsicherung: + im_alter: + betrag_m_eg: + - 1380.0 + - 1380.0 + - 1380.0