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

ENH: Consistency check of Ehepartner and Einstandspartner #698

Open MImmesberger opened 6 months ago

MImmesberger commented 6 months ago

We should check that Ehe- and Einstandspartner specified via p_id_ehepartner and p_id_einstandspartner are consistent. Two people can be Einstandspartner, but not Ehepartner. The other way around is not possible, i.e. the following is okay:

p_id p_id_ehepartner p_id_einstandspartner
0 -1 1
1 -1 0
2 -1 -1

But this is not:

p_id p_id_ehepartner p_id_einstandspartner
0 1 -1
1 0 -1
2 -1 -1

and also not:

p_id p_id_ehepartner p_id_einstandspartner
0 1 -1
1 0 0
2 -1 1