From ee35212072dd462209f044ad992e4c438494d86b Mon Sep 17 00:00:00 2001 From: anth-volk Date: Mon, 29 Jul 2024 22:57:39 -0400 Subject: [PATCH] fix: Change where marriage allowance is calculated --- .../earned_taxable_income_exclusions.yaml | 1 - .../hmrc/income_tax/allowances/allowances.py | 1 + test9.ipynb | 1110 +++++++++-------- 3 files changed, 574 insertions(+), 538 deletions(-) diff --git a/policyengine_uk/parameters/gov/hmrc/income_tax/earned_taxable_income_exclusions.yaml b/policyengine_uk/parameters/gov/hmrc/income_tax/earned_taxable_income_exclusions.yaml index ff128f686..b9857aaa9 100644 --- a/policyengine_uk/parameters/gov/hmrc/income_tax/earned_taxable_income_exclusions.yaml +++ b/policyengine_uk/parameters/gov/hmrc/income_tax/earned_taxable_income_exclusions.yaml @@ -4,7 +4,6 @@ values: - taxable_savings_interest_income - taxable_dividend_income - received_allowances_earned_income - - marriage_allowance metadata: unit: list diff --git a/policyengine_uk/variables/gov/hmrc/income_tax/allowances/allowances.py b/policyengine_uk/variables/gov/hmrc/income_tax/allowances/allowances.py index 159468262..3243c3294 100644 --- a/policyengine_uk/variables/gov/hmrc/income_tax/allowances/allowances.py +++ b/policyengine_uk/variables/gov/hmrc/income_tax/allowances/allowances.py @@ -235,4 +235,5 @@ class allowances(Variable): "charitable_investment_gifts", "other_deductions", "pension_contributions_relief", + "marriage_allowance" ] diff --git a/test9.ipynb b/test9.ipynb index bbaeefea3..9f7383341 100644 --- a/test9.ipynb +++ b/test9.ipynb @@ -30,7 +30,7 @@ { "data": { "text/plain": [ - "195.48206357797875" + "195.47995283463052" ] }, "execution_count": 3, @@ -75,7 +75,10 @@ " \"gift_aid\",\n", " \"savings_allowance\",\n", " \"taxable_savings_interest_income\",\n", - " \n", + " \"marriage_allowance\",\n", + " \"received_allowances_earned_income\",\n", + " \"received_allowances_savings_income\",\n", + " \"received_allowances_dividend_income\",\n", "]\n", "\n", "for variable in variables_to_add:\n", @@ -128,11 +131,11 @@ " \n", " \n", " \n", - " 204501\n", - " 668506\n", - " 769908\n", - " 770166\n", - " 591136\n", + " 244954\n", + " 167188\n", + " 167042\n", + " 441029\n", + " 401779\n", " \n", " \n", " \n", @@ -146,11 +149,11 @@ " \n", " \n", " AGERANGE\n", + " 6\n", + " 3\n", + " 2\n", " 4\n", - " 7\n", - " 5\n", - " 7\n", - " 7\n", + " 1\n", " \n", " \n", " BPADUE\n", @@ -166,7 +169,7 @@ " 0\n", " 0\n", " 0\n", - " 0\n", + " 41000\n", " \n", " \n", " COVNTS\n", @@ -188,39 +191,39 @@ " DIVIDENDS\n", " 0\n", " 0\n", - " 18600\n", - " 350\n", - " 29600\n", + " 0\n", + " 90\n", + " 0\n", " \n", " \n", " DSHIPS\n", " 3\n", " 3\n", - " 1\n", + " 3\n", " 3\n", " 3\n", " \n", " \n", " EIDF\n", - " 315\n", - " 0\n", - " 0\n", " 0\n", + " 505\n", + " 640\n", " 0\n", + " 90\n", " \n", " \n", " EMPINC\n", - " 12060\n", " 0\n", - " 41300\n", + " 13500\n", + " 12400\n", " 0\n", - " 2150\n", + " 28090\n", " \n", " \n", " EPB\n", " 0\n", " 0\n", - " 32900\n", + " 0\n", " 0\n", " 0\n", " \n", @@ -234,7 +237,7 @@ " \n", " \n", " EXPS\n", - " 740\n", + " 0\n", " 0\n", " 0\n", " 0\n", @@ -242,11 +245,11 @@ " \n", " \n", " FACT\n", + " 103.8659\n", + " 125.4422\n", " 125.4422\n", - " 25.739566\n", - " 10.267938\n", " 10.252325\n", - " 25.539031\n", + " 25.833991\n", " \n", " \n", " GIFTAID\n", @@ -254,7 +257,7 @@ " 0\n", " 0\n", " 0\n", - " 1660\n", + " 0\n", " \n", " \n", " GIFTINV\n", @@ -266,11 +269,11 @@ " \n", " \n", " GORCODE\n", - " 3\n", + " 6\n", " 7\n", - " 3\n", - " 4\n", - " 5\n", + " 8\n", + " 1\n", + " 2\n", " \n", " \n", " IIDF\n", @@ -278,15 +281,15 @@ " 0\n", " 0\n", " 0\n", - " 1660\n", + " 0\n", " \n", " \n", " INCBBS\n", + " 5\n", + " 5\n", " 0\n", + " 7570\n", " 0\n", - " 0\n", - " 0\n", - " 27200\n", " \n", " \n", " INCPBEN\n", @@ -300,17 +303,17 @@ " INCPROP\n", " 0\n", " 0\n", - " 3800\n", + " 0\n", " 0\n", " 0\n", " \n", " \n", " INDUSTRY07\n", - " Q\n", - " 1600\n", - " G\n", " 1600\n", + " Q\n", + " Q\n", " 1600\n", + " K\n", " \n", " \n", " LLIR_RESTRICT_AMT_TOT\n", @@ -330,25 +333,25 @@ " \n", " \n", " MAIND\n", - " 0\n", - " 0\n", + " 1\n", + " 1\n", " 0\n", " 0\n", " 0\n", " \n", " \n", " MAINSRCE\n", + " 2\n", " 1\n", - " 5\n", " 1\n", " 2\n", - " 2\n", + " 3\n", " \n", " \n", " MAR\n", " STBR\n", - " NSHR\n", - " NSHR\n", + " STBR\n", + " STBR\n", " NSHR\n", " NSHR\n", " \n", @@ -374,7 +377,7 @@ " 0\n", " 0\n", " 0\n", - " 2150\n", + " 28000\n", " \n", " \n", " OSSBEN\n", @@ -395,42 +398,42 @@ " \n", " OTHERINV\n", " 0\n", - " 35700\n", - " 29700\n", - " 82400\n", - " 730\n", + " 0\n", + " 0\n", + " 65800\n", + " 18000\n", " \n", " \n", " PAS\n", - " 11250\n", " 12500\n", " 12500\n", - " 11000\n", + " 11250\n", + " 12270\n", " 12500\n", " \n", " \n", " PAY\n", - " 12800\n", - " 0\n", - " 8400\n", " 0\n", + " 13500\n", + " 12400\n", " 0\n", + " 90\n", " \n", " \n", " PENSION\n", + " 3490\n", + " 0\n", " 0\n", - " 35700\n", + " 27000\n", " 0\n", - " 10600\n", - " 9430\n", " \n", " \n", " PENSRLF\n", - " 315\n", - " 0\n", - " 0\n", " 0\n", + " 505\n", + " 640\n", " 0\n", + " 90\n", " \n", " \n", " PROFITS\n", @@ -438,7 +441,7 @@ " 0\n", " 0\n", " 0\n", - " 0\n", + " 51000\n", " \n", " \n", " PSAV_XS\n", @@ -462,7 +465,7 @@ " 0\n", " 0\n", " 0\n", - " 0\n", + " 1\n", " \n", " \n", " SEISS\n", @@ -474,43 +477,43 @@ " \n", " \n", " SEX\n", - " 2\n", - " 1\n", " 1\n", " 2\n", + " 2\n", + " 1\n", " 1\n", " \n", " \n", " SPA\n", - " 0\n", " 1\n", " 0\n", - " 1\n", - " 1\n", + " 0\n", + " 0\n", + " 0\n", " \n", " \n", " SREF\n", - " 15268377\n", - " 15769902\n", - " 15885515\n", - " 15885802\n", - " 15681873\n", + " 15308917\n", + " 15230975\n", + " 15230829\n", + " 15511116\n", + " 15466405\n", " \n", " \n", " SRP\n", + " 9520\n", + " 0\n", " 0\n", " 0\n", " 0\n", - " 9650\n", - " 16900\n", " \n", " \n", " TAX_CRED\n", " 0\n", - " 6300\n", " 0\n", " 0\n", - " 255\n", + " 0\n", + " 0\n", " \n", " \n", " TAX_ST_AR_DEVO_TXP\n", @@ -531,10 +534,10 @@ " \n", " TAX_ST_BR_DEVO_TXP\n", " 100\n", - " 2810\n", - " 6520\n", - " 1850\n", - " 2825\n", + " 100\n", + " 100\n", + " 2945\n", + " 5100\n", " \n", " \n", " TAX_ST_BR_DEVO_WRIT\n", @@ -578,16 +581,16 @@ " \n", " \n", " TAXINC\n", - " 495\n", - " 58900\n", - " 80900\n", - " 92000\n", - " 71850\n", + " 515\n", + " 500\n", + " 510\n", + " 88195\n", + " 43500\n", " \n", " \n", " TAXPAYER\n", - " 1\n", - " 1\n", + " 2\n", + " 2\n", " 1\n", " 1\n", " 1\n", @@ -602,35 +605,35 @@ " \n", " \n", " TEI\n", - " 12060\n", - " 35700\n", - " 41300\n", - " 20250\n", - " 28480\n", + " 13010\n", + " 13500\n", + " 12400\n", + " 27000\n", + " 38090\n", " \n", " \n", " TI\n", - " 12060\n", - " 71400\n", - " 93400\n", - " 103000\n", - " 86010\n", + " 13015\n", + " 13500\n", + " 12400\n", + " 100460\n", + " 56090\n", " \n", " \n", " TII\n", + " 5\n", + " 5\n", " 0\n", - " 35700\n", - " 52100\n", - " 82750\n", - " 57530\n", + " 73460\n", + " 18000\n", " \n", " \n", " TOTTAX_DEVO_TXP\n", " 100\n", - " 9660\n", - " 22715\n", - " 29060\n", - " 18015\n", + " 100\n", + " 100\n", + " 27640\n", + " 9800\n", " \n", " \n", " UBISJA\n", @@ -650,23 +653,23 @@ " \n", " \n", " zzz_policyengine_adjusted_net_income\n", - " 12060.0\n", - " 71400.0\n", - " 93400.0\n", - " 103000.0\n", - " 86010.0\n", + " 13015.0\n", + " 13505.0\n", + " 12400.0\n", + " 100460.0\n", + " 56090.0\n", " \n", " \n", " zzz_policyengine_earned_taxable_income\n", " 0.0\n", - " 23200.0\n", - " 32600.0\n", - " 9250.0\n", - " 14320.0\n", + " 0.0\n", + " 0.0\n", + " 14730.0\n", + " 25500.0\n", " \n", " \n", " zzz_policyengine_employment_deductions\n", - " 740.0\n", + " 0.0\n", " 0.0\n", " 0.0\n", " 0.0\n", @@ -678,332 +681,343 @@ " 0.0\n", " 0.0\n", " 0.0\n", - " 1660.0\n", + " 0.0\n", " \n", " \n", " zzz_policyengine_income_tax\n", " 0.0\n", - " 9560.0\n", - " 22615.0\n", - " 28960.0\n", - " 17915.0\n", + " 0.0\n", + " 0.0\n", + " 27540.0\n", + " 9700.0\n", + " \n", + " \n", + " zzz_policyengine_marriage_allowance\n", + " 1250.0\n", + " 1250.0\n", + " 0.0\n", + " 0.0\n", + " 0.0\n", " \n", " \n", " zzz_policyengine_other_tax_credits\n", " 0.0\n", - " 6300.0\n", " 0.0\n", " 0.0\n", - " 255.0\n", + " 0.0\n", + " 0.0\n", " \n", " \n", " zzz_policyengine_personal_allowance\n", " 12500.0\n", " 12500.0\n", " 12500.0\n", - " 11000.0\n", + " 12270.0\n", " 12500.0\n", " \n", " \n", " zzz_policyengine_received_allowances\n", - " 12060.0\n", - " 12500.0\n", - " 12500.0\n", - " 11000.0\n", - " 14160.0\n", + " 13015.0\n", + " 13505.0\n", + " 12400.0\n", + " 12270.0\n", + " 12590.0\n", " \n", " \n", " zzz_policyengine_savings_allowance\n", " 1000.0\n", - " 500.0\n", - " 500.0\n", + " 1000.0\n", + " 1000.0\n", " 500.0\n", " 500.0\n", " \n", " \n", " zzz_policyengine_taxable_employment_income\n", - " 12060.0\n", - " 0.0\n", - " 41300.0\n", " 0.0\n", + " 13500.0\n", + " 12400.0\n", " 0.0\n", + " 90.0\n", " \n", " \n", " zzz_policyengine_taxable_savings_interest_income\n", + " 5.0\n", + " 5.0\n", " 0.0\n", - " 35700.0\n", - " 29700.0\n", - " 82400.0\n", - " 27930.0\n", + " 73370.0\n", + " 18000.0\n", " \n", " \n", " zzz_policyengine_taxed_dividend_income\n", " 0.0\n", " 0.0\n", - " 16600.0\n", " 0.0\n", - " 27600.0\n", + " 0.0\n", + " 0.0\n", " \n", " \n", " zzz_policyengine_taxed_income\n", " 0.0\n", - " 58400.0\n", - " 78400.0\n", - " 91150.0\n", - " 69350.0\n", + " 0.0\n", + " 0.0\n", + " 87600.0\n", + " 43000.0\n", " \n", " \n", " zzz_policyengine_taxed_savings_income\n", " 0.0\n", - " 35200.0\n", - " 29200.0\n", - " 81900.0\n", - " 27430.0\n", + " 0.0\n", + " 0.0\n", + " 72870.0\n", + " 17500.0\n", " \n", " \n", "\n", "" ], "text/plain": [ - " 204501 668506 \\\n", + " 244954 167188 \\\n", + "abs_error 100.0 100.0 \n", + "AGERANGE 6 3 \n", + "BPADUE 0 0 \n", + "CAPALL 0 0 \n", + "COVNTS 0 0 \n", + "DEFICIEN 0 0 \n", + "DIVIDENDS 0 0 \n", + "DSHIPS 3 3 \n", + "EIDF 0 505 \n", + "EMPINC 0 13500 \n", + "EPB 0 0 \n", + "error -100.0 -100.0 \n", + "EXPS 0 0 \n", + "FACT 103.8659 125.4422 \n", + "GIFTAID 0 0 \n", + "GIFTINV 0 0 \n", + "GORCODE 6 7 \n", + "IIDF 0 0 \n", + "INCBBS 5 5 \n", + "INCPBEN 0 0 \n", + "INCPROP 0 0 \n", + "INDUSTRY07 1600 Q \n", + "LLIR_RESTRICT_AMT_TOT 0 0 \n", + "LOSSBF 0 0 \n", + "MAIND 1 1 \n", + "MAINSRCE 2 1 \n", + "MAR STBR STBR \n", + "MCAS 0 0 \n", + "MOTHDED 0 0 \n", + "MOTHINC 0 0 \n", + "OSSBEN 0 0 \n", + "OTHERINC 0 0 \n", + "OTHERINV 0 0 \n", + "PAS 12500 12500 \n", + "PAY 0 13500 \n", + "PENSION 3490 0 \n", + "PENSRLF 0 505 \n", + "PROFITS 0 0 \n", + "PSAV_XS 0 0 \n", + "SCOT_TXP 0 0 \n", + "SEINC_NUM 0 0 \n", + "SEISS 0 0 \n", + "SEX 1 2 \n", + "SPA 1 0 \n", + "SREF 15308917 15230975 \n", + "SRP 9520 0 \n", + "TAX_CRED 0 0 \n", + "TAX_ST_AR_DEVO_TXP 0 0 \n", + "TAX_ST_AR_DEVO_WRIT 0 0 \n", + "TAX_ST_BR_DEVO_TXP 100 100 \n", + "TAX_ST_BR_DEVO_WRIT 0 0 \n", + "TAX_ST_HR_DEVO_TXP 0 0 \n", + "TAX_ST_HR_DEVO_WRIT 0 0 \n", + "TAX_ST_IR_DEVO_TXP 0 0 \n", + "TAX_ST_SR_DEVO_TXP 0 0 \n", + "TAXINC 515 500 \n", + "TAXPAYER 2 2 \n", + "TAXTERM 0 0 \n", + "TEI 13010 13500 \n", + "TI 13015 13500 \n", + "TII 5 5 \n", + "TOTTAX_DEVO_TXP 100 100 \n", + "UBISJA 0 0 \n", + "WELSH_TXP 0 0 \n", + "zzz_policyengine_adjusted_net_income 13015.0 13505.0 \n", + "zzz_policyengine_earned_taxable_income 0.0 0.0 \n", + "zzz_policyengine_employment_deductions 0.0 0.0 \n", + "zzz_policyengine_gift_aid 0.0 0.0 \n", + "zzz_policyengine_income_tax 0.0 0.0 \n", + "zzz_policyengine_marriage_allowance 1250.0 1250.0 \n", + "zzz_policyengine_other_tax_credits 0.0 0.0 \n", + "zzz_policyengine_personal_allowance 12500.0 12500.0 \n", + "zzz_policyengine_received_allowances 13015.0 13505.0 \n", + "zzz_policyengine_savings_allowance 1000.0 1000.0 \n", + "zzz_policyengine_taxable_employment_income 0.0 13500.0 \n", + "zzz_policyengine_taxable_savings_interest_income 5.0 5.0 \n", + "zzz_policyengine_taxed_dividend_income 0.0 0.0 \n", + "zzz_policyengine_taxed_income 0.0 0.0 \n", + "zzz_policyengine_taxed_savings_income 0.0 0.0 \n", + "\n", + " 167042 441029 \\\n", "abs_error 100.0 100.0 \n", - "AGERANGE 4 7 \n", + "AGERANGE 2 4 \n", "BPADUE 0 0 \n", "CAPALL 0 0 \n", "COVNTS 0 0 \n", "DEFICIEN 0 0 \n", - "DIVIDENDS 0 0 \n", + "DIVIDENDS 0 90 \n", "DSHIPS 3 3 \n", - "EIDF 315 0 \n", - "EMPINC 12060 0 \n", + "EIDF 640 0 \n", + "EMPINC 12400 0 \n", "EPB 0 0 \n", "error -100.0 -100.0 \n", - "EXPS 740 0 \n", - "FACT 125.4422 25.739566 \n", + "EXPS 0 0 \n", + "FACT 125.4422 10.252325 \n", "GIFTAID 0 0 \n", "GIFTINV 0 0 \n", - "GORCODE 3 7 \n", + "GORCODE 8 1 \n", "IIDF 0 0 \n", - "INCBBS 0 0 \n", + "INCBBS 0 7570 \n", "INCPBEN 0 0 \n", "INCPROP 0 0 \n", "INDUSTRY07 Q 1600 \n", "LLIR_RESTRICT_AMT_TOT 0 0 \n", "LOSSBF 0 0 \n", "MAIND 0 0 \n", - "MAINSRCE 1 5 \n", + "MAINSRCE 1 2 \n", "MAR STBR NSHR \n", "MCAS 0 0 \n", "MOTHDED 0 0 \n", "MOTHINC 0 0 \n", "OSSBEN 0 0 \n", "OTHERINC 0 0 \n", - "OTHERINV 0 35700 \n", - "PAS 11250 12500 \n", - "PAY 12800 0 \n", - "PENSION 0 35700 \n", - "PENSRLF 315 0 \n", + "OTHERINV 0 65800 \n", + "PAS 11250 12270 \n", + "PAY 12400 0 \n", + "PENSION 0 27000 \n", + "PENSRLF 640 0 \n", "PROFITS 0 0 \n", "PSAV_XS 0 0 \n", "SCOT_TXP 0 0 \n", "SEINC_NUM 0 0 \n", "SEISS 0 0 \n", "SEX 2 1 \n", - "SPA 0 1 \n", - "SREF 15268377 15769902 \n", + "SPA 0 0 \n", + "SREF 15230829 15511116 \n", "SRP 0 0 \n", - "TAX_CRED 0 6300 \n", + "TAX_CRED 0 0 \n", "TAX_ST_AR_DEVO_TXP 0 0 \n", "TAX_ST_AR_DEVO_WRIT 0 0 \n", - "TAX_ST_BR_DEVO_TXP 100 2810 \n", + "TAX_ST_BR_DEVO_TXP 100 2945 \n", "TAX_ST_BR_DEVO_WRIT 0 0 \n", "TAX_ST_HR_DEVO_TXP 0 0 \n", "TAX_ST_HR_DEVO_WRIT 0 0 \n", "TAX_ST_IR_DEVO_TXP 0 0 \n", "TAX_ST_SR_DEVO_TXP 0 0 \n", - "TAXINC 495 58900 \n", + "TAXINC 510 88195 \n", "TAXPAYER 1 1 \n", "TAXTERM 0 0 \n", - "TEI 12060 35700 \n", - "TI 12060 71400 \n", - "TII 0 35700 \n", - "TOTTAX_DEVO_TXP 100 9660 \n", + "TEI 12400 27000 \n", + "TI 12400 100460 \n", + "TII 0 73460 \n", + "TOTTAX_DEVO_TXP 100 27640 \n", "UBISJA 0 0 \n", "WELSH_TXP 0 0 \n", - "zzz_policyengine_adjusted_net_income 12060.0 71400.0 \n", - "zzz_policyengine_earned_taxable_income 0.0 23200.0 \n", - "zzz_policyengine_employment_deductions 740.0 0.0 \n", + "zzz_policyengine_adjusted_net_income 12400.0 100460.0 \n", + "zzz_policyengine_earned_taxable_income 0.0 14730.0 \n", + "zzz_policyengine_employment_deductions 0.0 0.0 \n", "zzz_policyengine_gift_aid 0.0 0.0 \n", - "zzz_policyengine_income_tax 0.0 9560.0 \n", - "zzz_policyengine_other_tax_credits 0.0 6300.0 \n", - "zzz_policyengine_personal_allowance 12500.0 12500.0 \n", - "zzz_policyengine_received_allowances 12060.0 12500.0 \n", + "zzz_policyengine_income_tax 0.0 27540.0 \n", + "zzz_policyengine_marriage_allowance 0.0 0.0 \n", + "zzz_policyengine_other_tax_credits 0.0 0.0 \n", + "zzz_policyengine_personal_allowance 12500.0 12270.0 \n", + "zzz_policyengine_received_allowances 12400.0 12270.0 \n", "zzz_policyengine_savings_allowance 1000.0 500.0 \n", - "zzz_policyengine_taxable_employment_income 12060.0 0.0 \n", - "zzz_policyengine_taxable_savings_interest_income 0.0 35700.0 \n", + "zzz_policyengine_taxable_employment_income 12400.0 0.0 \n", + "zzz_policyengine_taxable_savings_interest_income 0.0 73370.0 \n", "zzz_policyengine_taxed_dividend_income 0.0 0.0 \n", - "zzz_policyengine_taxed_income 0.0 58400.0 \n", - "zzz_policyengine_taxed_savings_income 0.0 35200.0 \n", - "\n", - " 769908 770166 \\\n", - "abs_error 100.0 100.0 \n", - "AGERANGE 5 7 \n", - "BPADUE 0 0 \n", - "CAPALL 0 0 \n", - "COVNTS 0 0 \n", - "DEFICIEN 0 0 \n", - "DIVIDENDS 18600 350 \n", - "DSHIPS 1 3 \n", - "EIDF 0 0 \n", - "EMPINC 41300 0 \n", - "EPB 32900 0 \n", - "error -100.0 -100.0 \n", - "EXPS 0 0 \n", - "FACT 10.267938 10.252325 \n", - "GIFTAID 0 0 \n", - "GIFTINV 0 0 \n", - "GORCODE 3 4 \n", - "IIDF 0 0 \n", - "INCBBS 0 0 \n", - "INCPBEN 0 0 \n", - "INCPROP 3800 0 \n", - "INDUSTRY07 G 1600 \n", - "LLIR_RESTRICT_AMT_TOT 0 0 \n", - "LOSSBF 0 0 \n", - "MAIND 0 0 \n", - "MAINSRCE 1 2 \n", - "MAR NSHR NSHR \n", - "MCAS 0 0 \n", - "MOTHDED 0 0 \n", - "MOTHINC 0 0 \n", - "OSSBEN 0 0 \n", - "OTHERINC 0 0 \n", - "OTHERINV 29700 82400 \n", - "PAS 12500 11000 \n", - "PAY 8400 0 \n", - "PENSION 0 10600 \n", - "PENSRLF 0 0 \n", - "PROFITS 0 0 \n", - "PSAV_XS 0 0 \n", - "SCOT_TXP 0 0 \n", - "SEINC_NUM 0 0 \n", - "SEISS 0 0 \n", - "SEX 1 2 \n", - "SPA 0 1 \n", - "SREF 15885515 15885802 \n", - "SRP 0 9650 \n", - "TAX_CRED 0 0 \n", - "TAX_ST_AR_DEVO_TXP 0 0 \n", - "TAX_ST_AR_DEVO_WRIT 0 0 \n", - "TAX_ST_BR_DEVO_TXP 6520 1850 \n", - "TAX_ST_BR_DEVO_WRIT 0 0 \n", - "TAX_ST_HR_DEVO_TXP 0 0 \n", - "TAX_ST_HR_DEVO_WRIT 0 0 \n", - "TAX_ST_IR_DEVO_TXP 0 0 \n", - "TAX_ST_SR_DEVO_TXP 0 0 \n", - "TAXINC 80900 92000 \n", - "TAXPAYER 1 1 \n", - "TAXTERM 0 0 \n", - "TEI 41300 20250 \n", - "TI 93400 103000 \n", - "TII 52100 82750 \n", - "TOTTAX_DEVO_TXP 22715 29060 \n", - "UBISJA 0 0 \n", - "WELSH_TXP 0 0 \n", - "zzz_policyengine_adjusted_net_income 93400.0 103000.0 \n", - "zzz_policyengine_earned_taxable_income 32600.0 9250.0 \n", - "zzz_policyengine_employment_deductions 0.0 0.0 \n", - "zzz_policyengine_gift_aid 0.0 0.0 \n", - "zzz_policyengine_income_tax 22615.0 28960.0 \n", - "zzz_policyengine_other_tax_credits 0.0 0.0 \n", - "zzz_policyengine_personal_allowance 12500.0 11000.0 \n", - "zzz_policyengine_received_allowances 12500.0 11000.0 \n", - "zzz_policyengine_savings_allowance 500.0 500.0 \n", - "zzz_policyengine_taxable_employment_income 41300.0 0.0 \n", - "zzz_policyengine_taxable_savings_interest_income 29700.0 82400.0 \n", - "zzz_policyengine_taxed_dividend_income 16600.0 0.0 \n", - "zzz_policyengine_taxed_income 78400.0 91150.0 \n", - "zzz_policyengine_taxed_savings_income 29200.0 81900.0 \n", + "zzz_policyengine_taxed_income 0.0 87600.0 \n", + "zzz_policyengine_taxed_savings_income 0.0 72870.0 \n", "\n", - " 591136 \n", + " 401779 \n", "abs_error 100.0 \n", - "AGERANGE 7 \n", + "AGERANGE 1 \n", "BPADUE 0 \n", - "CAPALL 0 \n", + "CAPALL 41000 \n", "COVNTS 0 \n", "DEFICIEN 0 \n", - "DIVIDENDS 29600 \n", + "DIVIDENDS 0 \n", "DSHIPS 3 \n", - "EIDF 0 \n", - "EMPINC 2150 \n", + "EIDF 90 \n", + "EMPINC 28090 \n", "EPB 0 \n", "error -100.0 \n", "EXPS 0 \n", - "FACT 25.539031 \n", - "GIFTAID 1660 \n", + "FACT 25.833991 \n", + "GIFTAID 0 \n", "GIFTINV 0 \n", - "GORCODE 5 \n", - "IIDF 1660 \n", - "INCBBS 27200 \n", + "GORCODE 2 \n", + "IIDF 0 \n", + "INCBBS 0 \n", "INCPBEN 0 \n", "INCPROP 0 \n", - "INDUSTRY07 1600 \n", + "INDUSTRY07 K \n", "LLIR_RESTRICT_AMT_TOT 0 \n", "LOSSBF 0 \n", "MAIND 0 \n", - "MAINSRCE 2 \n", + "MAINSRCE 3 \n", "MAR NSHR \n", "MCAS 0 \n", "MOTHDED 0 \n", - "MOTHINC 2150 \n", + "MOTHINC 28000 \n", "OSSBEN 0 \n", "OTHERINC 0 \n", - "OTHERINV 730 \n", + "OTHERINV 18000 \n", "PAS 12500 \n", - "PAY 0 \n", - "PENSION 9430 \n", - "PENSRLF 0 \n", - "PROFITS 0 \n", + "PAY 90 \n", + "PENSION 0 \n", + "PENSRLF 90 \n", + "PROFITS 51000 \n", "PSAV_XS 0 \n", "SCOT_TXP 0 \n", - "SEINC_NUM 0 \n", + "SEINC_NUM 1 \n", "SEISS 0 \n", "SEX 1 \n", - "SPA 1 \n", - "SREF 15681873 \n", - "SRP 16900 \n", - "TAX_CRED 255 \n", + "SPA 0 \n", + "SREF 15466405 \n", + "SRP 0 \n", + "TAX_CRED 0 \n", "TAX_ST_AR_DEVO_TXP 0 \n", "TAX_ST_AR_DEVO_WRIT 0 \n", - "TAX_ST_BR_DEVO_TXP 2825 \n", + "TAX_ST_BR_DEVO_TXP 5100 \n", "TAX_ST_BR_DEVO_WRIT 0 \n", "TAX_ST_HR_DEVO_TXP 0 \n", "TAX_ST_HR_DEVO_WRIT 0 \n", "TAX_ST_IR_DEVO_TXP 0 \n", "TAX_ST_SR_DEVO_TXP 0 \n", - "TAXINC 71850 \n", + "TAXINC 43500 \n", "TAXPAYER 1 \n", "TAXTERM 0 \n", - "TEI 28480 \n", - "TI 86010 \n", - "TII 57530 \n", - "TOTTAX_DEVO_TXP 18015 \n", + "TEI 38090 \n", + "TI 56090 \n", + "TII 18000 \n", + "TOTTAX_DEVO_TXP 9800 \n", "UBISJA 0 \n", "WELSH_TXP 0 \n", - "zzz_policyengine_adjusted_net_income 86010.0 \n", - "zzz_policyengine_earned_taxable_income 14320.0 \n", + "zzz_policyengine_adjusted_net_income 56090.0 \n", + "zzz_policyengine_earned_taxable_income 25500.0 \n", "zzz_policyengine_employment_deductions 0.0 \n", - "zzz_policyengine_gift_aid 1660.0 \n", - "zzz_policyengine_income_tax 17915.0 \n", - "zzz_policyengine_other_tax_credits 255.0 \n", + "zzz_policyengine_gift_aid 0.0 \n", + "zzz_policyengine_income_tax 9700.0 \n", + "zzz_policyengine_marriage_allowance 0.0 \n", + "zzz_policyengine_other_tax_credits 0.0 \n", "zzz_policyengine_personal_allowance 12500.0 \n", - "zzz_policyengine_received_allowances 14160.0 \n", + "zzz_policyengine_received_allowances 12590.0 \n", "zzz_policyengine_savings_allowance 500.0 \n", - "zzz_policyengine_taxable_employment_income 0.0 \n", - "zzz_policyengine_taxable_savings_interest_income 27930.0 \n", - "zzz_policyengine_taxed_dividend_income 27600.0 \n", - "zzz_policyengine_taxed_income 69350.0 \n", - "zzz_policyengine_taxed_savings_income 27430.0 " + "zzz_policyengine_taxable_employment_income 90.0 \n", + "zzz_policyengine_taxable_savings_interest_income 18000.0 \n", + "zzz_policyengine_taxed_dividend_income 0.0 \n", + "zzz_policyengine_taxed_income 43000.0 \n", + "zzz_policyengine_taxed_savings_income 17500.0 " ] }, "execution_count": 7, @@ -1029,10 +1043,10 @@ "data": { "text/plain": [ "abs_error\n", - "<=10 92.685731\n", - "<1000 4.806584\n", - ">=1000 1.671160\n", - "<100 0.836525\n", + "<=10 92.695427\n", + "<1000 4.807466\n", + ">=1000 1.670153\n", + "<100 0.826954\n", "Name: proportion, dtype: float64" ] }, @@ -1644,6 +1658,14 @@ " 250.0\n", " \n", " \n", + " zzz_policyengine_marriage_allowance\n", + " 0.0\n", + " 0.0\n", + " 0.0\n", + " 0.0\n", + " 0.0\n", + " \n", + " \n", " zzz_policyengine_other_tax_credits\n", " 0.0\n", " 0.0\n", @@ -1790,6 +1812,7 @@ "zzz_policyengine_employment_deductions 0.0 0.0 \n", "zzz_policyengine_gift_aid 0.0 0.0 \n", "zzz_policyengine_income_tax 0.0 0.0 \n", + "zzz_policyengine_marriage_allowance 0.0 0.0 \n", "zzz_policyengine_other_tax_credits 0.0 0.0 \n", "zzz_policyengine_personal_allowance 12500.0 12500.0 \n", "zzz_policyengine_received_allowances 12500.0 12500.0 \n", @@ -1870,6 +1893,7 @@ "zzz_policyengine_employment_deductions 0.0 0.0 \n", "zzz_policyengine_gift_aid 0.0 0.0 \n", "zzz_policyengine_income_tax 0.0 0.0 \n", + "zzz_policyengine_marriage_allowance 0.0 0.0 \n", "zzz_policyengine_other_tax_credits 0.0 19800.0 \n", "zzz_policyengine_personal_allowance 12500.0 11332.5 \n", "zzz_policyengine_received_allowances 12500.0 11332.5 \n", @@ -1950,6 +1974,7 @@ "zzz_policyengine_employment_deductions 0.0 \n", "zzz_policyengine_gift_aid 0.0 \n", "zzz_policyengine_income_tax 250.0 \n", + "zzz_policyengine_marriage_allowance 0.0 \n", "zzz_policyengine_other_tax_credits 0.0 \n", "zzz_policyengine_personal_allowance 12500.0 \n", "zzz_policyengine_received_allowances 12500.0 \n", @@ -1998,28 +2023,28 @@ " \n", " \n", " \n", - " 653299\n", - " 615831\n", - " 546882\n", - " 660346\n", + " 518132\n", + " 695519\n", + " 507862\n", " 670307\n", + " 585148\n", " \n", " \n", " \n", " \n", " abs_error\n", - " 996.0\n", - " 674.0\n", - " 596.0\n", + " 250.0\n", + " 250.0\n", + " 250.0\n", " 250.0\n", " 250.0\n", " \n", " \n", " AGERANGE\n", - " 5\n", - " 2\n", + " 6\n", " 3\n", - " 4\n", + " 5\n", + " 5\n", " 5\n", " \n", " \n", @@ -2096,9 +2121,9 @@ " \n", " \n", " error\n", - " 996.0\n", - " 674.0\n", - " 596.0\n", + " -250.0\n", + " -250.0\n", + " -250.0\n", " -250.0\n", " -250.0\n", " \n", @@ -2112,10 +2137,10 @@ " \n", " \n", " FACT\n", - " 44.86108\n", - " 53.987038\n", - " 53.987038\n", - " 53.987038\n", + " 45.529136\n", + " 45.529136\n", + " 53.399523\n", + " 53.399523\n", " 53.399523\n", " \n", " \n", @@ -2136,11 +2161,11 @@ " \n", " \n", " GORCODE\n", - " 7\n", - " 9\n", - " 7\n", - " 4\n", + " 6\n", + " 14\n", + " 1\n", " 14\n", + " 8\n", " \n", " \n", " IIDF\n", @@ -2168,27 +2193,27 @@ " \n", " \n", " INCPROP\n", - " 7830\n", - " 4070\n", - " 5980\n", - " 27800\n", + " 39600\n", + " 36900\n", + " 25400\n", " 20600\n", + " 26200\n", " \n", " \n", " INDUSTRY07\n", + " G\n", + " 1500\n", " 1500\n", " 1500\n", - " \n", - " \n", " 1500\n", " \n", " \n", " LLIR_RESTRICT_AMT_TOT\n", + " 12655\n", + " 12190\n", + " 10545\n", " 0\n", " 0\n", - " 0\n", - " 3000\n", - " 0\n", " \n", " \n", " LOSSBF\n", @@ -2200,25 +2225,25 @@ " \n", " \n", " MAIND\n", - " 0\n", - " 0\n", - " 0\n", + " 1\n", + " 1\n", + " 1\n", " 1\n", " 1\n", " \n", " \n", " MAINSRCE\n", + " 4\n", + " 5\n", " 5\n", " 5\n", - " 1\n", - " 1\n", " 5\n", " \n", " \n", " MAR\n", - " NONTP\n", - " NONTP\n", - " NONTP\n", + " STBR\n", + " STBR\n", + " STBR\n", " STBR\n", " STBR\n", " \n", @@ -2264,9 +2289,9 @@ " \n", " \n", " OTHERINV\n", - " 25100\n", - " 12800\n", - " 10500\n", + " 180\n", + " 0\n", + " 0\n", " 0\n", " 0\n", " \n", @@ -2328,7 +2353,7 @@ " \n", " \n", " SEINC_NUM\n", - " 0\n", + " 1\n", " 0\n", " 0\n", " 0\n", @@ -2344,10 +2369,10 @@ " \n", " \n", " SEX\n", - " 2\n", " 1\n", " 2\n", - " 2\n", + " 1\n", + " 1\n", " 1\n", " \n", " \n", @@ -2360,11 +2385,11 @@ " \n", " \n", " SREF\n", - " 15752585\n", - " 15709935\n", - " 15631607\n", - " 15760665\n", + " 15598686\n", + " 15800726\n", + " 15587098\n", " 15771989\n", + " 15675132\n", " \n", " \n", " SRP\n", @@ -2376,10 +2401,10 @@ " \n", " \n", " TAX_CRED\n", - " 2890\n", - " 0\n", + " 2530\n", + " 2440\n", + " 2110\n", " 0\n", - " 600\n", " 0\n", " \n", " \n", @@ -2400,11 +2425,11 @@ " \n", " \n", " TAX_ST_BR_DEVO_TXP\n", - " 0\n", - " 0\n", - " 0\n", - " 2460\n", + " 2890\n", + " 2440\n", + " 470\n", " 1620\n", + " 2740\n", " \n", " \n", " TAX_ST_BR_DEVO_WRIT\n", @@ -2448,17 +2473,17 @@ " \n", " \n", " TAXINC\n", - " 20430\n", - " 4370\n", - " 3980\n", - " 15300\n", + " 27280\n", + " 24400\n", + " 12900\n", " 8100\n", + " 13700\n", " \n", " \n", " TAXPAYER\n", - " 2\n", - " 2\n", - " 2\n", + " 1\n", + " 1\n", + " 1\n", " 1\n", " 1\n", " \n", @@ -2480,27 +2505,27 @@ " \n", " \n", " TI\n", - " 32930\n", - " 16870\n", - " 16480\n", - " 27800\n", + " 39780\n", + " 36900\n", + " 25400\n", " 20600\n", + " 26200\n", " \n", " \n", " TII\n", - " 32930\n", - " 16870\n", - " 16480\n", - " 27800\n", + " 39780\n", + " 36900\n", + " 25400\n", " 20600\n", + " 26200\n", " \n", " \n", " TOTTAX_DEVO_TXP\n", - " 0\n", - " 0\n", - " 0\n", - " 2460\n", + " 2890\n", + " 2440\n", + " 470\n", " 1620\n", + " 2740\n", " \n", " \n", " UBISJA\n", @@ -2520,19 +2545,19 @@ " \n", " \n", " zzz_policyengine_adjusted_net_income\n", - " 32930.0\n", - " 16870.0\n", - " 16480.0\n", - " 27800.0\n", + " 39780.0\n", + " 36900.0\n", + " 25400.0\n", " 20600.0\n", + " 26200.0\n", " \n", " \n", " zzz_policyengine_earned_taxable_income\n", - " 0.0\n", - " 0.0\n", - " 0.0\n", - " 14050.0\n", + " 25850.0\n", + " 23150.0\n", + " 11650.0\n", " 6850.0\n", + " 12450.0\n", " \n", " \n", " zzz_policyengine_employment_deductions\n", @@ -2552,18 +2577,26 @@ " \n", " \n", " zzz_policyengine_income_tax\n", - " 996.0\n", - " 674.0\n", - " 596.0\n", - " 2210.0\n", + " 2640.0\n", + " 2190.0\n", + " 220.0\n", " 1370.0\n", + " 2490.0\n", + " \n", + " \n", + " zzz_policyengine_marriage_allowance\n", + " 1250.0\n", + " 1250.0\n", + " 1250.0\n", + " 1250.0\n", + " 1250.0\n", " \n", " \n", " zzz_policyengine_other_tax_credits\n", - " 2890.0\n", - " 0.0\n", + " 2530.0\n", + " 2440.0\n", + " 2110.0\n", " 0.0\n", - " 600.0\n", " 0.0\n", " \n", " \n", @@ -2576,11 +2609,11 @@ " \n", " \n", " zzz_policyengine_received_allowances\n", - " 12500.0\n", - " 12500.0\n", - " 12500.0\n", - " 12500.0\n", - " 12500.0\n", + " 13750.0\n", + " 13750.0\n", + " 13750.0\n", + " 13750.0\n", + " 13750.0\n", " \n", " \n", " zzz_policyengine_savings_allowance\n", @@ -2600,9 +2633,9 @@ " \n", " \n", " zzz_policyengine_taxable_savings_interest_income\n", - " 25100.0\n", - " 12800.0\n", - " 10500.0\n", + " 180.0\n", + " 0.0\n", + " 0.0\n", " 0.0\n", " 0.0\n", " \n", @@ -2616,17 +2649,17 @@ " \n", " \n", " zzz_policyengine_taxed_income\n", - " 19430.0\n", - " 3370.0\n", - " 2980.0\n", - " 14050.0\n", + " 25850.0\n", + " 23150.0\n", + " 11650.0\n", " 6850.0\n", + " 12450.0\n", " \n", " \n", " zzz_policyengine_taxed_savings_income\n", - " 19430.0\n", - " 3370.0\n", - " 2980.0\n", + " 0.0\n", + " 0.0\n", + " 0.0\n", " 0.0\n", " 0.0\n", " \n", @@ -2635,89 +2668,90 @@ "" ], "text/plain": [ - " 653299 615831 \\\n", - "abs_error 996.0 674.0 \n", - "AGERANGE 5 2 \n", - "BPADUE 0 0 \n", - "CAPALL 0 0 \n", - "COVNTS 0 0 \n", - "DEFICIEN 0 0 \n", - "DIVIDENDS 0 0 \n", - "DSHIPS 3 3 \n", - "EIDF 0 0 \n", - "EMPINC 0 0 \n", - "EPB 0 0 \n", - "error 996.0 674.0 \n", - "EXPS 0 0 \n", - "FACT 44.86108 53.987038 \n", - "GIFTAID 0 0 \n", - "GIFTINV 0 0 \n", - "GORCODE 7 9 \n", - "IIDF 0 0 \n", - "INCBBS 0 0 \n", - "INCPBEN 0 0 \n", - "INCPROP 7830 4070 \n", - "INDUSTRY07 1500 1500 \n", - "LLIR_RESTRICT_AMT_TOT 0 0 \n", - "LOSSBF 0 0 \n", - "MAIND 0 0 \n", - "MAINSRCE 5 5 \n", - "MAR NONTP NONTP \n", - "MCAS 0 0 \n", - "MOTHDED 0 0 \n", - "MOTHINC 0 0 \n", - "OSSBEN 0 0 \n", - "OTHERINC 0 0 \n", - "OTHERINV 25100 12800 \n", - "PAS 12500 12500 \n", - "PAY 0 0 \n", - "PENSION 0 0 \n", - "PENSRLF 0 0 \n", - "PROFITS 0 0 \n", - "PSAV_XS 0 0 \n", - "SCOT_TXP 0 0 \n", - "SEINC_NUM 0 0 \n", - "SEISS 0 0 \n", - "SEX 2 1 \n", - "SPA 0 0 \n", - "SREF 15752585 15709935 \n", - "SRP 0 0 \n", - "TAX_CRED 2890 0 \n", - "TAX_ST_AR_DEVO_TXP 0 0 \n", - "TAX_ST_AR_DEVO_WRIT 0 0 \n", - "TAX_ST_BR_DEVO_TXP 0 0 \n", - "TAX_ST_BR_DEVO_WRIT 0 0 \n", - "TAX_ST_HR_DEVO_TXP 0 0 \n", - "TAX_ST_HR_DEVO_WRIT 0 0 \n", - "TAX_ST_IR_DEVO_TXP 0 0 \n", - "TAX_ST_SR_DEVO_TXP 0 0 \n", - "TAXINC 20430 4370 \n", - "TAXPAYER 2 2 \n", - "TAXTERM 0 0 \n", - "TEI 0 0 \n", - "TI 32930 16870 \n", - "TII 32930 16870 \n", - "TOTTAX_DEVO_TXP 0 0 \n", - "UBISJA 0 0 \n", - "WELSH_TXP 0 0 \n", - "zzz_policyengine_adjusted_net_income 32930.0 16870.0 \n", - "zzz_policyengine_earned_taxable_income 0.0 0.0 \n", - "zzz_policyengine_employment_deductions 0.0 0.0 \n", - "zzz_policyengine_gift_aid 0.0 0.0 \n", - "zzz_policyengine_income_tax 996.0 674.0 \n", - "zzz_policyengine_other_tax_credits 2890.0 0.0 \n", - "zzz_policyengine_personal_allowance 12500.0 12500.0 \n", - "zzz_policyengine_received_allowances 12500.0 12500.0 \n", - "zzz_policyengine_savings_allowance 1000.0 1000.0 \n", - "zzz_policyengine_taxable_employment_income 0.0 0.0 \n", - "zzz_policyengine_taxable_savings_interest_income 25100.0 12800.0 \n", - "zzz_policyengine_taxed_dividend_income 0.0 0.0 \n", - "zzz_policyengine_taxed_income 19430.0 3370.0 \n", - "zzz_policyengine_taxed_savings_income 19430.0 3370.0 \n", + " 518132 695519 \\\n", + "abs_error 250.0 250.0 \n", + "AGERANGE 6 3 \n", + "BPADUE 0 0 \n", + "CAPALL 0 0 \n", + "COVNTS 0 0 \n", + "DEFICIEN 0 0 \n", + "DIVIDENDS 0 0 \n", + "DSHIPS 3 3 \n", + "EIDF 0 0 \n", + "EMPINC 0 0 \n", + "EPB 0 0 \n", + "error -250.0 -250.0 \n", + "EXPS 0 0 \n", + "FACT 45.529136 45.529136 \n", + "GIFTAID 0 0 \n", + "GIFTINV 0 0 \n", + "GORCODE 6 14 \n", + "IIDF 0 0 \n", + "INCBBS 0 0 \n", + "INCPBEN 0 0 \n", + "INCPROP 39600 36900 \n", + "INDUSTRY07 G 1500 \n", + "LLIR_RESTRICT_AMT_TOT 12655 12190 \n", + "LOSSBF 0 0 \n", + "MAIND 1 1 \n", + "MAINSRCE 4 5 \n", + "MAR STBR STBR \n", + "MCAS 0 0 \n", + "MOTHDED 0 0 \n", + "MOTHINC 0 0 \n", + "OSSBEN 0 0 \n", + "OTHERINC 0 0 \n", + "OTHERINV 180 0 \n", + "PAS 12500 12500 \n", + "PAY 0 0 \n", + "PENSION 0 0 \n", + "PENSRLF 0 0 \n", + "PROFITS 0 0 \n", + "PSAV_XS 0 0 \n", + "SCOT_TXP 0 0 \n", + "SEINC_NUM 1 0 \n", + "SEISS 0 0 \n", + "SEX 1 2 \n", + "SPA 0 0 \n", + "SREF 15598686 15800726 \n", + "SRP 0 0 \n", + "TAX_CRED 2530 2440 \n", + "TAX_ST_AR_DEVO_TXP 0 0 \n", + "TAX_ST_AR_DEVO_WRIT 0 0 \n", + "TAX_ST_BR_DEVO_TXP 2890 2440 \n", + "TAX_ST_BR_DEVO_WRIT 0 0 \n", + "TAX_ST_HR_DEVO_TXP 0 0 \n", + "TAX_ST_HR_DEVO_WRIT 0 0 \n", + "TAX_ST_IR_DEVO_TXP 0 0 \n", + "TAX_ST_SR_DEVO_TXP 0 0 \n", + "TAXINC 27280 24400 \n", + "TAXPAYER 1 1 \n", + "TAXTERM 0 0 \n", + "TEI 0 0 \n", + "TI 39780 36900 \n", + "TII 39780 36900 \n", + "TOTTAX_DEVO_TXP 2890 2440 \n", + "UBISJA 0 0 \n", + "WELSH_TXP 0 0 \n", + "zzz_policyengine_adjusted_net_income 39780.0 36900.0 \n", + "zzz_policyengine_earned_taxable_income 25850.0 23150.0 \n", + "zzz_policyengine_employment_deductions 0.0 0.0 \n", + "zzz_policyengine_gift_aid 0.0 0.0 \n", + "zzz_policyengine_income_tax 2640.0 2190.0 \n", + "zzz_policyengine_marriage_allowance 1250.0 1250.0 \n", + "zzz_policyengine_other_tax_credits 2530.0 2440.0 \n", + "zzz_policyengine_personal_allowance 12500.0 12500.0 \n", + "zzz_policyengine_received_allowances 13750.0 13750.0 \n", + "zzz_policyengine_savings_allowance 1000.0 1000.0 \n", + "zzz_policyengine_taxable_employment_income 0.0 0.0 \n", + "zzz_policyengine_taxable_savings_interest_income 180.0 0.0 \n", + "zzz_policyengine_taxed_dividend_income 0.0 0.0 \n", + "zzz_policyengine_taxed_income 25850.0 23150.0 \n", + "zzz_policyengine_taxed_savings_income 0.0 0.0 \n", "\n", - " 546882 660346 \\\n", - "abs_error 596.0 250.0 \n", - "AGERANGE 3 4 \n", + " 507862 670307 \\\n", + "abs_error 250.0 250.0 \n", + "AGERANGE 5 5 \n", "BPADUE 0 0 \n", "CAPALL 0 0 \n", "COVNTS 0 0 \n", @@ -2727,28 +2761,28 @@ "EIDF 0 0 \n", "EMPINC 0 0 \n", "EPB 0 0 \n", - "error 596.0 -250.0 \n", + "error -250.0 -250.0 \n", "EXPS 0 0 \n", - "FACT 53.987038 53.987038 \n", + "FACT 53.399523 53.399523 \n", "GIFTAID 0 0 \n", "GIFTINV 0 0 \n", - "GORCODE 7 4 \n", + "GORCODE 1 14 \n", "IIDF 0 0 \n", "INCBBS 0 0 \n", "INCPBEN 0 0 \n", - "INCPROP 5980 27800 \n", - "INDUSTRY07 \n", - "LLIR_RESTRICT_AMT_TOT 0 3000 \n", + "INCPROP 25400 20600 \n", + "INDUSTRY07 1500 1500 \n", + "LLIR_RESTRICT_AMT_TOT 10545 0 \n", "LOSSBF 0 0 \n", - "MAIND 0 1 \n", - "MAINSRCE 1 1 \n", - "MAR NONTP STBR \n", + "MAIND 1 1 \n", + "MAINSRCE 5 5 \n", + "MAR STBR STBR \n", "MCAS 0 0 \n", "MOTHDED 0 0 \n", "MOTHINC 0 0 \n", "OSSBEN 0 0 \n", "OTHERINC 0 0 \n", - "OTHERINV 10500 0 \n", + "OTHERINV 0 0 \n", "PAS 12500 12500 \n", "PAY 0 0 \n", "PENSION 0 0 \n", @@ -2758,44 +2792,45 @@ "SCOT_TXP 0 0 \n", "SEINC_NUM 0 0 \n", "SEISS 0 0 \n", - "SEX 2 2 \n", + "SEX 1 1 \n", "SPA 0 0 \n", - "SREF 15631607 15760665 \n", + "SREF 15587098 15771989 \n", "SRP 0 0 \n", - "TAX_CRED 0 600 \n", + "TAX_CRED 2110 0 \n", "TAX_ST_AR_DEVO_TXP 0 0 \n", "TAX_ST_AR_DEVO_WRIT 0 0 \n", - "TAX_ST_BR_DEVO_TXP 0 2460 \n", + "TAX_ST_BR_DEVO_TXP 470 1620 \n", "TAX_ST_BR_DEVO_WRIT 0 0 \n", "TAX_ST_HR_DEVO_TXP 0 0 \n", "TAX_ST_HR_DEVO_WRIT 0 0 \n", "TAX_ST_IR_DEVO_TXP 0 0 \n", "TAX_ST_SR_DEVO_TXP 0 0 \n", - "TAXINC 3980 15300 \n", - "TAXPAYER 2 1 \n", + "TAXINC 12900 8100 \n", + "TAXPAYER 1 1 \n", "TAXTERM 0 0 \n", "TEI 0 0 \n", - "TI 16480 27800 \n", - "TII 16480 27800 \n", - "TOTTAX_DEVO_TXP 0 2460 \n", + "TI 25400 20600 \n", + "TII 25400 20600 \n", + "TOTTAX_DEVO_TXP 470 1620 \n", "UBISJA 0 0 \n", "WELSH_TXP 0 0 \n", - "zzz_policyengine_adjusted_net_income 16480.0 27800.0 \n", - "zzz_policyengine_earned_taxable_income 0.0 14050.0 \n", + "zzz_policyengine_adjusted_net_income 25400.0 20600.0 \n", + "zzz_policyengine_earned_taxable_income 11650.0 6850.0 \n", "zzz_policyengine_employment_deductions 0.0 0.0 \n", "zzz_policyengine_gift_aid 0.0 0.0 \n", - "zzz_policyengine_income_tax 596.0 2210.0 \n", - "zzz_policyengine_other_tax_credits 0.0 600.0 \n", + "zzz_policyengine_income_tax 220.0 1370.0 \n", + "zzz_policyengine_marriage_allowance 1250.0 1250.0 \n", + "zzz_policyengine_other_tax_credits 2110.0 0.0 \n", "zzz_policyengine_personal_allowance 12500.0 12500.0 \n", - "zzz_policyengine_received_allowances 12500.0 12500.0 \n", + "zzz_policyengine_received_allowances 13750.0 13750.0 \n", "zzz_policyengine_savings_allowance 1000.0 1000.0 \n", "zzz_policyengine_taxable_employment_income 0.0 0.0 \n", - "zzz_policyengine_taxable_savings_interest_income 10500.0 0.0 \n", + "zzz_policyengine_taxable_savings_interest_income 0.0 0.0 \n", "zzz_policyengine_taxed_dividend_income 0.0 0.0 \n", - "zzz_policyengine_taxed_income 2980.0 14050.0 \n", - "zzz_policyengine_taxed_savings_income 2980.0 0.0 \n", + "zzz_policyengine_taxed_income 11650.0 6850.0 \n", + "zzz_policyengine_taxed_savings_income 0.0 0.0 \n", "\n", - " 670307 \n", + " 585148 \n", "abs_error 250.0 \n", "AGERANGE 5 \n", "BPADUE 0 \n", @@ -2812,11 +2847,11 @@ "FACT 53.399523 \n", "GIFTAID 0 \n", "GIFTINV 0 \n", - "GORCODE 14 \n", + "GORCODE 8 \n", "IIDF 0 \n", "INCBBS 0 \n", "INCPBEN 0 \n", - "INCPROP 20600 \n", + "INCPROP 26200 \n", "INDUSTRY07 1500 \n", "LLIR_RESTRICT_AMT_TOT 0 \n", "LOSSBF 0 \n", @@ -2840,39 +2875,40 @@ "SEISS 0 \n", "SEX 1 \n", "SPA 0 \n", - "SREF 15771989 \n", + "SREF 15675132 \n", "SRP 0 \n", "TAX_CRED 0 \n", "TAX_ST_AR_DEVO_TXP 0 \n", "TAX_ST_AR_DEVO_WRIT 0 \n", - "TAX_ST_BR_DEVO_TXP 1620 \n", + "TAX_ST_BR_DEVO_TXP 2740 \n", "TAX_ST_BR_DEVO_WRIT 0 \n", "TAX_ST_HR_DEVO_TXP 0 \n", "TAX_ST_HR_DEVO_WRIT 0 \n", "TAX_ST_IR_DEVO_TXP 0 \n", "TAX_ST_SR_DEVO_TXP 0 \n", - "TAXINC 8100 \n", + "TAXINC 13700 \n", "TAXPAYER 1 \n", "TAXTERM 0 \n", "TEI 0 \n", - "TI 20600 \n", - "TII 20600 \n", - "TOTTAX_DEVO_TXP 1620 \n", + "TI 26200 \n", + "TII 26200 \n", + "TOTTAX_DEVO_TXP 2740 \n", "UBISJA 0 \n", "WELSH_TXP 0 \n", - "zzz_policyengine_adjusted_net_income 20600.0 \n", - "zzz_policyengine_earned_taxable_income 6850.0 \n", + "zzz_policyengine_adjusted_net_income 26200.0 \n", + "zzz_policyengine_earned_taxable_income 12450.0 \n", "zzz_policyengine_employment_deductions 0.0 \n", "zzz_policyengine_gift_aid 0.0 \n", - "zzz_policyengine_income_tax 1370.0 \n", + "zzz_policyengine_income_tax 2490.0 \n", + "zzz_policyengine_marriage_allowance 1250.0 \n", "zzz_policyengine_other_tax_credits 0.0 \n", "zzz_policyengine_personal_allowance 12500.0 \n", - "zzz_policyengine_received_allowances 12500.0 \n", + "zzz_policyengine_received_allowances 13750.0 \n", "zzz_policyengine_savings_allowance 1000.0 \n", "zzz_policyengine_taxable_employment_income 0.0 \n", "zzz_policyengine_taxable_savings_interest_income 0.0 \n", "zzz_policyengine_taxed_dividend_income 0.0 \n", - "zzz_policyengine_taxed_income 6850.0 \n", + "zzz_policyengine_taxed_income 12450.0 \n", "zzz_policyengine_taxed_savings_income 0.0 " ] }, @@ -2892,7 +2928,7 @@ " (df['INCPROP'] != 0) &\n", " (df['PAS'] != 0) &\n", " (df['MOTHDED'] == 0) &\n", - " (df['abs_error'] < 998) &\n", + " (df['abs_error'] < 300) &\n", " # (df['abs_error'] < 1005) &\n", " (df['MAIND'] != -1) &\n", " (df['GIFTAID'] == 0)\n",