Repository: PolicyEngine/policyengine-uk (language: python)

Issue:
Add documentation page on SPI validation



Discussion / hints:

Fix patch:
diff --git a/changelog_entry.yaml b/changelog_entry.yaml
index e69de29bb..6886f31ae 100644
--- a/changelog_entry.yaml
+++ b/changelog_entry.yaml
@@ -0,0 +1,6 @@
+- bump: minor
+  changes:
+    fixed:
+    - Correct Scottish income tax rates for 2020/21
+    added:
+    - Docs page about SPI 2020/21 validation
\ No newline at end of file
diff --git a/docs/book/_toc.yml b/docs/book/_toc.yml
index e7559f085..7ee2d5404 100644
--- a/docs/book/_toc.yml
+++ b/docs/book/_toc.yml
@@ -16,6 +16,7 @@ parts:
       - file: programs/gov/dcms/bbc/tv-licence
       - file: programs/gov/revenue_scotland/land-and-buildings-transaction-tax
       - file: programs/gov/wra/land-transaction-tax
+      - file: model/spi-validation
   - caption: Using the model
     chapters:
       - file: usage/getting-started
diff --git a/docs/book/model/spi-validation.ipynb b/docs/book/model/spi-validation.ipynb
new file mode 100644
index 000000000..8cf8b5f45
--- /dev/null
+++ b/docs/book/model/spi-validation.ipynb
@@ -0,0 +1,80 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Validation against the Survey of Personal Incomes\n",
+    "\n",
+    "To ensure accuracy and precision, PolicyEngine's free and open-source simulation and microsimulation model is periodically validated against existing external datasets. This process involves taking external datasets meant to represent a particular slice of British society and loading their inputs, such as total individual employment income, into our data model. We then compare our calculated outputs with theirs in an effort to find discrepancies between the two. In this post, we'll describe our efforts to validate our model against the newly released Survey of Personal Incomes (SPI) 2020/21 dataset.\n",
+    "\n",
+    "## The UK Survey of Personal Incomes\n",
+    "\n",
+    "The Survey of Personal Incomes (SPI) is a comprehensive dataset produced by HM Revenue and Customs (HMRC). It provides detailed information on individuals' income, tax, and other financial data based on a sample of HMRC records. The SPI is among the most comprehensive UK individual-level financial datasets, and is used by HMRC, HM Treasury, and individual Members of Parliament, among others.[^1]\n",
+    "\n",
+    "## Validation results\n",
+    "\n",
+    "We chose to validate PolicyEngine against the SPI's total individual income, using the SPI's input variables to compare PolicyEngine UK's calculated total income tax against the SPI's reported amount. \n",
+    "\n",
+    "To do so, we first remove the SPI's \"composite records,\" which are used to represent smaller population groups as a collective. This group of records is only meant to be employed within society-wide modelling, and its outputs cannot be correctly computed using its inputs. This group of records contains 1,770 observations, representing around 0.2% of total records.\n",
+    "\n",
+    "We then treat relevant variables from the SPI 2020/21 dataset[^2] as input variables into the PolicyEngine UK model. Using this data, we run household-level simulations for each input and categorize the outputs logarithmically based on how close PolicyEngine's calculated 2020/21 total income tax is to that of the SPI. We treat a result within £10 as a match due to differences in rounding. Our final match statistics are displayed in the table below."
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {
+    "vscode": {
+     "languageId": "plaintext"
+    }
+   },
+   "source": [
+    "| Total error (£) | Percentage of all records |\n",
+    "|-----------------|---------------------------|\n",
+    "| <=10            | 92.7%                     |\n",
+    "| <100            | 93.5%                     |\n",
+    "| <1,000          | 98.3%                     |\n",
+    "| >=1,000         | 1.7%                      |"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "For 92.7% of individuals included within the SPI, PolicyEngine UK's calculated total income tax is within £10 of the SPI's calculated amount. We view this as a robust demonstration of PolicyEngine's accuracy and precision.\n",
+    "\n",
+    "## Analysing model discrepancies\n",
+    "\n",
+    "For the remaining records where our calculations do not closely match the SPI, we believe the differences are attributable to two main factors:\n",
+    "\n",
+    "1. Differences in input information: The SPI sometimes uses additional input data that is not available to PolicyEngine, leading to differences in calculations.\n",
+    "2. Structural differences: At times, the SPI model's structure differs from that of PolicyEngine in a way that complicates further model validation.\n",
+    "\n",
+    "Four relevant error clusters appeared among the records where the SPI and PolicyEngine calculate differing outputs:\n",
+    "\n",
+    "1. Cases where an individual appears to transfer a portion of their Personal Allowance to their spouse as part of the Marriage Allowance. This is because the SPI removes the transferred amount from the individual's Personal Allowance, but does not indicate that the subsequent lower amount is driven by the Marriage Allowance. This may represent as much as 37,998 records (4.8% of total).\n",
+    "1. Cases where an individual receives less than £100,000 in annual income and is non-resident for taxation purposes. In this situation, the individual receives £0 Personal Allowance, even though our model would project a full £12,500 allowance. The SPI uses a variable that is not publicly available to calculate this status. This represents 2,054 records (0.3% of total).\n",
+    "1. Cases where both the SPI and PolicyEngine calculate the same amount of taxable savings income for an individual receiving any form of savings income classified by the SPI as \"Other Investment Income\" (e.g., interest on securities), but the SPI finds that they owe around £1,000 more in income tax than we do. This represents 1,276 records (0.2% of total).\n",
+    "1. Cases where an individual near the Personal Allowance taper value who claims Gift Aid receives a full Personal Allowance of £12,500 within the SPI model. The SPI model's Gift Aid variable signifies the amount an individual deducts due to Gift Aid donations, while PolicyEngine's represents an individual's total Gift Aid-eligible donations. We then calculate the indivdual's deduction amount from this value. This error represents 738 records (0.1% of total).\n",
+    "\n",
+    "## Conclusion\n",
+    "PolicyEngine's UK model shows a high level of accordance with the SPI's 2020/21 data, with almost 93% of records with the same inputs returning the same total income tax calculation. While some discrepancies exist, they are limited in scope and often attributable to either testability limitations within the SPI's structure or to inputs that the SPI has not made publicly available. This validation exercise builds upon our previous validations, such as our [Autumn 2023 model calibration](https://policyengine.org/uk/research/uk-calibration-2023-q4). We welcome questions and comments on our findings or methodology - please feel free to [get in touch](mailto:contact@policyengine.org)."
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "[^1]: https://data.europa.eu/data/datasets/hmrc-survey-of-personal-incomes-spi?locale=en\n",
+    "[^2]: https://www.gov.uk/government/statistics/personal-incomes-statistics-for-the-tax-year-2020-to-2021"
+   ]
+  }
+ ],
+ "metadata": {
+  "language_info": {
+   "name": "python"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/policyengine_uk/parameters/gov/hmrc/income_tax/rates/scotland/post_starter_rate.yaml b/policyengine_uk/parameters/gov/hmrc/income_tax/rates/scotland/post_starter_rate.yaml
index 4a9433ea7..c0ade3c19 100644
--- a/policyengine_uk/parameters/gov/hmrc/income_tax/rates/scotland/post_starter_rate.yaml
+++ b/policyengine_uk/parameters/gov/hmrc/income_tax/rates/scotland/post_starter_rate.yaml
@@ -58,7 +58,7 @@ brackets:
     values:
       2018-06-01: 12_150
       2020-03-04: 
-        value: 12_444
+        value: 12_658
         reference:
           - title: "Capture in full: Tax rates 2020/21; Spring Budget 2020"
             href: https://taxscape.deloitte.com/taxtables/deloitte-uk-tax-rates-2020-21--updated.pdf
@@ -80,6 +80,7 @@ brackets:
       unit: /1
     values:
       2018-06-01: 0.4
+      2020-03-04: 0.41
   threshold:
     description: The threshold at which an individual pays the Scottish higher rate
     metadata:


Test patch:
diff --git a/test9.ipynb b/test9.ipynb
index 0fb8ebca6..e4d0305ca 100644
--- a/test9.ipynb
+++ b/test9.ipynb
@@ -30,7 +30,7 @@
     {
      "data": {
       "text/plain": [
-       "195.3940847496191"
+       "195.48206357797875"
       ]
      },
      "execution_count": 3,
@@ -69,21 +69,16 @@
     "    \"taxed_dividend_income\",\n",
     "    \"taxed_savings_income\",\n",
     "    \"earned_taxable_income\",\n",
-    "    \"taxable_pension_income\",\n",
-    "    \"savings_allowance\",\n",
-    "    \"received_allowances_savings_income\",\n",
-    "    \"savings_starter_rate_income\",\n",
-    "    \"basic_rate_savings_income_pre_starter\",\n",
-    "    \"taxable_savings_interest_income\",\n",
-    "    \"savings_allowance\",\n",
     "    \"earned_taxable_income\",\n",
     "    \"taxable_employment_income\",\n",
     "    \"employment_deductions\",\n",
-    "    \"employment_benefits\",\n",
-    "    \"basic_rate_savings_income\",\n",
-    "    \"higher_rate_savings_income\",\n",
-    "    \"add_rate_savings_income\",\n",
-    "    \"pays_scottish_income_tax\"\n",
+    "    \"gift_aid\",\n",
+    "    \"savings_allowance\",\n",
+    "    \"taxable_savings_interest_income\",\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",
@@ -136,11 +131,11 @@
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
-       "      <th>575248</th>\n",
-       "      <th>589754</th>\n",
-       "      <th>709563</th>\n",
-       "      <th>709428</th>\n",
-       "      <th>304375</th>\n",
+       "      <th>204501</th>\n",
+       "      <th>668506</th>\n",
+       "      <th>769908</th>\n",
+       "      <th>770166</th>\n",
+       "      <th>591136</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
@@ -154,11 +149,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>AGERANGE</th>\n",
-       "      <td>5</td>\n",
-       "      <td>6</td>\n",
-       "      <td>6</td>\n",
+       "      <td>4</td>\n",
+       "      <td>7</td>\n",
        "      <td>5</td>\n",
        "      <td>7</td>\n",
+       "      <td>7</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>BPADUE</th>\n",
@@ -194,23 +189,23 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>DIVIDENDS</th>\n",
-       "      <td>47200</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
-       "      <td>2000</td>\n",
-       "      <td>160</td>\n",
+       "      <td>18600</td>\n",
+       "      <td>350</td>\n",
+       "      <td>29600</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>DSHIPS</th>\n",
-       "      <td>1</td>\n",
        "      <td>3</td>\n",
        "      <td>3</td>\n",
+       "      <td>1</td>\n",
        "      <td>3</td>\n",
        "      <td>3</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>EIDF</th>\n",
-       "      <td>0</td>\n",
+       "      <td>315</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
@@ -218,18 +213,18 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>EMPINC</th>\n",
-       "      <td>17000</td>\n",
-       "      <td>17700</td>\n",
+       "      <td>12060</td>\n",
        "      <td>0</td>\n",
-       "      <td>9200</td>\n",
+       "      <td>41300</td>\n",
        "      <td>0</td>\n",
+       "      <td>2150</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>EPB</th>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
+       "      <td>32900</td>\n",
        "      <td>0</td>\n",
-       "      <td>6200</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
@@ -242,7 +237,7 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>EXPS</th>\n",
-       "      <td>0</td>\n",
+       "      <td>740</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
@@ -250,11 +245,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>FACT</th>\n",
-       "      <td>10.474315</td>\n",
-       "      <td>28.014512</td>\n",
-       "      <td>25.833991</td>\n",
-       "      <td>25.594814</td>\n",
-       "      <td>63.1219</td>\n",
+       "      <td>125.4422</td>\n",
+       "      <td>25.739566</td>\n",
+       "      <td>10.267938</td>\n",
+       "      <td>10.252325</td>\n",
+       "      <td>25.539031</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>GIFTAID</th>\n",
@@ -262,7 +257,7 @@
        "      <td>0</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
-       "      <td>150</td>\n",
+       "      <td>1660</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>GIFTINV</th>\n",
@@ -274,11 +269,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>GORCODE</th>\n",
-       "      <td>6</td>\n",
-       "      <td>1</td>\n",
        "      <td>3</td>\n",
-       "      <td>8</td>\n",
-       "      <td>9</td>\n",
+       "      <td>7</td>\n",
+       "      <td>3</td>\n",
+       "      <td>4</td>\n",
+       "      <td>5</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>IIDF</th>\n",
@@ -286,15 +281,15 @@
        "      <td>0</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
-       "      <td>150</td>\n",
+       "      <td>1660</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>INCBBS</th>\n",
-       "      <td>13400</td>\n",
-       "      <td>9710</td>\n",
-       "      <td>50</td>\n",
-       "      <td>29200</td>\n",
-       "      <td>4300</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>27200</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>INCPBEN</th>\n",
@@ -306,18 +301,18 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>INCPROP</th>\n",
-       "      <td>9600</td>\n",
        "      <td>0</td>\n",
-       "      <td>500</td>\n",
-       "      <td>13000</td>\n",
+       "      <td>0</td>\n",
+       "      <td>3800</td>\n",
+       "      <td>0</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>INDUSTRY07</th>\n",
-       "      <td></td>\n",
+       "      <td>Q</td>\n",
        "      <td>1600</td>\n",
+       "      <td>G</td>\n",
        "      <td>1600</td>\n",
-       "      <td>L</td>\n",
        "      <td>1600</td>\n",
        "    </tr>\n",
        "    <tr>\n",
@@ -325,7 +320,7 @@
        "      <td>0</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
-       "      <td>6770</td>\n",
+       "      <td>0</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
@@ -347,14 +342,14 @@
        "    <tr>\n",
        "      <th>MAINSRCE</th>\n",
        "      <td>1</td>\n",
+       "      <td>5</td>\n",
        "      <td>1</td>\n",
        "      <td>2</td>\n",
-       "      <td>1</td>\n",
        "      <td>2</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>MAR</th>\n",
-       "      <td>NSHR</td>\n",
+       "      <td>STBR</td>\n",
        "      <td>NSHR</td>\n",
        "      <td>NSHR</td>\n",
        "      <td>NSHR</td>\n",
@@ -378,11 +373,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>MOTHINC</th>\n",
-       "      <td>17000</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
+       "      <td>2150</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>OSSBEN</th>\n",
@@ -402,39 +397,39 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>OTHERINV</th>\n",
-       "      <td>11400</td>\n",
-       "      <td>0</td>\n",
-       "      <td>14900</td>\n",
-       "      <td>0</td>\n",
        "      <td>0</td>\n",
+       "      <td>35700</td>\n",
+       "      <td>29700</td>\n",
+       "      <td>82400</td>\n",
+       "      <td>730</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>PAS</th>\n",
+       "      <td>11250</td>\n",
        "      <td>12500</td>\n",
        "      <td>12500</td>\n",
-       "      <td>12500</td>\n",
-       "      <td>12500</td>\n",
+       "      <td>11000</td>\n",
        "      <td>12500</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>PAY</th>\n",
+       "      <td>12800</td>\n",
        "      <td>0</td>\n",
-       "      <td>17700</td>\n",
+       "      <td>8400</td>\n",
        "      <td>0</td>\n",
-       "      <td>3000</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>PENSION</th>\n",
        "      <td>0</td>\n",
-       "      <td>21500</td>\n",
-       "      <td>7690</td>\n",
+       "      <td>35700</td>\n",
        "      <td>0</td>\n",
-       "      <td>36400</td>\n",
+       "      <td>10600</td>\n",
+       "      <td>9430</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>PENSRLF</th>\n",
-       "      <td>0</td>\n",
+       "      <td>315</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
@@ -444,7 +439,7 @@
        "      <th>PROFITS</th>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
-       "      <td>28300</td>\n",
+       "      <td>0</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
@@ -468,7 +463,7 @@
        "      <th>SEINC_NUM</th>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
-       "      <td>1</td>\n",
+       "      <td>0</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
@@ -486,39 +481,39 @@
        "      <td>1</td>\n",
        "      <td>1</td>\n",
        "      <td>2</td>\n",
-       "      <td>2</td>\n",
+       "      <td>1</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>SPA</th>\n",
        "      <td>0</td>\n",
        "      <td>1</td>\n",
-       "      <td>1</td>\n",
        "      <td>0</td>\n",
        "      <td>1</td>\n",
+       "      <td>1</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>SREF</th>\n",
-       "      <td>15663820</td>\n",
-       "      <td>15680336</td>\n",
-       "      <td>15816666</td>\n",
-       "      <td>15816519</td>\n",
-       "      <td>15368458</td>\n",
+       "      <td>15268377</td>\n",
+       "      <td>15769902</td>\n",
+       "      <td>15885515</td>\n",
+       "      <td>15885802</td>\n",
+       "      <td>15681873</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>SRP</th>\n",
        "      <td>0</td>\n",
-       "      <td>8690</td>\n",
-       "      <td>8410</td>\n",
        "      <td>0</td>\n",
-       "      <td>10400</td>\n",
+       "      <td>0</td>\n",
+       "      <td>9650</td>\n",
+       "      <td>16900</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAX_CRED</th>\n",
-       "      <td>605</td>\n",
        "      <td>0</td>\n",
+       "      <td>6300</td>\n",
        "      <td>0</td>\n",
-       "      <td>1355</td>\n",
        "      <td>0</td>\n",
+       "      <td>255</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAX_ST_AR_DEVO_TXP</th>\n",
@@ -538,11 +533,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAX_ST_BR_DEVO_TXP</th>\n",
-       "      <td>2745</td>\n",
-       "      <td>7080</td>\n",
-       "      <td>6480</td>\n",
-       "      <td>1610</td>\n",
-       "      <td>6830</td>\n",
+       "      <td>100</td>\n",
+       "      <td>2810</td>\n",
+       "      <td>6520</td>\n",
+       "      <td>1850</td>\n",
+       "      <td>2825</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAX_ST_BR_DEVO_WRIT</th>\n",
@@ -586,11 +581,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAXINC</th>\n",
-       "      <td>86100</td>\n",
-       "      <td>45100</td>\n",
-       "      <td>47350</td>\n",
-       "      <td>40900</td>\n",
-       "      <td>38610</td>\n",
+       "      <td>495</td>\n",
+       "      <td>58900</td>\n",
+       "      <td>80900</td>\n",
+       "      <td>92000</td>\n",
+       "      <td>71850</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAXPAYER</th>\n",
@@ -610,35 +605,35 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TEI</th>\n",
-       "      <td>17000</td>\n",
-       "      <td>47890</td>\n",
-       "      <td>44400</td>\n",
-       "      <td>9200</td>\n",
-       "      <td>46800</td>\n",
+       "      <td>12060</td>\n",
+       "      <td>35700</td>\n",
+       "      <td>41300</td>\n",
+       "      <td>20250</td>\n",
+       "      <td>28480</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TI</th>\n",
-       "      <td>98600</td>\n",
-       "      <td>57600</td>\n",
-       "      <td>59850</td>\n",
-       "      <td>53400</td>\n",
-       "      <td>51260</td>\n",
+       "      <td>12060</td>\n",
+       "      <td>71400</td>\n",
+       "      <td>93400</td>\n",
+       "      <td>103000</td>\n",
+       "      <td>86010</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TII</th>\n",
-       "      <td>81600</td>\n",
-       "      <td>9710</td>\n",
-       "      <td>15450</td>\n",
-       "      <td>44200</td>\n",
-       "      <td>4460</td>\n",
+       "      <td>0</td>\n",
+       "      <td>35700</td>\n",
+       "      <td>52100</td>\n",
+       "      <td>82750</td>\n",
+       "      <td>57530</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TOTTAX_DEVO_TXP</th>\n",
-       "      <td>22045</td>\n",
-       "      <td>10440</td>\n",
-       "      <td>11340</td>\n",
-       "      <td>6605</td>\n",
-       "      <td>7780</td>\n",
+       "      <td>100</td>\n",
+       "      <td>9660</td>\n",
+       "      <td>22715</td>\n",
+       "      <td>29060</td>\n",
+       "      <td>18015</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>UBISJA</th>\n",
@@ -657,108 +652,92 @@
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_add_rate_savings_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
        "      <th>zzz_policyengine_adjusted_net_income</th>\n",
-       "      <td>98600.0</td>\n",
-       "      <td>57600.0</td>\n",
-       "      <td>59850.0</td>\n",
-       "      <td>53400.0</td>\n",
-       "      <td>51260.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_basic_rate_savings_income</th>\n",
-       "      <td>23400.0</td>\n",
-       "      <td>2110.0</td>\n",
-       "      <td>5100.0</td>\n",
-       "      <td>27800.0</td>\n",
-       "      <td>3350.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_basic_rate_savings_income_pre_starter</th>\n",
-       "      <td>23400.0</td>\n",
-       "      <td>2110.0</td>\n",
-       "      <td>5100.0</td>\n",
-       "      <td>27800.0</td>\n",
-       "      <td>3350.0</td>\n",
+       "      <td>12060.0</td>\n",
+       "      <td>71400.0</td>\n",
+       "      <td>93400.0</td>\n",
+       "      <td>103000.0</td>\n",
+       "      <td>86010.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_earned_taxable_income</th>\n",
-       "      <td>14100.0</td>\n",
-       "      <td>35390.0</td>\n",
-       "      <td>32400.0</td>\n",
-       "      <td>9700.0</td>\n",
-       "      <td>34150.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>23200.0</td>\n",
+       "      <td>32600.0</td>\n",
+       "      <td>9250.0</td>\n",
+       "      <td>14320.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_employment_benefits</th>\n",
-       "      <td>0.0</td>\n",
+       "      <th>zzz_policyengine_employment_deductions</th>\n",
+       "      <td>740.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_employment_deductions</th>\n",
+       "      <th>zzz_policyengine_gift_aid</th>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_higher_rate_savings_income</th>\n",
-       "      <td>900.0</td>\n",
-       "      <td>7100.0</td>\n",
-       "      <td>9350.0</td>\n",
-       "      <td>900.0</td>\n",
-       "      <td>450.0</td>\n",
+       "      <td>1660.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_income_tax</th>\n",
-       "      <td>21945.0</td>\n",
-       "      <td>10340.0</td>\n",
-       "      <td>11240.0</td>\n",
-       "      <td>6505.0</td>\n",
-       "      <td>7680.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>9560.0</td>\n",
+       "      <td>22615.0</td>\n",
+       "      <td>28960.0</td>\n",
+       "      <td>17915.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_other_tax_credits</th>\n",
-       "      <td>605.0</td>\n",
+       "      <th>zzz_policyengine_marriage_allowance</th>\n",
+       "      <td>0.0</td>\n",
+       "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
-       "      <td>1355.0</td>\n",
        "      <td>0.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_pays_scottish_income_tax</th>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
+       "      <th>zzz_policyengine_other_tax_credits</th>\n",
+       "      <td>0.0</td>\n",
+       "      <td>6300.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>255.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_personal_allowance</th>\n",
        "      <td>12500.0</td>\n",
        "      <td>12500.0</td>\n",
        "      <td>12500.0</td>\n",
-       "      <td>12500.0</td>\n",
+       "      <td>11000.0</td>\n",
        "      <td>12500.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_received_allowances</th>\n",
+       "      <td>12060.0</td>\n",
        "      <td>12500.0</td>\n",
        "      <td>12500.0</td>\n",
+       "      <td>11000.0</td>\n",
+       "      <td>14160.0</td>\n",
+       "    </tr>\n",
+       "    <tr>\n",
+       "      <th>zzz_policyengine_received_allowances_dividend_income</th>\n",
+       "      <td>0.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>0.0</td>\n",
+       "    </tr>\n",
+       "    <tr>\n",
+       "      <th>zzz_policyengine_received_allowances_earned_income</th>\n",
+       "      <td>12060.0</td>\n",
        "      <td>12500.0</td>\n",
        "      <td>12500.0</td>\n",
-       "      <td>12650.0</td>\n",
+       "      <td>11000.0</td>\n",
+       "      <td>14160.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_received_allowances_savings_income</th>\n",
@@ -770,336 +749,308 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_savings_allowance</th>\n",
+       "      <td>1000.0</td>\n",
        "      <td>500.0</td>\n",
        "      <td>500.0</td>\n",
        "      <td>500.0</td>\n",
        "      <td>500.0</td>\n",
-       "      <td>500.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_savings_starter_rate_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_taxable_employment_income</th>\n",
+       "      <td>12060.0</td>\n",
        "      <td>0.0</td>\n",
-       "      <td>17700.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>9200.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_taxable_pension_income</th>\n",
+       "      <td>41300.0</td>\n",
        "      <td>0.0</td>\n",
-       "      <td>21500.0</td>\n",
-       "      <td>7690.0</td>\n",
        "      <td>0.0</td>\n",
-       "      <td>36400.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_taxable_savings_interest_income</th>\n",
-       "      <td>24800.0</td>\n",
-       "      <td>9710.0</td>\n",
-       "      <td>14950.0</td>\n",
-       "      <td>29200.0</td>\n",
-       "      <td>4300.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>35700.0</td>\n",
+       "      <td>29700.0</td>\n",
+       "      <td>82400.0</td>\n",
+       "      <td>27930.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_taxed_dividend_income</th>\n",
-       "      <td>45200.0</td>\n",
-       "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
+       "      <td>16600.0</td>\n",
        "      <td>0.0</td>\n",
+       "      <td>27600.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_taxed_income</th>\n",
-       "      <td>83600.0</td>\n",
-       "      <td>44600.0</td>\n",
-       "      <td>46850.0</td>\n",
-       "      <td>38400.0</td>\n",
-       "      <td>37950.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>58400.0</td>\n",
+       "      <td>78400.0</td>\n",
+       "      <td>91150.0</td>\n",
+       "      <td>69350.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_taxed_savings_income</th>\n",
-       "      <td>24300.0</td>\n",
-       "      <td>9210.0</td>\n",
-       "      <td>14450.0</td>\n",
-       "      <td>28700.0</td>\n",
-       "      <td>3800.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>35200.0</td>\n",
+       "      <td>29200.0</td>\n",
+       "      <td>81900.0</td>\n",
+       "      <td>27430.0</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "text/plain": [
-       "                                                       575248     589754  \\\n",
+       "                                                      204501     668506  \\\n",
+       "abs_error                                              100.0      100.0   \n",
+       "AGERANGE                                                   4          7   \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                                                     315          0   \n",
+       "EMPINC                                                 12060          0   \n",
+       "EPB                                                        0          0   \n",
+       "error                                                 -100.0     -100.0   \n",
+       "EXPS                                                     740          0   \n",
+       "FACT                                                125.4422  25.739566   \n",
+       "GIFTAID                                                    0          0   \n",
+       "GIFTINV                                                    0          0   \n",
+       "GORCODE                                                    3          7   \n",
+       "IIDF                                                       0          0   \n",
+       "INCBBS                                                     0          0   \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",
+       "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",
+       "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",
+       "SRP                                                        0          0   \n",
+       "TAX_CRED                                                   0       6300   \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_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",
+       "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",
+       "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_gift_aid                                0.0        0.0   \n",
+       "zzz_policyengine_income_tax                              0.0     9560.0   \n",
+       "zzz_policyengine_marriage_allowance                      0.0        0.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_received_allowances_dividend_i...       0.0        0.0   \n",
+       "zzz_policyengine_received_allowances_earned_income   12060.0    12500.0   \n",
+       "zzz_policyengine_received_allowances_savings_in...       0.0        0.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_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          6   \n",
+       "AGERANGE                                                    5          7   \n",
        "BPADUE                                                      0          0   \n",
        "CAPALL                                                      0          0   \n",
        "COVNTS                                                      0          0   \n",
        "DEFICIEN                                                    0          0   \n",
-       "DIVIDENDS                                               47200          0   \n",
+       "DIVIDENDS                                               18600        350   \n",
        "DSHIPS                                                      1          3   \n",
        "EIDF                                                        0          0   \n",
-       "EMPINC                                                  17000      17700   \n",
-       "EPB                                                         0          0   \n",
+       "EMPINC                                                  41300          0   \n",
+       "EPB                                                     32900          0   \n",
        "error                                                  -100.0     -100.0   \n",
        "EXPS                                                        0          0   \n",
-       "FACT                                                10.474315  28.014512   \n",
+       "FACT                                                10.267938  10.252325   \n",
        "GIFTAID                                                     0          0   \n",
        "GIFTINV                                                     0          0   \n",
-       "GORCODE                                                     6          1   \n",
+       "GORCODE                                                     3          4   \n",
        "IIDF                                                        0          0   \n",
-       "INCBBS                                                  13400       9710   \n",
+       "INCBBS                                                      0          0   \n",
        "INCPBEN                                                     0          0   \n",
-       "INCPROP                                                  9600          0   \n",
-       "INDUSTRY07                                                          1600   \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          1   \n",
+       "MAINSRCE                                                    1          2   \n",
        "MAR                                                      NSHR       NSHR   \n",
        "MCAS                                                        0          0   \n",
        "MOTHDED                                                     0          0   \n",
-       "MOTHINC                                                 17000          0   \n",
+       "MOTHINC                                                     0          0   \n",
        "OSSBEN                                                      0          0   \n",
        "OTHERINC                                                    0          0   \n",
-       "OTHERINV                                                11400          0   \n",
-       "PAS                                                     12500      12500   \n",
-       "PAY                                                         0      17700   \n",
-       "PENSION                                                     0      21500   \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                                                         2          1   \n",
-       "SPA                                                         0          1   \n",
-       "SREF                                                 15663820   15680336   \n",
-       "SRP                                                         0       8690   \n",
-       "TAX_CRED                                                  605          0   \n",
-       "TAX_ST_AR_DEVO_TXP                                          0          0   \n",
-       "TAX_ST_AR_DEVO_WRIT                                         0          0   \n",
-       "TAX_ST_BR_DEVO_TXP                                       2745       7080   \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                                                  86100      45100   \n",
-       "TAXPAYER                                                    1          1   \n",
-       "TAXTERM                                                     0          0   \n",
-       "TEI                                                     17000      47890   \n",
-       "TI                                                      98600      57600   \n",
-       "TII                                                     81600       9710   \n",
-       "TOTTAX_DEVO_TXP                                         22045      10440   \n",
-       "UBISJA                                                      0          0   \n",
-       "WELSH_TXP                                                   0          0   \n",
-       "zzz_policyengine_add_rate_savings_income                  0.0        0.0   \n",
-       "zzz_policyengine_adjusted_net_income                  98600.0    57600.0   \n",
-       "zzz_policyengine_basic_rate_savings_income            23400.0     2110.0   \n",
-       "zzz_policyengine_basic_rate_savings_income_pre_...    23400.0     2110.0   \n",
-       "zzz_policyengine_earned_taxable_income                14100.0    35390.0   \n",
-       "zzz_policyengine_employment_benefits                      0.0        0.0   \n",
-       "zzz_policyengine_employment_deductions                    0.0        0.0   \n",
-       "zzz_policyengine_higher_rate_savings_income             900.0     7100.0   \n",
-       "zzz_policyengine_income_tax                           21945.0    10340.0   \n",
-       "zzz_policyengine_other_tax_credits                      605.0        0.0   \n",
-       "zzz_policyengine_pays_scottish_income_tax               False      False   \n",
-       "zzz_policyengine_personal_allowance                   12500.0    12500.0   \n",
-       "zzz_policyengine_received_allowances                  12500.0    12500.0   \n",
-       "zzz_policyengine_received_allowances_savings_in...        0.0        0.0   \n",
-       "zzz_policyengine_savings_allowance                      500.0      500.0   \n",
-       "zzz_policyengine_savings_starter_rate_income              0.0        0.0   \n",
-       "zzz_policyengine_taxable_employment_income                0.0    17700.0   \n",
-       "zzz_policyengine_taxable_pension_income                   0.0    21500.0   \n",
-       "zzz_policyengine_taxable_savings_interest_income      24800.0     9710.0   \n",
-       "zzz_policyengine_taxed_dividend_income                45200.0        0.0   \n",
-       "zzz_policyengine_taxed_income                         83600.0    44600.0   \n",
-       "zzz_policyengine_taxed_savings_income                 24300.0     9210.0   \n",
-       "\n",
-       "                                                       709563     709428  \\\n",
-       "abs_error                                               100.0      100.0   \n",
-       "AGERANGE                                                    6          5   \n",
-       "BPADUE                                                      0          0   \n",
-       "CAPALL                                                      0          0   \n",
-       "COVNTS                                                      0          0   \n",
-       "DEFICIEN                                                    0          0   \n",
-       "DIVIDENDS                                                   0       2000   \n",
-       "DSHIPS                                                      3          3   \n",
-       "EIDF                                                        0          0   \n",
-       "EMPINC                                                      0       9200   \n",
-       "EPB                                                         0       6200   \n",
-       "error                                                  -100.0     -100.0   \n",
-       "EXPS                                                        0          0   \n",
-       "FACT                                                25.833991  25.594814   \n",
-       "GIFTAID                                                     0          0   \n",
-       "GIFTINV                                                     0          0   \n",
-       "GORCODE                                                     3          8   \n",
-       "IIDF                                                        0          0   \n",
-       "INCBBS                                                     50      29200   \n",
-       "INCPBEN                                                     0          0   \n",
-       "INCPROP                                                   500      13000   \n",
-       "INDUSTRY07                                               1600          L   \n",
-       "LLIR_RESTRICT_AMT_TOT                                       0       6770   \n",
-       "LOSSBF                                                      0          0   \n",
-       "MAIND                                                       0          0   \n",
-       "MAINSRCE                                                    2          1   \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                                                14900          0   \n",
-       "PAS                                                     12500      12500   \n",
-       "PAY                                                         0       3000   \n",
-       "PENSION                                                  7690          0   \n",
-       "PENSRLF                                                     0          0   \n",
-       "PROFITS                                                 28300          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                                                         1          0   \n",
-       "SREF                                                 15816666   15816519   \n",
-       "SRP                                                      8410          0   \n",
-       "TAX_CRED                                                    0       1355   \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                                       6480       1610   \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                                                  47350      40900   \n",
+       "TAXINC                                                  80900      92000   \n",
        "TAXPAYER                                                    1          1   \n",
        "TAXTERM                                                     0          0   \n",
-       "TEI                                                     44400       9200   \n",
-       "TI                                                      59850      53400   \n",
-       "TII                                                     15450      44200   \n",
-       "TOTTAX_DEVO_TXP                                         11340       6605   \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_add_rate_savings_income                  0.0        0.0   \n",
-       "zzz_policyengine_adjusted_net_income                  59850.0    53400.0   \n",
-       "zzz_policyengine_basic_rate_savings_income             5100.0    27800.0   \n",
-       "zzz_policyengine_basic_rate_savings_income_pre_...     5100.0    27800.0   \n",
-       "zzz_policyengine_earned_taxable_income                32400.0     9700.0   \n",
-       "zzz_policyengine_employment_benefits                      0.0        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_higher_rate_savings_income            9350.0      900.0   \n",
-       "zzz_policyengine_income_tax                           11240.0     6505.0   \n",
-       "zzz_policyengine_other_tax_credits                        0.0     1355.0   \n",
-       "zzz_policyengine_pays_scottish_income_tax               False      False   \n",
-       "zzz_policyengine_personal_allowance                   12500.0    12500.0   \n",
-       "zzz_policyengine_received_allowances                  12500.0    12500.0   \n",
+       "zzz_policyengine_gift_aid                                 0.0        0.0   \n",
+       "zzz_policyengine_income_tax                           22615.0    28960.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    11000.0   \n",
+       "zzz_policyengine_received_allowances                  12500.0    11000.0   \n",
+       "zzz_policyengine_received_allowances_dividend_i...        0.0        0.0   \n",
+       "zzz_policyengine_received_allowances_earned_income    12500.0    11000.0   \n",
        "zzz_policyengine_received_allowances_savings_in...        0.0        0.0   \n",
        "zzz_policyengine_savings_allowance                      500.0      500.0   \n",
-       "zzz_policyengine_savings_starter_rate_income              0.0        0.0   \n",
-       "zzz_policyengine_taxable_employment_income                0.0     9200.0   \n",
-       "zzz_policyengine_taxable_pension_income                7690.0        0.0   \n",
-       "zzz_policyengine_taxable_savings_interest_income      14950.0    29200.0   \n",
-       "zzz_policyengine_taxed_dividend_income                    0.0        0.0   \n",
-       "zzz_policyengine_taxed_income                         46850.0    38400.0   \n",
-       "zzz_policyengine_taxed_savings_income                 14450.0    28700.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",
        "\n",
-       "                                                      304375  \n",
-       "abs_error                                              100.0  \n",
-       "AGERANGE                                                   7  \n",
-       "BPADUE                                                     0  \n",
-       "CAPALL                                                     0  \n",
-       "COVNTS                                                     0  \n",
-       "DEFICIEN                                                   0  \n",
-       "DIVIDENDS                                                160  \n",
-       "DSHIPS                                                     3  \n",
-       "EIDF                                                       0  \n",
-       "EMPINC                                                     0  \n",
-       "EPB                                                        0  \n",
-       "error                                                 -100.0  \n",
-       "EXPS                                                       0  \n",
-       "FACT                                                 63.1219  \n",
-       "GIFTAID                                                  150  \n",
-       "GIFTINV                                                    0  \n",
-       "GORCODE                                                    9  \n",
-       "IIDF                                                     150  \n",
-       "INCBBS                                                  4300  \n",
-       "INCPBEN                                                    0  \n",
-       "INCPROP                                                    0  \n",
-       "INDUSTRY07                                              1600  \n",
-       "LLIR_RESTRICT_AMT_TOT                                      0  \n",
-       "LOSSBF                                                     0  \n",
-       "MAIND                                                      0  \n",
-       "MAINSRCE                                                   2  \n",
-       "MAR                                                     NSHR  \n",
-       "MCAS                                                       0  \n",
-       "MOTHDED                                                    0  \n",
-       "MOTHINC                                                    0  \n",
-       "OSSBEN                                                     0  \n",
-       "OTHERINC                                                   0  \n",
-       "OTHERINV                                                   0  \n",
-       "PAS                                                    12500  \n",
-       "PAY                                                        0  \n",
-       "PENSION                                                36400  \n",
-       "PENSRLF                                                    0  \n",
-       "PROFITS                                                    0  \n",
-       "PSAV_XS                                                    0  \n",
-       "SCOT_TXP                                                   0  \n",
-       "SEINC_NUM                                                  0  \n",
-       "SEISS                                                      0  \n",
-       "SEX                                                        2  \n",
-       "SPA                                                        1  \n",
-       "SREF                                                15368458  \n",
-       "SRP                                                    10400  \n",
-       "TAX_CRED                                                   0  \n",
-       "TAX_ST_AR_DEVO_TXP                                         0  \n",
-       "TAX_ST_AR_DEVO_WRIT                                        0  \n",
-       "TAX_ST_BR_DEVO_TXP                                      6830  \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                                                 38610  \n",
-       "TAXPAYER                                                   1  \n",
-       "TAXTERM                                                    0  \n",
-       "TEI                                                    46800  \n",
-       "TI                                                     51260  \n",
-       "TII                                                     4460  \n",
-       "TOTTAX_DEVO_TXP                                         7780  \n",
-       "UBISJA                                                     0  \n",
-       "WELSH_TXP                                                  0  \n",
-       "zzz_policyengine_add_rate_savings_income                 0.0  \n",
-       "zzz_policyengine_adjusted_net_income                 51260.0  \n",
-       "zzz_policyengine_basic_rate_savings_income            3350.0  \n",
-       "zzz_policyengine_basic_rate_savings_income_pre_...    3350.0  \n",
-       "zzz_policyengine_earned_taxable_income               34150.0  \n",
-       "zzz_policyengine_employment_benefits                     0.0  \n",
-       "zzz_policyengine_employment_deductions                   0.0  \n",
-       "zzz_policyengine_higher_rate_savings_income            450.0  \n",
-       "zzz_policyengine_income_tax                           7680.0  \n",
-       "zzz_policyengine_other_tax_credits                       0.0  \n",
-       "zzz_policyengine_pays_scottish_income_tax              False  \n",
-       "zzz_policyengine_personal_allowance                  12500.0  \n",
-       "zzz_policyengine_received_allowances                 12650.0  \n",
-       "zzz_policyengine_received_allowances_savings_in...       0.0  \n",
-       "zzz_policyengine_savings_allowance                     500.0  \n",
-       "zzz_policyengine_savings_starter_rate_income             0.0  \n",
-       "zzz_policyengine_taxable_employment_income               0.0  \n",
-       "zzz_policyengine_taxable_pension_income              36400.0  \n",
-       "zzz_policyengine_taxable_savings_interest_income      4300.0  \n",
-       "zzz_policyengine_taxed_dividend_income                   0.0  \n",
-       "zzz_policyengine_taxed_income                        37950.0  \n",
-       "zzz_policyengine_taxed_savings_income                 3800.0  "
+       "                                                       591136  \n",
+       "abs_error                                               100.0  \n",
+       "AGERANGE                                                    7  \n",
+       "BPADUE                                                      0  \n",
+       "CAPALL                                                      0  \n",
+       "COVNTS                                                      0  \n",
+       "DEFICIEN                                                    0  \n",
+       "DIVIDENDS                                               29600  \n",
+       "DSHIPS                                                      3  \n",
+       "EIDF                                                        0  \n",
+       "EMPINC                                                   2150  \n",
+       "EPB                                                         0  \n",
+       "error                                                  -100.0  \n",
+       "EXPS                                                        0  \n",
+       "FACT                                                25.539031  \n",
+       "GIFTAID                                                  1660  \n",
+       "GIFTINV                                                     0  \n",
+       "GORCODE                                                     5  \n",
+       "IIDF                                                     1660  \n",
+       "INCBBS                                                  27200  \n",
+       "INCPBEN                                                     0  \n",
+       "INCPROP                                                     0  \n",
+       "INDUSTRY07                                               1600  \n",
+       "LLIR_RESTRICT_AMT_TOT                                       0  \n",
+       "LOSSBF                                                      0  \n",
+       "MAIND                                                       0  \n",
+       "MAINSRCE                                                    2  \n",
+       "MAR                                                      NSHR  \n",
+       "MCAS                                                        0  \n",
+       "MOTHDED                                                     0  \n",
+       "MOTHINC                                                  2150  \n",
+       "OSSBEN                                                      0  \n",
+       "OTHERINC                                                    0  \n",
+       "OTHERINV                                                  730  \n",
+       "PAS                                                     12500  \n",
+       "PAY                                                         0  \n",
+       "PENSION                                                  9430  \n",
+       "PENSRLF                                                     0  \n",
+       "PROFITS                                                     0  \n",
+       "PSAV_XS                                                     0  \n",
+       "SCOT_TXP                                                    0  \n",
+       "SEINC_NUM                                                   0  \n",
+       "SEISS                                                       0  \n",
+       "SEX                                                         1  \n",
+       "SPA                                                         1  \n",
+       "SREF                                                 15681873  \n",
+       "SRP                                                     16900  \n",
+       "TAX_CRED                                                  255  \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_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",
+       "TAXPAYER                                                    1  \n",
+       "TAXTERM                                                     0  \n",
+       "TEI                                                     28480  \n",
+       "TI                                                      86010  \n",
+       "TII                                                     57530  \n",
+       "TOTTAX_DEVO_TXP                                         18015  \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_employment_deductions                    0.0  \n",
+       "zzz_policyengine_gift_aid                              1660.0  \n",
+       "zzz_policyengine_income_tax                           17915.0  \n",
+       "zzz_policyengine_marriage_allowance                       0.0  \n",
+       "zzz_policyengine_other_tax_credits                      255.0  \n",
+       "zzz_policyengine_personal_allowance                   12500.0  \n",
+       "zzz_policyengine_received_allowances                  14160.0  \n",
+       "zzz_policyengine_received_allowances_dividend_i...        0.0  \n",
+       "zzz_policyengine_received_allowances_earned_income    14160.0  \n",
+       "zzz_policyengine_received_allowances_savings_in...        0.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  "
       ]
      },
      "execution_count": 7,
@@ -1118,23 +1069,22 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 8,
+   "execution_count": 11,
    "metadata": {},
    "outputs": [
     {
-     "data": {
-      "text/plain": [
-       "abs_error\n",
-       "<=10      91.265491\n",
-       "<1000      5.586080\n",
-       ">=1000     1.999022\n",
-       "<100       1.149407\n",
-       "Name: proportion, dtype: float64"
-      ]
-     },
-     "execution_count": 8,
-     "metadata": {},
-     "output_type": "execute_result"
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "abs_error\n",
+      "<=10      92.685731\n",
+      "<1000      4.806584\n",
+      ">=1000     1.671160\n",
+      "<100       0.836525\n",
+      "Name: proportion, dtype: float64\n",
+      "\n",
+      "(794119, 82)\n"
+     ]
     }
    ],
    "source": [
@@ -1147,1018 +1097,93 @@
     "        return \"<1000\"\n",
     "    else:\n",
     "        return \">=1000\"\n",
-    "df.abs_error.apply(error_category).value_counts(normalize=True) * 100\n",
-    "\n",
-    "\n",
-    "#495286"
+    "print(df[df.MAIND != -1].abs_error.apply(error_category).value_counts(normalize=True) * 100)\n",
+    "print(f\"\\n{df[df.MAIND != -1].shape}\")"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 9,
+   "execution_count": 17,
    "metadata": {},
    "outputs": [
     {
-     "data": {
-      "text/html": [
-       "<div>\n",
-       "<style scoped>\n",
-       "    .dataframe tbody tr th:only-of-type {\n",
-       "        vertical-align: middle;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe tbody tr th {\n",
-       "        vertical-align: top;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe thead th {\n",
-       "        text-align: right;\n",
-       "    }\n",
-       "</style>\n",
-       "<table border=\"1\" class=\"dataframe\">\n",
-       "  <thead>\n",
-       "    <tr style=\"text-align: right;\">\n",
-       "      <th></th>\n",
-       "      <th>79574</th>\n",
-       "      <th>201397</th>\n",
-       "      <th>200975</th>\n",
-       "      <th>520288</th>\n",
-       "      <th>524966</th>\n",
-       "    </tr>\n",
-       "  </thead>\n",
-       "  <tbody>\n",
-       "    <tr>\n",
-       "      <th>abs_error</th>\n",
-       "      <td>250.0</td>\n",
-       "      <td>250.0</td>\n",
-       "      <td>250.0</td>\n",
-       "      <td>250.0</td>\n",
-       "      <td>250.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>AGERANGE</th>\n",
-       "      <td>4</td>\n",
-       "      <td>5</td>\n",
-       "      <td>5</td>\n",
-       "      <td>5</td>\n",
-       "      <td>7</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>BPADUE</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>CAPALL</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>COVNTS</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>DEFICIEN</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>DIVIDENDS</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>92600</td>\n",
-       "      <td>55</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>DSHIPS</th>\n",
-       "      <td>3</td>\n",
-       "      <td>3</td>\n",
-       "      <td>3</td>\n",
-       "      <td>3</td>\n",
-       "      <td>3</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>EIDF</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>EMPINC</th>\n",
-       "      <td>12500</td>\n",
-       "      <td>3500</td>\n",
-       "      <td>0</td>\n",
-       "      <td>8780</td>\n",
-       "      <td>30</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>EPB</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>error</th>\n",
-       "      <td>-250.0</td>\n",
-       "      <td>-250.0</td>\n",
-       "      <td>-250.0</td>\n",
-       "      <td>-250.0</td>\n",
-       "      <td>250.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>EXPS</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>FACT</th>\n",
-       "      <td>57.1795</td>\n",
-       "      <td>103.8659</td>\n",
-       "      <td>125.4422</td>\n",
-       "      <td>10.267938</td>\n",
-       "      <td>52.477097</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>GIFTAID</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>GIFTINV</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>GORCODE</th>\n",
-       "      <td>10</td>\n",
-       "      <td>10</td>\n",
-       "      <td>2</td>\n",
-       "      <td>9</td>\n",
-       "      <td>9</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>IIDF</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>INCBBS</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>955</td>\n",
-       "      <td>3910</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>INCPBEN</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>INCPROP</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>4290</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>INDUSTRY07</th>\n",
-       "      <td>F</td>\n",
-       "      <td>1600</td>\n",
-       "      <td>1600</td>\n",
-       "      <td>Q</td>\n",
-       "      <td>1600</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>LLIR_RESTRICT_AMT_TOT</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>LOSSBF</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>MAIND</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>MAINSRCE</th>\n",
-       "      <td>1</td>\n",
-       "      <td>2</td>\n",
-       "      <td>2</td>\n",
-       "      <td>1</td>\n",
-       "      <td>2</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>MAR</th>\n",
-       "      <td>STBR</td>\n",
-       "      <td>STBR</td>\n",
-       "      <td>STBR</td>\n",
-       "      <td>DVHR</td>\n",
-       "      <td>NONTP</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>MCAS</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>MOTHDED</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>MOTHINC</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>30</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>OSSBEN</th>\n",
-       "      <td>0</td>\n",
-       "      <td>3500</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>OTHERINC</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>OTHERINV</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>PAS</th>\n",
-       "      <td>11250</td>\n",
-       "      <td>11250</td>\n",
-       "      <td>11250</td>\n",
-       "      <td>11335</td>\n",
-       "      <td>12500</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>PAY</th>\n",
-       "      <td>12500</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>8780</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>PENSION</th>\n",
-       "      <td>0</td>\n",
-       "      <td>9000</td>\n",
-       "      <td>12500</td>\n",
-       "      <td>0</td>\n",
-       "      <td>2330</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>PENSRLF</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>PROFITS</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>PSAV_XS</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>SCOT_TXP</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>SEINC_NUM</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>SEISS</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>SEX</th>\n",
-       "      <td>1</td>\n",
-       "      <td>1</td>\n",
-       "      <td>2</td>\n",
-       "      <td>2</td>\n",
-       "      <td>2</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>SPA</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>1</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>SREF</th>\n",
-       "      <td>15143186</td>\n",
-       "      <td>15265269</td>\n",
-       "      <td>15264845</td>\n",
-       "      <td>15601122</td>\n",
-       "      <td>15606453</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>SRP</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>4190</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAX_CRED</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>19800</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAX_ST_AR_DEVO_TXP</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAX_ST_AR_DEVO_WRIT</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAX_ST_BR_DEVO_TXP</th>\n",
-       "      <td>250</td>\n",
-       "      <td>250</td>\n",
-       "      <td>250</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAX_ST_BR_DEVO_WRIT</th>\n",
-       "      <td>125</td>\n",
-       "      <td>125</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAX_ST_HR_DEVO_TXP</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAX_ST_HR_DEVO_WRIT</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAX_ST_IR_DEVO_TXP</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAX_ST_SR_DEVO_TXP</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAXINC</th>\n",
-       "      <td>1250</td>\n",
-       "      <td>1250</td>\n",
-       "      <td>1250</td>\n",
-       "      <td>91000</td>\n",
-       "      <td>2305</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAXPAYER</th>\n",
-       "      <td>1</td>\n",
-       "      <td>1</td>\n",
-       "      <td>1</td>\n",
-       "      <td>1</td>\n",
-       "      <td>2</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TAXTERM</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TEI</th>\n",
-       "      <td>12500</td>\n",
-       "      <td>12500</td>\n",
-       "      <td>12500</td>\n",
-       "      <td>8780</td>\n",
-       "      <td>6550</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TI</th>\n",
-       "      <td>12500</td>\n",
-       "      <td>12500</td>\n",
-       "      <td>12500</td>\n",
-       "      <td>102335</td>\n",
-       "      <td>14805</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TII</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>93555</td>\n",
-       "      <td>8255</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>TOTTAX_DEVO_TXP</th>\n",
-       "      <td>250</td>\n",
-       "      <td>250</td>\n",
-       "      <td>250</td>\n",
-       "      <td>250</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>UBISJA</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>WELSH_TXP</th>\n",
-       "      <td>1</td>\n",
-       "      <td>1</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_add_rate_savings_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_adjusted_net_income</th>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>102335.0</td>\n",
-       "      <td>14805.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_basic_rate_savings_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>1250.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_basic_rate_savings_income_pre_starter</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>455.0</td>\n",
-       "      <td>2910.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_earned_taxable_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_employment_benefits</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_employment_deductions</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_higher_rate_savings_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_income_tax</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>250.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_other_tax_credits</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>19800.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_pays_scottish_income_tax</th>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_personal_allowance</th>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>11332.5</td>\n",
-       "      <td>12500.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_received_allowances</th>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>11332.5</td>\n",
-       "      <td>12500.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_received_allowances_savings_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>955.0</td>\n",
-       "      <td>1660.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_savings_allowance</th>\n",
-       "      <td>1000.0</td>\n",
-       "      <td>1000.0</td>\n",
-       "      <td>1000.0</td>\n",
-       "      <td>500.0</td>\n",
-       "      <td>1000.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_savings_starter_rate_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_taxable_employment_income</th>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>8780.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_taxable_pension_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>9000.0</td>\n",
-       "      <td>12500.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>2330.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_taxable_savings_interest_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>955.0</td>\n",
-       "      <td>3910.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_taxed_dividend_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>89002.5</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_taxed_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>89002.5</td>\n",
-       "      <td>1250.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_taxed_savings_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>1250.0</td>\n",
-       "    </tr>\n",
-       "  </tbody>\n",
-       "</table>\n",
-       "</div>"
-      ],
-      "text/plain": [
-       "                                                      79574     201397  \\\n",
-       "abs_error                                              250.0     250.0   \n",
-       "AGERANGE                                                   4         5   \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                                                 12500      3500   \n",
-       "EPB                                                        0         0   \n",
-       "error                                                 -250.0    -250.0   \n",
-       "EXPS                                                       0         0   \n",
-       "FACT                                                 57.1795  103.8659   \n",
-       "GIFTAID                                                    0         0   \n",
-       "GIFTINV                                                    0         0   \n",
-       "GORCODE                                                   10        10   \n",
-       "IIDF                                                       0         0   \n",
-       "INCBBS                                                     0         0   \n",
-       "INCPBEN                                                    0         0   \n",
-       "INCPROP                                                    0         0   \n",
-       "INDUSTRY07                                                 F      1600   \n",
-       "LLIR_RESTRICT_AMT_TOT                                      0         0   \n",
-       "LOSSBF                                                     0         0   \n",
-       "MAIND                                                      0         0   \n",
-       "MAINSRCE                                                   1         2   \n",
-       "MAR                                                     STBR      STBR   \n",
-       "MCAS                                                       0         0   \n",
-       "MOTHDED                                                    0         0   \n",
-       "MOTHINC                                                    0         0   \n",
-       "OSSBEN                                                     0      3500   \n",
-       "OTHERINC                                                   0         0   \n",
-       "OTHERINV                                                   0         0   \n",
-       "PAS                                                    11250     11250   \n",
-       "PAY                                                    12500         0   \n",
-       "PENSION                                                    0      9000   \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         1   \n",
-       "SPA                                                        0         0   \n",
-       "SREF                                                15143186  15265269   \n",
-       "SRP                                                        0         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                                       250       250   \n",
-       "TAX_ST_BR_DEVO_WRIT                                      125       125   \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                                                  1250      1250   \n",
-       "TAXPAYER                                                   1         1   \n",
-       "TAXTERM                                                    0         0   \n",
-       "TEI                                                    12500     12500   \n",
-       "TI                                                     12500     12500   \n",
-       "TII                                                        0         0   \n",
-       "TOTTAX_DEVO_TXP                                          250       250   \n",
-       "UBISJA                                                     0         0   \n",
-       "WELSH_TXP                                                  1         1   \n",
-       "zzz_policyengine_add_rate_savings_income                 0.0       0.0   \n",
-       "zzz_policyengine_adjusted_net_income                 12500.0   12500.0   \n",
-       "zzz_policyengine_basic_rate_savings_income               0.0       0.0   \n",
-       "zzz_policyengine_basic_rate_savings_income_pre_...       0.0       0.0   \n",
-       "zzz_policyengine_earned_taxable_income                   0.0       0.0   \n",
-       "zzz_policyengine_employment_benefits                     0.0       0.0   \n",
-       "zzz_policyengine_employment_deductions                   0.0       0.0   \n",
-       "zzz_policyengine_higher_rate_savings_income              0.0       0.0   \n",
-       "zzz_policyengine_income_tax                              0.0       0.0   \n",
-       "zzz_policyengine_other_tax_credits                       0.0       0.0   \n",
-       "zzz_policyengine_pays_scottish_income_tax              False     False   \n",
-       "zzz_policyengine_personal_allowance                  12500.0   12500.0   \n",
-       "zzz_policyengine_received_allowances                 12500.0   12500.0   \n",
-       "zzz_policyengine_received_allowances_savings_in...       0.0       0.0   \n",
-       "zzz_policyengine_savings_allowance                    1000.0    1000.0   \n",
-       "zzz_policyengine_savings_starter_rate_income             0.0       0.0   \n",
-       "zzz_policyengine_taxable_employment_income           12500.0       0.0   \n",
-       "zzz_policyengine_taxable_pension_income                  0.0    9000.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                            0.0       0.0   \n",
-       "zzz_policyengine_taxed_savings_income                    0.0       0.0   \n",
-       "\n",
-       "                                                      200975     520288  \\\n",
-       "abs_error                                              250.0      250.0   \n",
-       "AGERANGE                                                   5          5   \n",
-       "BPADUE                                                     0          0   \n",
-       "CAPALL                                                     0          0   \n",
-       "COVNTS                                                     0          0   \n",
-       "DEFICIEN                                                   0          0   \n",
-       "DIVIDENDS                                                  0      92600   \n",
-       "DSHIPS                                                     3          3   \n",
-       "EIDF                                                       0          0   \n",
-       "EMPINC                                                     0       8780   \n",
-       "EPB                                                        0          0   \n",
-       "error                                                 -250.0     -250.0   \n",
-       "EXPS                                                       0          0   \n",
-       "FACT                                                125.4422  10.267938   \n",
-       "GIFTAID                                                    0          0   \n",
-       "GIFTINV                                                    0          0   \n",
-       "GORCODE                                                    2          9   \n",
-       "IIDF                                                       0          0   \n",
-       "INCBBS                                                     0        955   \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                                                      0          0   \n",
-       "MAINSRCE                                                   2          1   \n",
-       "MAR                                                     STBR       DVHR   \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                                                    11250      11335   \n",
-       "PAY                                                        0       8780   \n",
-       "PENSION                                                12500          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          2   \n",
-       "SPA                                                        0          0   \n",
-       "SREF                                                15264845   15601122   \n",
-       "SRP                                                        0          0   \n",
-       "TAX_CRED                                                   0      19800   \n",
-       "TAX_ST_AR_DEVO_TXP                                         0          0   \n",
-       "TAX_ST_AR_DEVO_WRIT                                        0          0   \n",
-       "TAX_ST_BR_DEVO_TXP                                       250          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                                                  1250      91000   \n",
-       "TAXPAYER                                                   1          1   \n",
-       "TAXTERM                                                    0          0   \n",
-       "TEI                                                    12500       8780   \n",
-       "TI                                                     12500     102335   \n",
-       "TII                                                        0      93555   \n",
-       "TOTTAX_DEVO_TXP                                          250        250   \n",
-       "UBISJA                                                     0          0   \n",
-       "WELSH_TXP                                                  0          0   \n",
-       "zzz_policyengine_add_rate_savings_income                 0.0        0.0   \n",
-       "zzz_policyengine_adjusted_net_income                 12500.0   102335.0   \n",
-       "zzz_policyengine_basic_rate_savings_income               0.0        0.0   \n",
-       "zzz_policyengine_basic_rate_savings_income_pre_...       0.0      455.0   \n",
-       "zzz_policyengine_earned_taxable_income                   0.0        0.0   \n",
-       "zzz_policyengine_employment_benefits                     0.0        0.0   \n",
-       "zzz_policyengine_employment_deductions                   0.0        0.0   \n",
-       "zzz_policyengine_higher_rate_savings_income              0.0        0.0   \n",
-       "zzz_policyengine_income_tax                              0.0        0.0   \n",
-       "zzz_policyengine_other_tax_credits                       0.0    19800.0   \n",
-       "zzz_policyengine_pays_scottish_income_tax              False      False   \n",
-       "zzz_policyengine_personal_allowance                  12500.0    11332.5   \n",
-       "zzz_policyengine_received_allowances                 12500.0    11332.5   \n",
-       "zzz_policyengine_received_allowances_savings_in...       0.0      955.0   \n",
-       "zzz_policyengine_savings_allowance                    1000.0      500.0   \n",
-       "zzz_policyengine_savings_starter_rate_income             0.0        0.0   \n",
-       "zzz_policyengine_taxable_employment_income               0.0     8780.0   \n",
-       "zzz_policyengine_taxable_pension_income              12500.0        0.0   \n",
-       "zzz_policyengine_taxable_savings_interest_income         0.0      955.0   \n",
-       "zzz_policyengine_taxed_dividend_income                   0.0    89002.5   \n",
-       "zzz_policyengine_taxed_income                            0.0    89002.5   \n",
-       "zzz_policyengine_taxed_savings_income                    0.0        0.0   \n",
-       "\n",
-       "                                                       524966  \n",
-       "abs_error                                               250.0  \n",
-       "AGERANGE                                                    7  \n",
-       "BPADUE                                                      0  \n",
-       "CAPALL                                                      0  \n",
-       "COVNTS                                                      0  \n",
-       "DEFICIEN                                                    0  \n",
-       "DIVIDENDS                                                  55  \n",
-       "DSHIPS                                                      3  \n",
-       "EIDF                                                        0  \n",
-       "EMPINC                                                     30  \n",
-       "EPB                                                         0  \n",
-       "error                                                   250.0  \n",
-       "EXPS                                                        0  \n",
-       "FACT                                                52.477097  \n",
-       "GIFTAID                                                     0  \n",
-       "GIFTINV                                                     0  \n",
-       "GORCODE                                                     9  \n",
-       "IIDF                                                        0  \n",
-       "INCBBS                                                   3910  \n",
-       "INCPBEN                                                     0  \n",
-       "INCPROP                                                  4290  \n",
-       "INDUSTRY07                                               1600  \n",
-       "LLIR_RESTRICT_AMT_TOT                                       0  \n",
-       "LOSSBF                                                      0  \n",
-       "MAIND                                                       0  \n",
-       "MAINSRCE                                                    2  \n",
-       "MAR                                                     NONTP  \n",
-       "MCAS                                                        0  \n",
-       "MOTHDED                                                     0  \n",
-       "MOTHINC                                                    30  \n",
-       "OSSBEN                                                      0  \n",
-       "OTHERINC                                                    0  \n",
-       "OTHERINV                                                    0  \n",
-       "PAS                                                     12500  \n",
-       "PAY                                                         0  \n",
-       "PENSION                                                  2330  \n",
-       "PENSRLF                                                     0  \n",
-       "PROFITS                                                     0  \n",
-       "PSAV_XS                                                     0  \n",
-       "SCOT_TXP                                                    0  \n",
-       "SEINC_NUM                                                   0  \n",
-       "SEISS                                                       0  \n",
-       "SEX                                                         2  \n",
-       "SPA                                                         1  \n",
-       "SREF                                                 15606453  \n",
-       "SRP                                                      4190  \n",
-       "TAX_CRED                                                    0  \n",
-       "TAX_ST_AR_DEVO_TXP                                          0  \n",
-       "TAX_ST_AR_DEVO_WRIT                                         0  \n",
-       "TAX_ST_BR_DEVO_TXP                                          0  \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                                                   2305  \n",
-       "TAXPAYER                                                    2  \n",
-       "TAXTERM                                                     0  \n",
-       "TEI                                                      6550  \n",
-       "TI                                                      14805  \n",
-       "TII                                                      8255  \n",
-       "TOTTAX_DEVO_TXP                                             0  \n",
-       "UBISJA                                                      0  \n",
-       "WELSH_TXP                                                   0  \n",
-       "zzz_policyengine_add_rate_savings_income                  0.0  \n",
-       "zzz_policyengine_adjusted_net_income                  14805.0  \n",
-       "zzz_policyengine_basic_rate_savings_income             1250.0  \n",
-       "zzz_policyengine_basic_rate_savings_income_pre_...     2910.0  \n",
-       "zzz_policyengine_earned_taxable_income                    0.0  \n",
-       "zzz_policyengine_employment_benefits                      0.0  \n",
-       "zzz_policyengine_employment_deductions                    0.0  \n",
-       "zzz_policyengine_higher_rate_savings_income               0.0  \n",
-       "zzz_policyengine_income_tax                             250.0  \n",
-       "zzz_policyengine_other_tax_credits                        0.0  \n",
-       "zzz_policyengine_pays_scottish_income_tax               False  \n",
-       "zzz_policyengine_personal_allowance                   12500.0  \n",
-       "zzz_policyengine_received_allowances                  12500.0  \n",
-       "zzz_policyengine_received_allowances_savings_in...     1660.0  \n",
-       "zzz_policyengine_savings_allowance                     1000.0  \n",
-       "zzz_policyengine_savings_starter_rate_income              0.0  \n",
-       "zzz_policyengine_taxable_employment_income                0.0  \n",
-       "zzz_policyengine_taxable_pension_income                2330.0  \n",
-       "zzz_policyengine_taxable_savings_interest_income       3910.0  \n",
-       "zzz_policyengine_taxed_dividend_income                    0.0  \n",
-       "zzz_policyengine_taxed_income                          1250.0  \n",
-       "zzz_policyengine_taxed_savings_income                  1250.0  "
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "(2054, 82)\n",
+      "0.25865141118648466\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Find all records where SPI Personal Allowance is 0 when PolicyEngine projects positive amount\n",
+    "print(df[(df.MAIND != -1) & (df.PAS == 0) & (df.TAXINC < 125_000)].shape)\n",
+    "print(df[(df.MAIND != -1) & (df.PAS == 0) & (df.TAXINC < 125_000)].shape[0] / 794_119 * 100)\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 18,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "(738, 82)\n",
+      "0.09293317500273889\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Find all records where SPI Personal Allowance is full £12,500 while PolicyEngine's is not and when individuals have Gift Aid\n",
+    "print(df[(df.MAIND != -1) & (df.PAS == 12_500) & (df.PAS != df[\"zzz_policyengine_personal_allowance\"]) & df.GIFTAID > 0].shape)\n",
+    "print(df[(df.MAIND != -1) & (df.PAS == 12_500) & (df.PAS != df[\"zzz_policyengine_personal_allowance\"]) & df.GIFTAID > 0].shape[0] / 794_119 * 100)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "(37998, 82)\n",
+      "4.78492518123858\n"
+     ]
+    }
+   ],
+   "source": [
+    "# Find records with Marriage Allowance-driven discrepancy\n",
+    "print(df[(df.MAIND != -1) & (df.MAIND != 1) & (df.PAS != df[\"zzz_policyengine_personal_allowance\"])].shape)\n",
+    "print(df[(df.MAIND != -1) & (df.MAIND != 1) & (df.PAS != df[\"zzz_policyengine_personal_allowance\"])].shape[0] / 794_119 * 100)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 24,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "(1276, 82)\n",
+      "0.16068120772831276\n"
+     ]
     }
    ],
    "source": [
-    "result_df = df[(df[\"abs_error\"] == 250)].sort_values(\"zzz_policyengine_earned_taxable_income\", ascending=True).head().T.sort_index(key=lambda x: x.str.lower())\n",
-    "\n",
-    "# Display the result\n",
-    "display(result_df)"
+    "# Find records where Savings Allowance doesn't appear to be factored correctly\n",
+    "print(df[(df.MAIND != -1) & (df.OTHERINV == df[\"zzz_policyengine_taxable_savings_interest_income\"]) & (df.OTHERINV > 0) & (df[\"abs_error\"] >= 10)].shape)\n",
+    "print(df[(df.MAIND != -1) & (df.OTHERINV == df[\"zzz_policyengine_taxable_savings_interest_income\"]) & (df.OTHERINV > 0) & (df[\"abs_error\"] >= 10)].shape[0] / 794_119 * 100)"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 10,
+   "execution_count": 22,
    "metadata": {},
    "outputs": [
     {
@@ -2182,28 +1207,28 @@
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
-       "      <th>670183</th>\n",
-       "      <th>653918</th>\n",
-       "      <th>487185</th>\n",
-       "      <th>640988</th>\n",
-       "      <th>428507</th>\n",
+       "      <th>658983</th>\n",
+       "      <th>553043</th>\n",
+       "      <th>666598</th>\n",
+       "      <th>426013</th>\n",
+       "      <th>528973</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>abs_error</th>\n",
-       "      <td>1878.0</td>\n",
-       "      <td>1615.0</td>\n",
-       "      <td>1599.0</td>\n",
-       "      <td>1400.0</td>\n",
-       "      <td>1380.0</td>\n",
+       "      <td>1002.0</td>\n",
+       "      <td>1002.0</td>\n",
+       "      <td>1000.0</td>\n",
+       "      <td>1000.0</td>\n",
+       "      <td>999.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>AGERANGE</th>\n",
-       "      <td>5</td>\n",
-       "      <td>4</td>\n",
        "      <td>2</td>\n",
-       "      <td>4</td>\n",
+       "      <td>5</td>\n",
+       "      <td>3</td>\n",
+       "      <td>5</td>\n",
        "      <td>3</td>\n",
        "    </tr>\n",
        "    <tr>\n",
@@ -2280,11 +1305,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>error</th>\n",
-       "      <td>1878.0</td>\n",
-       "      <td>1615.0</td>\n",
-       "      <td>1599.0</td>\n",
-       "      <td>1400.0</td>\n",
-       "      <td>-1380.0</td>\n",
+       "      <td>1002.0</td>\n",
+       "      <td>1002.0</td>\n",
+       "      <td>1000.0</td>\n",
+       "      <td>1000.0</td>\n",
+       "      <td>999.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>EXPS</th>\n",
@@ -2296,19 +1321,19 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>FACT</th>\n",
-       "      <td>10.648841</td>\n",
-       "      <td>10.423152</td>\n",
-       "      <td>10.648841</td>\n",
-       "      <td>10.648841</td>\n",
+       "      <td>44.86108</td>\n",
+       "      <td>53.987038</td>\n",
+       "      <td>53.987038</td>\n",
        "      <td>53.399523</td>\n",
+       "      <td>45.529136</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>GIFTAID</th>\n",
-       "      <td>9380</td>\n",
-       "      <td>45000</td>\n",
-       "      <td>8190</td>\n",
-       "      <td>56900</td>\n",
-       "      <td>1500</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>GIFTINV</th>\n",
@@ -2320,19 +1345,19 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>GORCODE</th>\n",
-       "      <td>9</td>\n",
-       "      <td>7</td>\n",
-       "      <td>7</td>\n",
-       "      <td>2</td>\n",
-       "      <td>14</td>\n",
+       "      <td>3</td>\n",
+       "      <td>11</td>\n",
+       "      <td>8</td>\n",
+       "      <td>11</td>\n",
+       "      <td>5</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>IIDF</th>\n",
-       "      <td>9380</td>\n",
-       "      <td>45000</td>\n",
-       "      <td>8190</td>\n",
-       "      <td>56900</td>\n",
-       "      <td>1500</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>INCBBS</th>\n",
@@ -2352,26 +1377,26 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>INCPROP</th>\n",
-       "      <td>124000</td>\n",
-       "      <td>109000</td>\n",
-       "      <td>108000</td>\n",
-       "      <td>107000</td>\n",
-       "      <td>9650</td>\n",
+       "      <td>3810</td>\n",
+       "      <td>11300</td>\n",
+       "      <td>7000</td>\n",
+       "      <td>11000</td>\n",
+       "      <td>1120</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>INDUSTRY07</th>\n",
-       "      <td>F</td>\n",
        "      <td>1500</td>\n",
        "      <td>1500</td>\n",
-       "      <td>F</td>\n",
+       "      <td>1500</td>\n",
+       "      <td>1500</td>\n",
        "      <td>1500</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>LLIR_RESTRICT_AMT_TOT</th>\n",
-       "      <td>42150</td>\n",
-       "      <td>66435</td>\n",
-       "      <td>46975</td>\n",
-       "      <td>22685</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
@@ -2392,19 +1417,19 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>MAINSRCE</th>\n",
-       "      <td>4</td>\n",
        "      <td>5</td>\n",
        "      <td>5</td>\n",
-       "      <td>4</td>\n",
+       "      <td>5</td>\n",
+       "      <td>5</td>\n",
        "      <td>5</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>MAR</th>\n",
-       "      <td>STHR</td>\n",
-       "      <td>NONTP</td>\n",
-       "      <td>STHR</td>\n",
-       "      <td>STHR</td>\n",
-       "      <td>STBR</td>\n",
+       "      <td>NSBR</td>\n",
+       "      <td>NSBR</td>\n",
+       "      <td>NSBR</td>\n",
+       "      <td>NSBR</td>\n",
+       "      <td>NSBR</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>MCAS</th>\n",
@@ -2448,19 +1473,19 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>OTHERINV</th>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
+       "      <td>35700</td>\n",
+       "      <td>8560</td>\n",
+       "      <td>12700</td>\n",
+       "      <td>13900</td>\n",
+       "      <td>30200</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>PAS</th>\n",
-       "      <td>5190</td>\n",
        "      <td>12500</td>\n",
        "      <td>12500</td>\n",
        "      <td>12500</td>\n",
-       "      <td>1250</td>\n",
+       "      <td>12500</td>\n",
+       "      <td>12500</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>PAY</th>\n",
@@ -2505,17 +1530,17 @@
        "    <tr>\n",
        "      <th>SCOT_TXP</th>\n",
        "      <td>0</td>\n",
+       "      <td>1</td>\n",
        "      <td>0</td>\n",
-       "      <td>0</td>\n",
-       "      <td>0</td>\n",
+       "      <td>1</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>SEINC_NUM</th>\n",
-       "      <td>1</td>\n",
        "      <td>0</td>\n",
        "      <td>0</td>\n",
-       "      <td>1</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
@@ -2528,7 +1553,7 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>SEX</th>\n",
-       "      <td>2</td>\n",
+       "      <td>1</td>\n",
        "      <td>1</td>\n",
        "      <td>2</td>\n",
        "      <td>2</td>\n",
@@ -2544,11 +1569,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>SREF</th>\n",
-       "      <td>15771837</td>\n",
-       "      <td>15753289</td>\n",
-       "      <td>15563623</td>\n",
-       "      <td>15738484</td>\n",
-       "      <td>15496884</td>\n",
+       "      <td>15759069</td>\n",
+       "      <td>15638655</td>\n",
+       "      <td>15767719</td>\n",
+       "      <td>15494054</td>\n",
+       "      <td>15611035</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>SRP</th>\n",
@@ -2560,10 +1585,10 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAX_CRED</th>\n",
-       "      <td>8430</td>\n",
-       "      <td>13285</td>\n",
-       "      <td>19395</td>\n",
-       "      <td>4535</td>\n",
+       "      <td>2950</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
@@ -2584,11 +1609,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAX_ST_BR_DEVO_TXP</th>\n",
-       "      <td>5755</td>\n",
        "      <td>0</td>\n",
-       "      <td>2195</td>\n",
-       "      <td>2985</td>\n",
-       "      <td>1380</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAX_ST_BR_DEVO_WRIT</th>\n",
@@ -2600,10 +1625,10 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAX_ST_HR_DEVO_TXP</th>\n",
-       "      <td>22085</td>\n",
        "      <td>0</td>\n",
-       "      <td>5835</td>\n",
-       "      <td>15</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
+       "      <td>0</td>\n",
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
@@ -2632,11 +1657,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAXINC</th>\n",
-       "      <td>109430</td>\n",
-       "      <td>51500</td>\n",
-       "      <td>87310</td>\n",
-       "      <td>37600</td>\n",
-       "      <td>6900</td>\n",
+       "      <td>27010</td>\n",
+       "      <td>7360</td>\n",
+       "      <td>7200</td>\n",
+       "      <td>12400</td>\n",
+       "      <td>18820</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TAXPAYER</th>\n",
@@ -2664,27 +1689,27 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TI</th>\n",
-       "      <td>124000</td>\n",
-       "      <td>109000</td>\n",
-       "      <td>108000</td>\n",
-       "      <td>107000</td>\n",
-       "      <td>9650</td>\n",
+       "      <td>39510</td>\n",
+       "      <td>19860</td>\n",
+       "      <td>19700</td>\n",
+       "      <td>24900</td>\n",
+       "      <td>31320</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TII</th>\n",
-       "      <td>124000</td>\n",
-       "      <td>109000</td>\n",
-       "      <td>108000</td>\n",
-       "      <td>107000</td>\n",
-       "      <td>9650</td>\n",
+       "      <td>39510</td>\n",
+       "      <td>19860</td>\n",
+       "      <td>19700</td>\n",
+       "      <td>24900</td>\n",
+       "      <td>31320</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>TOTTAX_DEVO_TXP</th>\n",
-       "      <td>27840</td>\n",
-       "      <td>0</td>\n",
-       "      <td>8030</td>\n",
-       "      <td>3005</td>\n",
-       "      <td>1380</td>\n",
+       "      <td>1250</td>\n",
+       "      <td>270</td>\n",
+       "      <td>240</td>\n",
+       "      <td>1280</td>\n",
+       "      <td>2565</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>UBISJA</th>\n",
@@ -2703,23 +1728,15 @@
        "      <td>0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_add_rate_savings_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
        "      <th>zzz_policyengine_adjusted_net_income</th>\n",
-       "      <td>124000.0</td>\n",
-       "      <td>109000.0</td>\n",
-       "      <td>108000.0</td>\n",
-       "      <td>107000.0</td>\n",
-       "      <td>9650.0</td>\n",
+       "      <td>39510.0</td>\n",
+       "      <td>19860.0</td>\n",
+       "      <td>19700.0</td>\n",
+       "      <td>24900.0</td>\n",
+       "      <td>31320.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_basic_rate_savings_income</th>\n",
+       "      <th>zzz_policyengine_earned_taxable_income</th>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
@@ -2727,23 +1744,15 @@
        "      <td>0.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_basic_rate_savings_income_pre_starter</th>\n",
-       "      <td>0.0</td>\n",
+       "      <th>zzz_policyengine_employment_deductions</th>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_earned_taxable_income</th>\n",
-       "      <td>114120.0</td>\n",
-       "      <td>56000.0</td>\n",
-       "      <td>91310.0</td>\n",
-       "      <td>41100.0</td>\n",
        "      <td>0.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_employment_benefits</th>\n",
+       "      <th>zzz_policyengine_gift_aid</th>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
@@ -2751,63 +1760,47 @@
        "      <td>0.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_employment_deductions</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
+       "      <th>zzz_policyengine_income_tax</th>\n",
+       "      <td>2252.0</td>\n",
+       "      <td>1272.0</td>\n",
+       "      <td>1240.0</td>\n",
+       "      <td>2280.0</td>\n",
+       "      <td>3564.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_higher_rate_savings_income</th>\n",
-       "      <td>0.0</td>\n",
+       "      <th>zzz_policyengine_marriage_allowance</th>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_income_tax</th>\n",
-       "      <td>29718.0</td>\n",
-       "      <td>1615.0</td>\n",
-       "      <td>9629.0</td>\n",
-       "      <td>4405.0</td>\n",
        "      <td>0.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_other_tax_credits</th>\n",
-       "      <td>8430.0</td>\n",
-       "      <td>13285.0</td>\n",
-       "      <td>19395.0</td>\n",
-       "      <td>4535.0</td>\n",
+       "      <td>2950.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>0.0</td>\n",
+       "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>zzz_policyengine_pays_scottish_income_tax</th>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
-       "      <td>False</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_personal_allowance</th>\n",
-       "      <td>500.0</td>\n",
-       "      <td>8000.0</td>\n",
-       "      <td>8500.0</td>\n",
-       "      <td>9000.0</td>\n",
+       "      <td>12500.0</td>\n",
+       "      <td>12500.0</td>\n",
+       "      <td>12500.0</td>\n",
+       "      <td>12500.0</td>\n",
        "      <td>12500.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_received_allowances</th>\n",
-       "      <td>9880.0</td>\n",
-       "      <td>53000.0</td>\n",
-       "      <td>16690.0</td>\n",
-       "      <td>65900.0</td>\n",
-       "      <td>9650.0</td>\n",
+       "      <td>12500.0</td>\n",
+       "      <td>12500.0</td>\n",
+       "      <td>12500.0</td>\n",
+       "      <td>12500.0</td>\n",
+       "      <td>12500.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_received_allowances_savings_income</th>\n",
+       "      <th>zzz_policyengine_received_allowances_dividend_income</th>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
@@ -2815,31 +1808,31 @@
        "      <td>0.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_savings_allowance</th>\n",
-       "      <td>500.0</td>\n",
-       "      <td>500.0</td>\n",
-       "      <td>500.0</td>\n",
-       "      <td>500.0</td>\n",
-       "      <td>1000.0</td>\n",
+       "      <th>zzz_policyengine_received_allowances_earned_income</th>\n",
+       "      <td>3810.0</td>\n",
+       "      <td>11300.0</td>\n",
+       "      <td>7000.0</td>\n",
+       "      <td>11000.0</td>\n",
+       "      <td>1120.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_savings_starter_rate_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
+       "      <th>zzz_policyengine_received_allowances_savings_income</th>\n",
+       "      <td>8690.0</td>\n",
+       "      <td>1200.0</td>\n",
+       "      <td>5500.0</td>\n",
+       "      <td>1500.0</td>\n",
+       "      <td>11380.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_taxable_employment_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
+       "      <th>zzz_policyengine_savings_allowance</th>\n",
+       "      <td>1000.0</td>\n",
+       "      <td>1000.0</td>\n",
+       "      <td>1000.0</td>\n",
+       "      <td>1000.0</td>\n",
+       "      <td>1000.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
-       "      <th>zzz_policyengine_taxable_pension_income</th>\n",
+       "      <th>zzz_policyengine_taxable_employment_income</th>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
        "      <td>0.0</td>\n",
@@ -2848,11 +1841,11 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_taxable_savings_interest_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
+       "      <td>35700.0</td>\n",
+       "      <td>8560.0</td>\n",
+       "      <td>12700.0</td>\n",
+       "      <td>13900.0</td>\n",
+       "      <td>30200.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_taxed_dividend_income</th>\n",
@@ -2864,116 +1857,112 @@
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_taxed_income</th>\n",
-       "      <td>114120.0</td>\n",
-       "      <td>56000.0</td>\n",
-       "      <td>91310.0</td>\n",
-       "      <td>41100.0</td>\n",
-       "      <td>0.0</td>\n",
+       "      <td>26010.0</td>\n",
+       "      <td>6360.0</td>\n",
+       "      <td>6200.0</td>\n",
+       "      <td>11400.0</td>\n",
+       "      <td>17820.0</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>zzz_policyengine_taxed_savings_income</th>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
-       "      <td>0.0</td>\n",
+       "      <td>26010.0</td>\n",
+       "      <td>6360.0</td>\n",
+       "      <td>6200.0</td>\n",
+       "      <td>11400.0</td>\n",
+       "      <td>17820.0</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "text/plain": [
-       "                                                       670183     653918  \\\n",
-       "abs_error                                              1878.0     1615.0   \n",
-       "AGERANGE                                                    5          4   \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                                                  1878.0     1615.0   \n",
-       "EXPS                                                        0          0   \n",
-       "FACT                                                10.648841  10.423152   \n",
-       "GIFTAID                                                  9380      45000   \n",
-       "GIFTINV                                                     0          0   \n",
-       "GORCODE                                                     9          7   \n",
-       "IIDF                                                     9380      45000   \n",
-       "INCBBS                                                      0          0   \n",
-       "INCPBEN                                                     0          0   \n",
-       "INCPROP                                                124000     109000   \n",
-       "INDUSTRY07                                                  F       1500   \n",
-       "LLIR_RESTRICT_AMT_TOT                                   42150      66435   \n",
-       "LOSSBF                                                      0          0   \n",
-       "MAIND                                                       0          0   \n",
-       "MAINSRCE                                                    4          5   \n",
-       "MAR                                                      STHR      NONTP   \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                                                      5190      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                                                         2          1   \n",
-       "SPA                                                         0          0   \n",
-       "SREF                                                 15771837   15753289   \n",
-       "SRP                                                         0          0   \n",
-       "TAX_CRED                                                 8430      13285   \n",
-       "TAX_ST_AR_DEVO_TXP                                          0          0   \n",
-       "TAX_ST_AR_DEVO_WRIT                                         0          0   \n",
-       "TAX_ST_BR_DEVO_TXP                                       5755          0   \n",
-       "TAX_ST_BR_DEVO_WRIT                                         0          0   \n",
-       "TAX_ST_HR_DEVO_TXP                                      22085          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                                                 109430      51500   \n",
-       "TAXPAYER                                                    1          1   \n",
-       "TAXTERM                                                     0          0   \n",
-       "TEI                                                         0          0   \n",
-       "TI                                                     124000     109000   \n",
-       "TII                                                    124000     109000   \n",
-       "TOTTAX_DEVO_TXP                                         27840          0   \n",
-       "UBISJA                                                      0          0   \n",
-       "WELSH_TXP                                                   0          0   \n",
-       "zzz_policyengine_add_rate_savings_income                  0.0        0.0   \n",
-       "zzz_policyengine_adjusted_net_income                 124000.0   109000.0   \n",
-       "zzz_policyengine_basic_rate_savings_income                0.0        0.0   \n",
-       "zzz_policyengine_basic_rate_savings_income_pre_...        0.0        0.0   \n",
-       "zzz_policyengine_earned_taxable_income               114120.0    56000.0   \n",
-       "zzz_policyengine_employment_benefits                      0.0        0.0   \n",
-       "zzz_policyengine_employment_deductions                    0.0        0.0   \n",
-       "zzz_policyengine_higher_rate_savings_income               0.0        0.0   \n",
-       "zzz_policyengine_income_tax                           29718.0     1615.0   \n",
-       "zzz_policyengine_other_tax_credits                     8430.0    13285.0   \n",
-       "zzz_policyengine_pays_scottish_income_tax               False      False   \n",
-       "zzz_policyengine_personal_allowance                     500.0     8000.0   \n",
-       "zzz_policyengine_received_allowances                   9880.0    53000.0   \n",
-       "zzz_policyengine_received_allowances_savings_in...        0.0        0.0   \n",
-       "zzz_policyengine_savings_allowance                      500.0      500.0   \n",
-       "zzz_policyengine_savings_starter_rate_income              0.0        0.0   \n",
-       "zzz_policyengine_taxable_employment_income                0.0        0.0   \n",
-       "zzz_policyengine_taxable_pension_income                   0.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                        114120.0    56000.0   \n",
-       "zzz_policyengine_taxed_savings_income                     0.0        0.0   \n",
+       "                                                      658983     553043  \\\n",
+       "abs_error                                             1002.0     1002.0   \n",
+       "AGERANGE                                                   2          5   \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                                                 1002.0     1002.0   \n",
+       "EXPS                                                       0          0   \n",
+       "FACT                                                44.86108  53.987038   \n",
+       "GIFTAID                                                    0          0   \n",
+       "GIFTINV                                                    0          0   \n",
+       "GORCODE                                                    3         11   \n",
+       "IIDF                                                       0          0   \n",
+       "INCBBS                                                     0          0   \n",
+       "INCPBEN                                                    0          0   \n",
+       "INCPROP                                                 3810      11300   \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                                                     NSBR       NSBR   \n",
+       "MCAS                                                       0          0   \n",
+       "MOTHDED                                                    0          0   \n",
+       "MOTHINC                                                    0          0   \n",
+       "OSSBEN                                                     0          0   \n",
+       "OTHERINC                                                   0          0   \n",
+       "OTHERINV                                               35700       8560   \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          1   \n",
+       "SEINC_NUM                                                  0          0   \n",
+       "SEISS                                                      0          0   \n",
+       "SEX                                                        1          1   \n",
+       "SPA                                                        0          0   \n",
+       "SREF                                                15759069   15638655   \n",
+       "SRP                                                        0          0   \n",
+       "TAX_CRED                                                2950          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                                                 27010       7360   \n",
+       "TAXPAYER                                                   1          1   \n",
+       "TAXTERM                                                    0          0   \n",
+       "TEI                                                        0          0   \n",
+       "TI                                                     39510      19860   \n",
+       "TII                                                    39510      19860   \n",
+       "TOTTAX_DEVO_TXP                                         1250        270   \n",
+       "UBISJA                                                     0          0   \n",
+       "WELSH_TXP                                                  0          0   \n",
+       "zzz_policyengine_adjusted_net_income                 39510.0    19860.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                           2252.0     1272.0   \n",
+       "zzz_policyengine_marriage_allowance                      0.0        0.0   \n",
+       "zzz_policyengine_other_tax_credits                    2950.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_dividend_i...       0.0        0.0   \n",
+       "zzz_policyengine_received_allowances_earned_income    3810.0    11300.0   \n",
+       "zzz_policyengine_received_allowances_savings_in...    8690.0     1200.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     35700.0     8560.0   \n",
+       "zzz_policyengine_taxed_dividend_income                   0.0        0.0   \n",
+       "zzz_policyengine_taxed_income                        26010.0     6360.0   \n",
+       "zzz_policyengine_taxed_savings_income                26010.0     6360.0   \n",
        "\n",
-       "                                                       487185     640988  \\\n",
-       "abs_error                                              1599.0     1400.0   \n",
-       "AGERANGE                                                    2          4   \n",
+       "                                                       666598     426013  \\\n",
+       "abs_error                                              1000.0     1000.0   \n",
+       "AGERANGE                                                    3          5   \n",
        "BPADUE                                                      0          0   \n",
        "CAPALL                                                      0          0   \n",
        "COVNTS                                                      0          0   \n",
@@ -2983,84 +1972,80 @@
        "EIDF                                                        0          0   \n",
        "EMPINC                                                      0          0   \n",
        "EPB                                                         0          0   \n",
-       "error                                                  1599.0     1400.0   \n",
+       "error                                                  1000.0     1000.0   \n",
        "EXPS                                                        0          0   \n",
-       "FACT                                                10.648841  10.648841   \n",
-       "GIFTAID                                                  8190      56900   \n",
+       "FACT                                                53.987038  53.399523   \n",
+       "GIFTAID                                                     0          0   \n",
        "GIFTINV                                                     0          0   \n",
-       "GORCODE                                                     7          2   \n",
-       "IIDF                                                     8190      56900   \n",
+       "GORCODE                                                     8         11   \n",
+       "IIDF                                                        0          0   \n",
        "INCBBS                                                      0          0   \n",
        "INCPBEN                                                     0          0   \n",
-       "INCPROP                                                108000     107000   \n",
-       "INDUSTRY07                                               1500          F   \n",
-       "LLIR_RESTRICT_AMT_TOT                                   46975      22685   \n",
+       "INCPROP                                                  7000      11000   \n",
+       "INDUSTRY07                                               1500       1500   \n",
+       "LLIR_RESTRICT_AMT_TOT                                       0          0   \n",
        "LOSSBF                                                      0          0   \n",
        "MAIND                                                       0          0   \n",
-       "MAINSRCE                                                    5          4   \n",
-       "MAR                                                      STHR       STHR   \n",
+       "MAINSRCE                                                    5          5   \n",
+       "MAR                                                      NSBR       NSBR   \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",
+       "OTHERINV                                                12700      13900   \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          1   \n",
+       "SCOT_TXP                                                    0          1   \n",
+       "SEINC_NUM                                                   0          0   \n",
        "SEISS                                                       0          0   \n",
        "SEX                                                         2          2   \n",
        "SPA                                                         0          0   \n",
-       "SREF                                                 15563623   15738484   \n",
+       "SREF                                                 15767719   15494054   \n",
        "SRP                                                         0          0   \n",
-       "TAX_CRED                                                19395       4535   \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                                       2195       2985   \n",
+       "TAX_ST_BR_DEVO_TXP                                          0          0   \n",
        "TAX_ST_BR_DEVO_WRIT                                         0          0   \n",
-       "TAX_ST_HR_DEVO_TXP                                       5835         15   \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                                                  87310      37600   \n",
+       "TAXINC                                                   7200      12400   \n",
        "TAXPAYER                                                    1          1   \n",
        "TAXTERM                                                     0          0   \n",
        "TEI                                                         0          0   \n",
-       "TI                                                     108000     107000   \n",
-       "TII                                                    108000     107000   \n",
-       "TOTTAX_DEVO_TXP                                          8030       3005   \n",
+       "TI                                                      19700      24900   \n",
+       "TII                                                     19700      24900   \n",
+       "TOTTAX_DEVO_TXP                                           240       1280   \n",
        "UBISJA                                                      0          0   \n",
        "WELSH_TXP                                                   0          0   \n",
-       "zzz_policyengine_add_rate_savings_income                  0.0        0.0   \n",
-       "zzz_policyengine_adjusted_net_income                 108000.0   107000.0   \n",
-       "zzz_policyengine_basic_rate_savings_income                0.0        0.0   \n",
-       "zzz_policyengine_basic_rate_savings_income_pre_...        0.0        0.0   \n",
-       "zzz_policyengine_earned_taxable_income                91310.0    41100.0   \n",
-       "zzz_policyengine_employment_benefits                      0.0        0.0   \n",
+       "zzz_policyengine_adjusted_net_income                  19700.0    24900.0   \n",
+       "zzz_policyengine_earned_taxable_income                    0.0        0.0   \n",
        "zzz_policyengine_employment_deductions                    0.0        0.0   \n",
-       "zzz_policyengine_higher_rate_savings_income               0.0        0.0   \n",
-       "zzz_policyengine_income_tax                            9629.0     4405.0   \n",
-       "zzz_policyengine_other_tax_credits                    19395.0     4535.0   \n",
-       "zzz_policyengine_pays_scottish_income_tax               False      False   \n",
-       "zzz_policyengine_personal_allowance                    8500.0     9000.0   \n",
-       "zzz_policyengine_received_allowances                  16690.0    65900.0   \n",
-       "zzz_policyengine_received_allowances_savings_in...        0.0        0.0   \n",
-       "zzz_policyengine_savings_allowance                      500.0      500.0   \n",
-       "zzz_policyengine_savings_starter_rate_income              0.0        0.0   \n",
+       "zzz_policyengine_gift_aid                                 0.0        0.0   \n",
+       "zzz_policyengine_income_tax                            1240.0     2280.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",
+       "zzz_policyengine_received_allowances_dividend_i...        0.0        0.0   \n",
+       "zzz_policyengine_received_allowances_earned_income     7000.0    11000.0   \n",
+       "zzz_policyengine_received_allowances_savings_in...     5500.0     1500.0   \n",
+       "zzz_policyengine_savings_allowance                     1000.0     1000.0   \n",
        "zzz_policyengine_taxable_employment_income                0.0        0.0   \n",
-       "zzz_policyengine_taxable_pension_income                   0.0        0.0   \n",
-       "zzz_policyengine_taxable_savings_interest_income          0.0        0.0   \n",
+       "zzz_policyengine_taxable_savings_interest_income      12700.0    13900.0   \n",
        "zzz_policyengine_taxed_dividend_income                    0.0        0.0   \n",
-       "zzz_policyengine_taxed_income                         91310.0    41100.0   \n",
-       "zzz_policyengine_taxed_savings_income                     0.0        0.0   \n",
+       "zzz_policyengine_taxed_income                          6200.0    11400.0   \n",
+       "zzz_policyengine_taxed_savings_income                  6200.0    11400.0   \n",
        "\n",
-       "                                                       428507  \n",
-       "abs_error                                              1380.0  \n",
+       "                                                       528973  \n",
+       "abs_error                                               999.0  \n",
        "AGERANGE                                                    3  \n",
        "BPADUE                                                      0  \n",
        "CAPALL                                                      0  \n",
@@ -3071,29 +2056,29 @@
        "EIDF                                                        0  \n",
        "EMPINC                                                      0  \n",
        "EPB                                                         0  \n",
-       "error                                                 -1380.0  \n",
+       "error                                                   999.0  \n",
        "EXPS                                                        0  \n",
-       "FACT                                                53.399523  \n",
-       "GIFTAID                                                  1500  \n",
+       "FACT                                                45.529136  \n",
+       "GIFTAID                                                     0  \n",
        "GIFTINV                                                     0  \n",
-       "GORCODE                                                    14  \n",
-       "IIDF                                                     1500  \n",
+       "GORCODE                                                     5  \n",
+       "IIDF                                                        0  \n",
        "INCBBS                                                      0  \n",
        "INCPBEN                                                     0  \n",
-       "INCPROP                                                  9650  \n",
+       "INCPROP                                                  1120  \n",
        "INDUSTRY07                                               1500  \n",
        "LLIR_RESTRICT_AMT_TOT                                       0  \n",
        "LOSSBF                                                      0  \n",
        "MAIND                                                       0  \n",
        "MAINSRCE                                                    5  \n",
-       "MAR                                                      STBR  \n",
+       "MAR                                                      NSBR  \n",
        "MCAS                                                        0  \n",
        "MOTHDED                                                     0  \n",
        "MOTHINC                                                     0  \n",
        "OSSBEN                                                      0  \n",
        "OTHERINC                                                    0  \n",
-       "OTHERINV                                                    0  \n",
-       "PAS                                                      1250  \n",
+       "OTHERINV                                                30200  \n",
+       "PAS                                                     12500  \n",
        "PAY                                                         0  \n",
        "PENSION                                                     0  \n",
        "PENSRLF                                                     0  \n",
@@ -3104,48 +2089,44 @@
        "SEISS                                                       0  \n",
        "SEX                                                         2  \n",
        "SPA                                                         0  \n",
-       "SREF                                                 15496884  \n",
+       "SREF                                                 15611035  \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                                       1380  \n",
+       "TAX_ST_BR_DEVO_TXP                                          0  \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                                                   6900  \n",
+       "TAXINC                                                  18820  \n",
        "TAXPAYER                                                    1  \n",
        "TAXTERM                                                     0  \n",
        "TEI                                                         0  \n",
-       "TI                                                       9650  \n",
-       "TII                                                      9650  \n",
-       "TOTTAX_DEVO_TXP                                          1380  \n",
+       "TI                                                      31320  \n",
+       "TII                                                     31320  \n",
+       "TOTTAX_DEVO_TXP                                          2565  \n",
        "UBISJA                                                      0  \n",
        "WELSH_TXP                                                   0  \n",
-       "zzz_policyengine_add_rate_savings_income                  0.0  \n",
-       "zzz_policyengine_adjusted_net_income                   9650.0  \n",
-       "zzz_policyengine_basic_rate_savings_income                0.0  \n",
-       "zzz_policyengine_basic_rate_savings_income_pre_...        0.0  \n",
+       "zzz_policyengine_adjusted_net_income                  31320.0  \n",
        "zzz_policyengine_earned_taxable_income                    0.0  \n",
-       "zzz_policyengine_employment_benefits                      0.0  \n",
        "zzz_policyengine_employment_deductions                    0.0  \n",
-       "zzz_policyengine_higher_rate_savings_income               0.0  \n",
-       "zzz_policyengine_income_tax                               0.0  \n",
+       "zzz_policyengine_gift_aid                                 0.0  \n",
+       "zzz_policyengine_income_tax                            3564.0  \n",
+       "zzz_policyengine_marriage_allowance                       0.0  \n",
        "zzz_policyengine_other_tax_credits                        0.0  \n",
-       "zzz_policyengine_pays_scottish_income_tax               False  \n",
        "zzz_policyengine_personal_allowance                   12500.0  \n",
-       "zzz_policyengine_received_allowances                   9650.0  \n",
-       "zzz_policyengine_received_allowances_savings_in...        0.0  \n",
+       "zzz_policyengine_received_allowances                  12500.0  \n",
+       "zzz_policyengine_received_allowances_dividend_i...        0.0  \n",
+       "zzz_policyengine_received_allowances_earned_income     1120.0  \n",
+       "zzz_policyengine_received_allowances_savings_in...    11380.0  \n",
        "zzz_policyengine_savings_allowance                     1000.0  \n",
-       "zzz_policyengine_savings_starter_rate_income              0.0  \n",
        "zzz_policyengine_taxable_employment_income                0.0  \n",
-       "zzz_policyengine_taxable_pension_income                   0.0  \n",
-       "zzz_policyengine_taxable_savings_interest_income          0.0  \n",
+       "zzz_policyengine_taxable_savings_interest_income      30200.0  \n",
        "zzz_policyengine_taxed_dividend_income                    0.0  \n",
-       "zzz_policyengine_taxed_income                             0.0  \n",
-       "zzz_policyengine_taxed_savings_income                     0.0  "
+       "zzz_policyengine_taxed_income                         17820.0  \n",
+       "zzz_policyengine_taxed_savings_income                 17820.0  "
       ]
      },
      "metadata": {},
@@ -3163,8 +2144,12 @@
     "    (df['PENSION'] == 0) &\n",
     "    (df['INCPROP'] != 0) &\n",
     "    (df['PAS'] != 0) &\n",
-    "    (df['MOTHDED'] == 0)\n",
-    "    # (df['abs_error'] < 1000)\n",
+    "    (df['MOTHDED'] == 0) &\n",
+    "    # (df['abs_error'] < 250) &\n",
+    "    # (df['abs_error'] < 1005) &\n",
+    "    (df['MAIND'] != -1) & \n",
+    "    (df['OTHERINV'] > 0)\n",
+    "    # (df['GIFTAID'] == 0)\n",
     "].sort_values(\"abs_error\", ascending=False).head().T.sort_index(key=lambda x: x.str.lower())\n",
     "\n",
     "display(result_df)"