-
Notifications
You must be signed in to change notification settings - Fork 31
Update Elterngeld #756
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
Update Elterngeld #756
Changes from 56 commits
263c51b
35bebb0
c200412
0a2894e
b781e65
43af73b
efb8be5
2825933
d5eb80b
47a8a55
5e189fc
4e7c419
e08ad61
ad6122d
f5550a4
d469b81
9dea761
712436a
08c750a
de1e7cc
e8827b6
5aaca2a
9bbed96
0c1a608
dea89c7
5a1aaa8
df8819f
dd67b37
981db5c
8bf8a37
fe5565d
2bcadea
d94e183
c35e08b
7b52bfb
80f7fb2
8ab7c03
a80127f
9f6b837
f7ace99
e007f5d
15b9ee7
b8ee997
559bf07
933c9a9
6af4eba
6dea561
7655609
52e1179
3ac1da2
caf1a09
86915e6
242e84c
fa34d53
da4b008
f6e2129
02c01ce
d4e13c5
37b7df5
0892ca6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,211 @@ | ||
| { | ||
| "cells": [ | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "# How to calculate Elterngeld\n", | ||
| "\n", | ||
| "Elterngeld (parental leave benefit) is a financial support for parents in the first\n", | ||
| "months after the birth of a child. It replaces some share of the income before birth\n", | ||
| "(usually about 67% of net income). This net income is approximated using simplified\n", | ||
| "calculation rules. This document explains how to calculate Elterngeld\n", | ||
| "based on historical income data for a given household.\n", | ||
| "\n", | ||
| "In principle, one can compute Elterngeld in three steps:\n", | ||
| "1. Compute the average monthly gross income before birth in the data.\n", | ||
| "2. Call GETTSIM with the target `elterngeld_nettolohn_approximation_m`.\n", | ||
| "3. Call GETTSIM with the target `elterngeld_m` using the outcome of step 2 as the input\n", | ||
| " for `elterngeld_nettoeinkommen_vorjahr_m`.\n", | ||
| "\n", | ||
| "In the following, we will explain some more details." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "## Example\n", | ||
| "\n", | ||
| "In the following, we compute Elterngeld for a child that is born in July 2024. The\n", | ||
| "parent that receives Elterngeld had a monthly gross wage of 2000€ in the 12 months\n", | ||
| "before birth of the child.\n", | ||
| "\n", | ||
| "### Step 1: Compute the average monthly gross income before birth\n", | ||
| "\n", | ||
| "If income from dependent employment is the only source of income, the basis for the\n", | ||
| "Elterngeld calculation is the average monthly gross income in the 12 months before the\n", | ||
| "birth of a child. In our case, this would be July 2023 until June 2024. If other income\n", | ||
| "sources exist, the basis is the average monthly gross income in the calendar year before\n", | ||
| "the birth of the child, 2023 in our example. We will stick to the first case here\n", | ||
| "because:\n", | ||
| "\n", | ||
| "> **Note**: The Elterngeld implementation in GETTSIM does currently not consider income\n", | ||
| "> from self-employment or other sources. See\n", | ||
| "> [this](https://github.com/iza-institute-of-labor-economics/gettsim/issues/613) issue.\n", | ||
| "\n", | ||
| "So let's stick to the case where income from dependent employment is the only source of\n", | ||
| "income. You can compute this directly if you have monthly information on gross income\n", | ||
MImmesberger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "(e.g. IAB or DRV data). If you have only annual income data, you must choose an\n", | ||
| "approximation. In most cases, a good approximation is the income of the year before\n", | ||
| "birth.\n", | ||
| "\n", | ||
| "Here, we use made-up data using the `create_synthetic_data` function.\n" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "from gettsim import (\n", | ||
| " compute_taxes_and_transfers,\n", | ||
| " create_synthetic_data,\n", | ||
| " set_up_policy_environment,\n", | ||
| ")" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "params, functions = set_up_policy_environment(2024)\n", | ||
| "\n", | ||
| "data_before_birth = create_synthetic_data(\n", | ||
| " n_adults=2,\n", | ||
| " n_children=0,\n", | ||
| " specs_heterogeneous={\n", | ||
| " \"bruttolohn_m\": [[2000.0, 0.0]],\n", | ||
| " },\n", | ||
| ")" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "### Step 2: Approximate net wage before birth\n", | ||
| "\n", | ||
| "GETTSIM provides an easy way to compute the relevant net wage\n", | ||
| "`elterngeld_nettoeinkommen_vorjahr_m` based on step 1 using the target `elterngeld_nettolohn_approximation_m`." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "net_wage_approximation = compute_taxes_and_transfers(\n", | ||
| " data=data_before_birth,\n", | ||
| " functions=functions,\n", | ||
| " params=params,\n", | ||
| " targets=[\"elterngeld_nettolohn_approximation_m\"],\n", | ||
| ")\n", | ||
| "\n", | ||
| "net_wage_approximation" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "### Step 3: Compute Elterngeld\n", | ||
| "\n", | ||
| "Finally, we can compute Elterngeld using the target `elterngeld_m` and the net wage\n", | ||
| "information from step 2.\n", | ||
| "\n", | ||
| "The reason for not doing this in one GETTSIM call (together with step 2) is that \n", | ||
| "1. the correct policy date of the net wage calculation (step 2) is always January 1st of\n", | ||
|
||
| "the year the child was born (disregarding potential parameter changes throughout the\n", | ||
| "year). If there was no parameter change (or you're fine with neglecting this), you can\n", | ||
| "choose the same policy date as in step 2.\n", | ||
| "2. other state variables of the household (e.g. place of residence) might change\n", | ||
| "after birth of the child.\n", | ||
| "\n", | ||
| "First, we create the new data set after birth." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "# Create data\n", | ||
| "data_after_birth = create_synthetic_data(\n", | ||
| " n_adults=2,\n", | ||
| " n_children=1,\n", | ||
| " specs_heterogeneous={\n", | ||
| " \"bruttolohn_m\": [[0.0, 0.0, 0.0]],\n", | ||
| " \"geburtsjahr\": [[1980, 1980, 2024]],\n", | ||
| " \"geburtsmonat\": [[1, 1, 7]],\n", | ||
| " \"alter\": [[44, 44, 0]],\n", | ||
| " \"elterngeld_claimed\": [[True, False, False]], # First adult claims Elterngeld\n", | ||
| " },\n", | ||
| ")" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Then, we add `elterngeld_nettoeinkommen_vorjahr_m` to the data based on step 2." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "# Add net wage approximation\n", | ||
| "data_after_birth[\"elterngeld_nettoeinkommen_vorjahr_m\"] = net_wage_approximation[\n", | ||
| " \"elterngeld_nettolohn_approximation_m\"\n", | ||
| "]" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Then, we compute Elterngeld." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "# Compute Elterngeld\n", | ||
| "results = compute_taxes_and_transfers(\n", | ||
| " data=data_after_birth,\n", | ||
| " functions=functions,\n", | ||
| " params=params,\n", | ||
| " targets=[\"elterngeld_m\"],\n", | ||
| ")\n", | ||
| "\n", | ||
| "results" | ||
| ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "language_info": { | ||
| "codemirror_mode": { | ||
| "name": "ipython", | ||
| "version": 3 | ||
| }, | ||
| "file_extension": ".py", | ||
| "mimetype": "text/x-python", | ||
| "name": "python", | ||
| "nbconvert_exporter": "python", | ||
| "pygments_lexer": "ipython3" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 2 | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,4 +11,5 @@ maxdepth: 1 | |
| --- | ||
| different_ways_to_load_policy_functions | ||
| visualizing_the_system | ||
| calculating_elterngeld | ||
| ``` | ||
Uh oh!
There was an error while loading. Please reload this page.