diff --git a/changelog.d/1095-uk-spi-contributory-awards-pension-receipt.added.md b/changelog.d/1095-uk-spi-contributory-awards-pension-receipt.added.md new file mode 100644 index 0000000000..59ae91f6ca --- /dev/null +++ b/changelog.d/1095-uk-spi-contributory-awards-pension-receipt.added.md @@ -0,0 +1 @@ +The `spi_benefit_coherence` receipt now shows how much of the SPI copies' contributory JSA and ESA rests on pension payments, which the stage does not reduce the awards for (Vahid's review of microcosm#1426). For each award it gives the support and weighted award of the copies whose pension payments are above the award's threshold. Pension payments here are `private_pension_income`, the SPI tape's PENSION, over 52 weeks. The thresholds are £50 a week for JSA, above which JSA Regs 1996 reg 81 takes every pound off the award (policyengine-uk's `gov.dwp.JSA.contrib.pension_disregard`), and £85 a week for ESA, above which ESA Regs 2008 reg 74 takes half of every pound. The figure is the most such a reduction could take off. It is withheld where one or two source households carry it or the rest of the award. The stage's docstring now also says why the awards are not reduced, and that its weekly work tests average the tape's annual pay over 52 weeks, which understates part-year claimants. diff --git a/changelog.d/1359-lcfs-cross-fitted-gates.changed.md b/changelog.d/1359-lcfs-cross-fitted-gates.changed.md new file mode 100644 index 0000000000..e0591bf56c --- /dev/null +++ b/changelog.d/1359-lcfs-cross-fitted-gates.changed.md @@ -0,0 +1,24 @@ +The LCFS consumption chain cross-fits its sign gates (`gate_calibration: cross_fitted` on its `fit_weighted_qrf_chain`). The in-sample gates had never seen the frame's households, and drew rare spending on them too rarely; now each sign is drawn at its donor rate on households the gates were not fitted to. + +Shares of households with each spending, at prior weights. Each is a full spine built from main, then the same build with the cross-fitted gates; LCFS donors in brackets: +- solid fuels: 0.30% → 2.17% (2.47%); +- liquid fuels: 3.10% → 3.91% (4.54%); +- education: 4.29% → 6.71% (5.83%); +- tobacco: 8.17% → 11.04% (10.34%); +- gambling stakes: 14.49% → 16.76% (17.03%); +- betting and gaming, as the diary draws it before the gambling top-up: 1.95% → 2.70% (3.58%). + +The near-universal divisions' zeros are now drawn at their rate too: +- food: 99.67% → 99.05% (99.15%); +- recreation: 98.91% → 97.02% (97.27%). + +The twelve divisions' prior-weighted total falls 1.5%, and the six divisions held at the shared frame-to-donor ratio fall with it. + +The prior-weighted full-rate VAT base, the twelve divisions times each household's full-rate share, falls 1.7%. Read it as a ratio. policyengine-uk's survey VAT consumption coverage matches receipts on the cut it is derived on, so re-deriving it on the first cut built with this change should move it by about the same ratio: to about 0.68 from the 0.69 that PolicyEngine/policyengine-uk#2634 derives on `a6299504`, a cut built without it. + +The excise inputs keep their national levels, but the multiples of spending change: +- tobacco duty is about 1.8 times the tobacco spending of the households that carry it, down from 2.2; +- alcohol duty is 0.44 times alcohol spending, up from 0.40; +- the gambling top-up keeps the National Lottery and betting and gaming keys at GSGB participation in both builds. With the diary-level stakes lower, Lottery Duty goes from 0.58 to 0.63 times National Lottery stakes. The other gambling duties go from 4.9 to 5.3 times betting and gaming stakes. + +Every LCFS stage-health gate passes. The gambling stake scale needs the lower floor of 0.3 (María's ruling of 2026-11-03). diff --git a/changelog.d/1359-qrf-gate-calibration.added.md b/changelog.d/1359-qrf-gate-calibration.added.md new file mode 100644 index 0000000000..3e647dbf7e --- /dev/null +++ b/changelog.d/1359-qrf-gate-calibration.added.md @@ -0,0 +1,10 @@ +`RegimeGatedQRF` takes a `gate_calibration`, named by the new `GateCalibration` constants. The default, `in_sample`, is the sign gate as before, and its draws do not move. That gate is one boosted classifier, calibrated only on its own training rows. It memorises a rare class's training rows, so on every other row, every recipient included, it draws that class too rarely. + +`cross_fitted` fits a gate on each of five folds of the training rows, stratified by class. One weighted calibration (Platt scaling, for two classes) is fitted on the gates' out-of-fold scores and maps each of them, and a row's probability is the mean of the mapped gates. A rare class is then drawn at its rate on rows the gates were not fitted to. + +- **Where the balance holds.** The rate balance is exact on the pooled out-of-fold donor scores, not on any recipient set. +- **What moves.** The forests and the draw uniforms are unchanged. In a chain, though, a sign that changes moves later targets' amounts through their predictors. +- **Grouped folds.** `groups` (on `fit`, `start_chain` and `fit_draw_next`, and the `fit` helper) deals whole groups, such as a household's members, to the same fold. A chain locks its grouping and refuses a step that changes it. +- **Fallbacks.** A target keeps the in-sample gate when a class has fewer rows (or groups) than folds, or when a fold's training rows carry no weight for a class. The calibration falls back to the class rates when its balance cannot be met or the out-of-fold ranking is worse than none. +- **Recorded outcomes.** `FittedRegimeGatedQRF.gate_outcomes()` names what each target got, with the new `GateOutcome` constants, and the `fit.qrf@1` graph kernel takes `gate_calibration` too. +- **Checkpoints.** A chain checkpoint names the calibration only when it is cross-fitted, and the grouping only when it was given, so in-sample checkpoints are unchanged. diff --git a/changelog.d/1359-uk-cross-fitted-gates.changed.md b/changelog.d/1359-uk-cross-fitted-gates.changed.md new file mode 100644 index 0000000000..55ce29605e --- /dev/null +++ b/changelog.d/1359-uk-cross-fitted-gates.changed.md @@ -0,0 +1,15 @@ +Every other UK imputation whose QRF draws a sign through the gate now cross-fits it too. That covers: +- the ETB services and WAS wealth chains; +- the SPI tape forest, the FRS reference forests its rank transport reads, and the FRS-only stage 2; +- the SPI housing shell's amounts, the NTS bus-use band, salary sacrifice and the Universal Credit reporter redraw; +- the LCFS prepayment-meter and zero-road-fuel redraws. + +Fits on people or benefit units deal each household to one fold. Each stage's evidence names every gate's outcome under `gate_outcomes`. The ETB VAT rate is positive on every donor, so its fit has no gate and does not change. + +**On held-out donors**, out of fold, the cross-fitted gate draws each fit's rarest sign within 10% of its rate on 167 of 168 gated UK fits, against 122 for the in-sample gate, and it has the lower log loss on 165. + +**On a full spine from main**, at prior weights, the largest moves outside LCFS are: +- WAS student loan balances: 2.86% → 3.79% of households (donors 6.66%); +- ETB rail support: 14.15% → 15.89% (donors 16.52%). + +The NTS, salary sacrifice and UC reporter draws move by under 0.1 points. The CGT incidence clones key on the SPI-drawn incomes, so the frame has 0.4% fewer households, at the same total weight. A full spine build takes about 22 minutes, against 12. diff --git a/changelog.d/1359-uk-gambling-stake-scale-floor.changed.md b/changelog.d/1359-uk-gambling-stake-scale-floor.changed.md new file mode 100644 index 0000000000..8c903bf1a3 --- /dev/null +++ b/changelog.d/1359-uk-gambling-stake-scale-floor.changed.md @@ -0,0 +1 @@ +The gambling participation gate (`uk_stage_lcfs_consumption_gambling_participation`) lets the stake scale fall to 0.3 instead of 0.5 (María's ruling of 2026-11-03, microcosm#1359). The scale is what the stage multiplies the added regular players' drawn stakes by to bring their mean to the seen players'. With the LCFS chain's sign gates cross-fitted, the chain draws betting and gaming for more of the diary's households, at about the donors' own stake per player. So the seen players' mean falls, and with it the scale, from 0.63 to about 0.41, while the stake draws themselves do not move. Incidence and the duty bases are unchanged: every key still reaches its GSGB participation, and every base its published level. A draw that puts the added players' mean more than about 3.3 times the seen players' still fails, as one under 0.4 times does. diff --git a/docs/evidence/spec-engine/us-f0-coverage.json b/docs/evidence/spec-engine/us-f0-coverage.json index 5a8c1b6c39..54f9b3fe07 100644 --- a/docs/evidence/spec-engine/us-f0-coverage.json +++ b/docs/evidence/spec-engine/us-f0-coverage.json @@ -1642,13 +1642,13 @@ "compiler_ir.node_slices" ], "expected": { - "map_sha256": "99fafd886bc7a022fcc4718169c5d9eef336d44cea849998a4584f243ac8c3cf", - "protocol_sha256": "61b4206ab27a7d9c616ba6caa6c8a3f537fc35222e9eae2ca4f665dbeef6a08d" + "map_sha256": "2ca5e0a6c53617cc6e025086e883eab8209f153547dfdb09ea220d2ff35dfe60", + "protocol_sha256": "d8217ce7f319cebdbcf8125e1313ae951fc7f03bcad7ed3550f498c4cc31e269" }, "failures": [], "observed": { - "map_sha256": "99fafd886bc7a022fcc4718169c5d9eef336d44cea849998a4584f243ac8c3cf", - "protocol_sha256": "61b4206ab27a7d9c616ba6caa6c8a3f537fc35222e9eae2ca4f665dbeef6a08d" + "map_sha256": "2ca5e0a6c53617cc6e025086e883eab8209f153547dfdb09ea220d2ff35dfe60", + "protocol_sha256": "d8217ce7f319cebdbcf8125e1313ae951fc7f03bcad7ed3550f498c4cc31e269" }, "status": "covered" }, @@ -1663,7 +1663,7 @@ "compiler_ir.seed_stream_map" ], "expected": { - "implementation_sha256": "61b4206ab27a7d9c616ba6caa6c8a3f537fc35222e9eae2ca4f665dbeef6a08d", + "implementation_sha256": "d8217ce7f319cebdbcf8125e1313ae951fc7f03bcad7ed3550f498c4cc31e269", "protocol": "legacy-v1", "streams": [ "build_model", @@ -1684,7 +1684,7 @@ }, "failures": [], "observed": { - "implementation_sha256": "61b4206ab27a7d9c616ba6caa6c8a3f537fc35222e9eae2ca4f665dbeef6a08d", + "implementation_sha256": "d8217ce7f319cebdbcf8125e1313ae951fc7f03bcad7ed3550f498c4cc31e269", "protocol": "legacy-v1", "streams": [ "build_model", @@ -2585,7 +2585,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "fe3901b59a02c22978cc57a296afddfca91732f952c8ebc0ed9d44f3bfe6bf16" + "spec_sha256": "a6bb8fc46541352972195992cdc1b2401637322d353992d6321f204d5c74245a" } }, "report_schema_version": 3, @@ -2595,7 +2595,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "fe3901b59a02c22978cc57a296afddfca91732f952c8ebc0ed9d44f3bfe6bf16" + "spec_sha256": "a6bb8fc46541352972195992cdc1b2401637322d353992d6321f204d5c74245a" }, "status": "pass" } diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py index c3d74a7074..e0340338ef 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py @@ -380,8 +380,8 @@ # microcosm#1259's recipient-share bound in puf_support moves both again. # microcosm#1261 moves both again: the PUF donor carries partnership and # S-corp line-32 shares as separate leaves. - "seed_map": '99fafd886bc7a022fcc4718169c5d9eef336d44cea849998a4584f243ac8c3cf', - "seed_protocol": '61b4206ab27a7d9c616ba6caa6c8a3f537fc35222e9eae2ca4f665dbeef6a08d', + "seed_map": '2ca5e0a6c53617cc6e025086e883eab8209f153547dfdb09ea220d2ff35dfe60', + "seed_protocol": 'd8217ce7f319cebdbcf8125e1313ae951fc7f03bcad7ed3550f498c4cc31e269', "source_manifest": "608c3621b1e4a108e57c8f83d16a184acdb3d05e16a81b895f7f72dbf5d0685c", "take_up": "9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35", "tail": "071d418bb49976f4682c320d2ad07097c177de3a645d2524f235e1ff33ac83f9", diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json b/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json index a90c41670d..91bba03896 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/schema/sources.schema.json @@ -3223,6 +3223,12 @@ }, "weight": { "type": "string" + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } }, "required": [ @@ -3592,6 +3598,12 @@ "null" ] } + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } }, "required": [ @@ -3724,6 +3736,12 @@ }, "weight_mapping": { "type": "string" + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } }, "required": [ @@ -7744,6 +7762,12 @@ "salt": { "type": "string", "minLength": 1 + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } } }, @@ -7787,6 +7811,12 @@ }, "seed": { "type": "integer" + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } } }, @@ -8385,6 +8415,12 @@ "null" ] } + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } } }, @@ -8485,6 +8521,12 @@ }, "seed": { "type": "integer" + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } } }, @@ -8580,6 +8622,12 @@ }, "seed": { "type": "integer" + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } } }, @@ -8685,6 +8733,12 @@ }, "seed": { "type": "integer" + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } } }, @@ -8951,6 +9005,12 @@ }, "seed": { "type": "integer" + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } } }, @@ -11501,6 +11561,12 @@ } } } + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } } }, @@ -13439,6 +13505,12 @@ "n_estimators": { "type": "integer", "minimum": 1 + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } } }, @@ -13480,6 +13552,12 @@ "n_estimators": { "type": "integer", "minimum": 1 + }, + "gate_calibration": { + "enum": [ + "in_sample", + "cross_fitted" + ] } } }, diff --git a/packages/microcosm-build/src/microcosm/build/uk/gates.json b/packages/microcosm-build/src/microcosm/build/uk/gates.json index 72ebc0f495..d4653b0d56 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/gates.json +++ b/packages/microcosm-build/src/microcosm/build/uk/gates.json @@ -440,12 +440,12 @@ "maximum_relative_deviation": 1e-09, "maximum_stratum_shortfall": 0.01, "amount_scale_bounds": [ - 0.5, + 0.3, 2.5 ], "required_support_band": "30+" }, - "notes": "Stage-time fact check on the lcfs gambling_participation receipt (microcosm#1359): each key's adult participation rates (the National Lottery's products, and the betting and gaming the other gambling duties charge; past four weeks and past twelve months, by sex and age band) are recomputed from the vendored GSGB 2025 rows through the stage's own declaration, never taken from the receipt, and must equal the receipt's, and the receipt's settings (theta per key, the occasional players' stake share, the strata, the propensity classifier, the seed and the salt) must be the declared ones. Per key, each household stratum the receipt gives must sit within maximum_stratum_shortfall of its four-week target and from there of its twelve-month target, or add no household where the diary already passed a target; the national shares must reach the targets less that shortfall; no added household may lack a stake; the three classes' shares of the key's stakes must sum to one; the scale that brings the added regular players' mean stake to the seen households' must lie in amount_scale_bounds, so a broken stake draw that the anchoring would otherwise hide fails (Vahid's review, round 4; the upper bound rose from 2.0 to 2.5 on María's ruling of 2026-10-26, since full spine builds scale the National Lottery's added regular players by about 2.03); the propensity must rest on 30 or more donors; and the excise levelling must have shared the gambling bases by the topped-up keys, each key positive on its twelve-month share. The receipt withholds a stratum with a cell on one or two source households, which the gate counts rather than checks; a key withheld nationally fails. The rates are recomputed from the same vendored rows the stage read, so the check catches a step that did not apply the declared rates or settings; it cannot catch an error in the rows themselves, and the stratum targets, which need the frame's adults, are the step's own (it refuses a stratum it cannot fill). A population fact check: the synthetic smoke records it without blocking." + "notes": "Stage-time fact check on the lcfs gambling_participation receipt (microcosm#1359): each key's adult participation rates (the National Lottery's products, and the betting and gaming the other gambling duties charge; past four weeks and past twelve months, by sex and age band) are recomputed from the vendored GSGB 2025 rows through the stage's own declaration, never taken from the receipt, and must equal the receipt's, and the receipt's settings (theta per key, the occasional players' stake share, the strata, the propensity classifier, the seed and the salt) must be the declared ones. Per key, each household stratum the receipt gives must sit within maximum_stratum_shortfall of its four-week target and from there of its twelve-month target, or add no household where the diary already passed a target; the national shares must reach the targets less that shortfall; no added household may lack a stake; the three classes' shares of the key's stakes must sum to one; the scale that brings the added regular players' mean stake to the seen households' must lie in amount_scale_bounds, so a broken stake draw that the anchoring would otherwise hide fails (Vahid's review, round 4; the upper bound rose from 2.0 to 2.5 on María's ruling of 2026-10-26, since full spine builds scale the National Lottery's added regular players by about 2.03; the lower bound fell from 0.5 to 0.3 on her ruling of 2026-11-03, since the chain's cross-fitted sign gates (microcosm#1359) draw betting and gaming for more of the diary's households at about the donors' own stake per player, which takes that key's scale to about 0.41); the propensity must rest on 30 or more donors; and the excise levelling must have shared the gambling bases by the topped-up keys, each key positive on its twelve-month share. The receipt withholds a stratum with a cell on one or two source households, which the gate counts rather than checks; a key withheld nationally fails. The rates are recomputed from the same vendored rows the stage read, so the check catches a step that did not apply the declared rates or settings; it cannot catch an error in the rows themselves, and the stratum targets, which need the frame's adults, are the step's own (it refuses a stratum it cannot fill). A population fact check: the synthetic smoke records it without blocking." }, { "id": "uk_stage_lcfs_consumption_basis", diff --git a/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json b/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json index 7cd89be45d..ff8aadfba6 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json +++ b/packages/microcosm-build/src/microcosm/build/uk/release_input_coverage_manifest.json @@ -472,7 +472,7 @@ "required_mass_change_reason": "Capital-gains incidence anchor moves the mass of non-liable clone households back to their paired originals until the sub-exempt and loss-making clone mass match the Advani-Summers reporter composition at the redrawn liable mass; every pair's mass and the total household mass are conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "Advani and Summers (2020), Capital Gains and UK Inequality, CAGE Working Paper 465", "survey": "Family Resources Survey 2024-25, SPI synthetic support, the HMRC Table 3 redrawn gains on the spine and Advani-Summers capital-gains incidence" @@ -495,7 +495,7 @@ "capital_gains" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "Advani and Summers (2020), Capital Gains and UK Inequality, CAGE Working Paper 465", "survey": "Family Resources Survey 2024-25, SPI synthetic support, and Advani-Summers capital-gains incidence" @@ -518,7 +518,7 @@ "required_mass_change_reason": "Capital-gains residential split divides every household carrying liable gainers into arms weighted by the solved residential probabilities, one arm per subset of residential gainers; every household's mass and the total household mass are conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "https://www.gov.uk/government/statistics/capital-gains-tax-statistics", "survey": "HMRC Capital Gains Tax statistics 2026 release, Table 8 (UK residential property disposals, 2024-25, administrative) on the amounts the Table 3 redraw placed" @@ -540,7 +540,7 @@ "required_mass_change_reason": "Capital-gains support split divides the wealthiest households of each HMRC Table 3 income band into light copies at equal weight; every household's mass and the total household mass are conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "HMRC Capital Gains Tax statistics, July 2026 release, Table 3 for 2024-25, via the vendored conditioning facts", "survey": "Family Resources Survey 2024-25, SPI synthetic support and HMRC Capital Gains Tax statistics Table 3 (2024-25 individuals by size of gain and taxable income)" @@ -570,7 +570,7 @@ "uc_is_in_gainful_self_employment" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "The FRS job record's company car answers through frs_spine's carriers (EXPBEN01, EXPBEN03, CARVAL, FUELTYP, CARCON, CARAMT), WAS round-8 company cars' list prices, and HMRC's 2024-25 company car recipients by CO2 band (Table 2A) and fuel (Table 2C), via the vendored facts", "survey": "Family Resources Survey 2024-25 job record; Wealth and Assets Survey round 8; HMRC Benefits in kind statistics (July 2026)" @@ -599,7 +599,7 @@ "required_mass_change_reason": "ETB public-services imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "UK Data Service SN 8856 Effects of Taxes and Benefits household tab, DfT rail fare index, and public NHS activity/cost table.", "survey": "Effects of Taxes and Benefits 1977-2024 and NHS age-gender public table" @@ -619,7 +619,7 @@ "required_mass_change_reason": "ETB VAT expenditure-rate imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "UK Data Service SN 8856 Effects of Taxes and Benefits household tab and cited VAT anchor resource.", "survey": "Effects of Taxes and Benefits 1977-2024" @@ -641,7 +641,7 @@ "required_mass_change_reason": "High-value home support divides every owner household in the top value stratum of its region into light copies at equal weight; every household's mass and the total household mass are conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "Microcosm structural operator (microcosm#1240 fix 1); no publisher input", "survey": "Family Resources Survey 2024-25 and SPI synthetic support, after the WAS wealth draw and the regional property uprating" @@ -662,7 +662,7 @@ "required_mass_change_reason": "CGT asset-type assignment on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "https://www.gov.uk/government/statistics/capital-gains-tax-statistics", "survey": "HMRC Capital Gains Tax statistics 2026 release, Table 8 (UK residential property disposals, 2024-25, administrative), Table 4.1 (individuals claiming Business Asset Disposal Relief or Investors' Relief by band of qualifying gain, 2024-25, administrative) and Table 7 (disposals, proceeds and gains by asset type, 2023-24, sample-based), vendored from the pinned Chronicle feed" @@ -686,7 +686,7 @@ "capital_gains" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "conditioning_resource": "hmrc_cgt_conditioning_facts.json", "conditioning_resource_sha256": "6a2ba5e3e43c6d7936416552aadc716729b902dcac24b97093ae8ccf06cf8a8f", @@ -776,7 +776,7 @@ "full_frs_tei_band_unavailable" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "hmrc_surface": "2023-24", "mapped_build_period": "2024", @@ -803,7 +803,7 @@ "required_mass_change_reason": "ISA subscriptions per adult from HMRC's ISA tables on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "HMRC Individual Savings Account statistics Tables 9.4, 9.6 and 9.7 to 9.9, the cash ISA limit reduction impact note and Lifetime ISA Table 1a, via the vendored facts; Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed round-8 person and household tabs (interviews April 2020 to March 2022, Great Britain).", "survey": "HMRC Annual savings statistics (September 2026 release); Wealth and Assets Survey round 8" @@ -873,7 +873,7 @@ "required_mass_change_reason": "LCFS consumption imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "UK Data Service SN 9603 Living Costs and Food Survey 2024-25 (2nd edition) household/person tabs and the vendored Chronicle facts for NEED 2024 mean kWh, DESNZ Energy Trends and QEP average prices paid for calendar 2024, road-fuel outturn (DESNZ, HMRC, ONS Consumer Trends) and road fuel by vehicle type (DESNZ), ONS Consumer Trends household spending by COICOP division, the DfT VEH1103 licensed-car stock, NTS bus use, the NTS private cars (UK Data Service SN 5340, End User Licence; the vehicle and household tabs, survey years 2022-2024) for the zero-emission share by income fifth and the household-paid road-fuel mix, and the DfT and devolved bus finance tables and fares indices.", "survey": "Living Costs and Food Survey 2024-25" @@ -899,7 +899,7 @@ "required_mass_change_reason": "NTS bus-travel imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "Department for Transport National Travel Survey, UK Data Service SN 5340 (End User Licence, 19th edition, November 2025), DOI 10.5255/UKDA-SN-5340-19; local licensed tab files (household, individual, trip); England residents only from 2013.", "survey": "National Travel Survey 2002-2024" @@ -919,7 +919,7 @@ "required_mass_change_reason": "Private-school attendance stored on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "policyengine-uk attends_private_school (the gov.simulation.private_school_vat attendance rates and factor), evaluated by the pinned engine", "survey": "policyengine-uk private-school attendance imputation, stored at the spine's weights" @@ -942,7 +942,7 @@ "property_finance_costs" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "https://www.gov.uk/government/statistics/property-rental-income-statistics", "survey": "Survey of Personal Incomes Public Use Tape 2022-23 and HMRC Property Rental Income Statistics 2026 (tax year 2024-25)" @@ -963,7 +963,7 @@ "required_mass_change_reason": "Annual property purchases imputed on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "https://www.gov.uk/government/statistics/uk-stamp-tax-statistics", "survey": "HMRC Annual Stamp Tax Statistics 2024 to 2025 (corrected 11 March 2026), Tables 6b, 8a and 8b" @@ -986,7 +986,7 @@ "property_wealth" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "uk/high_value_home_value_knots.json, built by tools/build_uk_high_value_home_stock.py from PolicyEngine/chronicle#343's registrations", "survey": "HM Land Registry Price Paid latest sales uprated with the UK House Price Index, owner-weighted by region (the dense value node's knots, region level)" @@ -1010,7 +1010,7 @@ "non_residential_property_value" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "MHCLG dwellings and the UK House Price Index regional average price averaged over the twelve months of calendar 2024 from the July 2026 full file, the frame's valuation basis, so the engine's annual uprating from 2024 projects the value once (microcosm#1240 fix 5).", "survey": "Public regional property reference" @@ -1038,7 +1038,7 @@ "employment_income" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "HMRC, Salary sacrifice reform for pension contributions effective from 6 April 2029", "survey": "Family Resources Survey 2024-25 salary-sacrifice respondents and HMRC salary-sacrifice reform analysis" @@ -1071,7 +1071,7 @@ "household_source_id" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "Reserved SPI support households for the HMRC Table 2.5 total-income bands from GBP 200,000, stacked at the published band taxpayer count over the donors per band (PolicyEngine/chronicle#280 lane).", "survey": "Survey of Personal Incomes Public Use Tape 2022-23 and HMRC Income Tax liabilities statistics July 2026 Table 2.5" @@ -1094,7 +1094,7 @@ "student_loan_balance" ], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "Explore Education Statistics Table 6a, Higher education total", "survey": "Family Resources Survey 2024-25 and Student Loans Company borrower forecasts for England" @@ -1114,7 +1114,7 @@ "required_mass_change_reason": "Self-employed gross receipts stored on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "self_employment_income after the SPI income stage; HMRC's published gainers of the raise to GBP 3,000, about 400,000 taxpayers with a lower bill by about GBP 380 on average", "survey": "The self-employed's own profit on the final spine, and HMRC's policy paper on the Budget 2026 trading allowance raise (calibration)" @@ -1136,7 +1136,7 @@ "required_mass_change_reason": "WAS Lifetime ISA imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed round-8 person and household tabs (interviews April 2020 to March 2022, Great Britain).", "survey": "Wealth and Assets Survey round 8" @@ -1175,7 +1175,7 @@ "required_mass_change_reason": "WAS wealth imputation on the source spine: household weights pass through unchanged and total household mass is conserved.", "rewrites": [], "source_manifest": "source_stages.json", - "source_manifest_sha256": "7763a7490b0ea61a4ce2887e062cbdeb29309881fe6ce52bb7c01334ee49fbce", + "source_manifest_sha256": "deeba6e923f5cceeab7c12fbfa12d33d8df1d6b95482a9c3db4cd9d2d9e5de2f", "source_vintages": { "source": "Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed 2006-22 household tab.", "survey": "Wealth and Assets Survey round 8" diff --git a/packages/microcosm-build/src/microcosm/build/uk/source_stages.json b/packages/microcosm-build/src/microcosm/build/uk/source_stages.json index c9c402188b..b0d535bace 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/source_stages.json +++ b/packages/microcosm-build/src/microcosm/build/uk/source_stages.json @@ -2162,7 +2162,8 @@ "charitable_investment_gifts": 0.0 }, "n_estimators": 100, - "seed": 42 + "seed": 42, + "gate_calibration": "cross_fitted" }, { "kind": "resample_band_donor_leaves", @@ -2272,6 +2273,7 @@ "maternity_allowance_reported": "Absent from the pinned enhanced-FRS export and certified Microcosm UK base; no training source can be materialized for this stage." }, "postprocess": { + "savings_interest_income": "the stage-1 INCBBS draw, interest outside ISAs; individual_savings_account_interest_income is the stage-2 draw beside it (microcosm#1360)", "refresh_disability_categories": [ "aa_category", "dla_sc_category", @@ -2283,15 +2285,15 @@ "is_disabled_for_benefits", "is_enhanced_disabled_for_benefits", "is_severely_disabled_for_benefits" - ], - "savings_interest_income": "the stage-1 INCBBS draw, interest outside ISAs; individual_savings_account_interest_income is the stage-2 draw beside it (microcosm#1360)" + ] }, "joint_draw": true, "require_all_predictors": true, "require_all_materializable_outputs": true, "require_all_outputs": false, "n_estimators": 100, - "seed": 43 + "seed": 43, + "gate_calibration": "cross_fitted" }, { "kind": "zero_pension_age_reports_below_state_pension_age", @@ -2663,7 +2665,7 @@ "contributory_benefits_annual_share", "annuity_and_trust_income" ], - "notes": "Runs the SPI-trained income QRFs on the raw-spine support channel, drawing for its claimants and partners aged 16 and over so dependants aged 16 to 19 keep their FRS twin's values (uk-data#504, microcosm#1095), initializes FRS charity columns to zero, trains FRS-only stage 2 on the FRS rows' reported values, flags the rows it drew (person_is_spi_income_recipient) so later stages tell tape-concept rows from FRS-concept ones without re-deriving the recipient rule (microcosm#840), leaves every FRS-channel income as reported (no base-channel redraw of dividends; uk-data#498, microcosm#1095), and emits a sidecar-only 208-fact replay report for the spine path. Stage 2 also draws trading_loss, the year's trading loss the tape does not carry, from the FRS rows (uk-data#528), and a drawn row whose self_employment_income is positive keeps no loss, so profit and loss never both hold an amount, as on the FRS rows (microcosm#1095). The chain draws self_employment_income net of the tape's losses brought forward (LOSSBF), as the tape holds profits, and last of all, so no earlier draw moves, the year's profit before them and the losses. After the FRS-only fill and the HMRC aggregates the stage moves the losses out of the profit into loss_relief and ni_class_4_losses_brought_forward, the inputs policyengine-uk relieves them against (income tax under ITA 2007 s.83, Class 4 under SSCBA 1992 Sch 2 para 3), so Universal Credit, HBAI and market income read the year's profit; where the drawn net profit is positive the losses are its gap to the year's profit and where it is zero they are at least that profit, so the profit after the relief is the drawn net profit on every row, which the HMRC aggregates and the HMRC self-employment rows read (uk-data#528, microcosm#1095). The engine carries both losses into each projected year at their nominal value while the profit grows with its index. Stage 2 draws the six owner-manager inputs last, the five flags as 0 or 1 and then the income share, so each follows the drawn incomes; the root stage's rules then hold on the drawn rows (an owner works in the company, its other inputs need an owner, and a company carries on a trade or a property business, never both), since the tape carries no director answers (microcosm#1095). A drawn row's annual income descriptors follow its drawn incomes. The tape records the tax year's income, so its pay, profit and private pension shares are 1, and its contributory benefits, stage-2 draws on the current concept with no spell of their own, take share 1 too. It keeps its twin's other-spell pay only where it drew no pay, and its twin's ceased self-employment only where it drew no profit, since the bridge draws a record without pay for a twin who left a job in the year. An undrawn copy keeps its twin's descriptors with its twin's incomes. A drawn row's annuity and trust descriptor is zero, since the tape's private pension excludes those payments and books them as other income (microcosm#1428)." + "notes": "Runs the SPI-trained income QRFs on the raw-spine support channel, drawing for its claimants and partners aged 16 and over so dependants aged 16 to 19 keep their FRS twin's values (uk-data#504, microcosm#1095), initializes FRS charity columns to zero, trains FRS-only stage 2 on the FRS rows' reported values, flags the rows it drew (person_is_spi_income_recipient) so later stages tell tape-concept rows from FRS-concept ones without re-deriving the recipient rule (microcosm#840), leaves every FRS-channel income as reported (no base-channel redraw of dividends; uk-data#498, microcosm#1095), and emits a sidecar-only 208-fact replay report for the spine path. The sign gates of both stages, and of the FRS reference forests the transport locates twins on, are cross-fitted (gate_calibration: cross_fitted on both operations; microcosm#1359), each calibrated on the donors its fold gates left out, with each FRS household's members in one fold. The reference forests take stage 1's declaration, so the gate that places a twin's observed sign and the tape gate that reads it are calibrated alike. Stage 2 also draws trading_loss, the year's trading loss the tape does not carry, from the FRS rows (uk-data#528), and a drawn row whose self_employment_income is positive keeps no loss, so profit and loss never both hold an amount, as on the FRS rows (microcosm#1095). The chain draws self_employment_income net of the tape's losses brought forward (LOSSBF), as the tape holds profits, and last of all, so no earlier draw moves, the year's profit before them and the losses. After the FRS-only fill and the HMRC aggregates the stage moves the losses out of the profit into loss_relief and ni_class_4_losses_brought_forward, the inputs policyengine-uk relieves them against (income tax under ITA 2007 s.83, Class 4 under SSCBA 1992 Sch 2 para 3), so Universal Credit, HBAI and market income read the year's profit; where the drawn net profit is positive the losses are its gap to the year's profit and where it is zero they are at least that profit, so the profit after the relief is the drawn net profit on every row, which the HMRC aggregates and the HMRC self-employment rows read (uk-data#528, microcosm#1095). The engine carries both losses into each projected year at their nominal value while the profit grows with its index. Stage 2 draws the six owner-manager inputs last, the five flags as 0 or 1 and then the income share, so each follows the drawn incomes; the root stage's rules then hold on the drawn rows (an owner works in the company, its other inputs need an owner, and a company carries on a trade or a property business, never both), since the tape carries no director answers (microcosm#1095). A drawn row's annual income descriptors follow its drawn incomes. The tape records the tax year's income, so its pay, profit and private pension shares are 1, and its contributory benefits, stage-2 draws on the current concept with no spell of their own, take share 1 too. It keeps its twin's other-spell pay only where it drew no pay, and its twin's ceased self-employment only where it drew no profit, since the bridge draws a record without pay for a twin who left a job in the year. An undrawn copy keeps its twin's descriptors with its twin's incomes. A drawn row's annuity and trust descriptor is zero, since the tape's private pension excludes those payments and books them as other income (microcosm#1428)." }, { "artifacts": [ @@ -2939,7 +2941,8 @@ ], "landing": "household_reference_person", "n_estimators": 100, - "seed": 0 + "seed": 0, + "gate_calibration": "cross_fitted" } ], "outputs": [], @@ -2962,7 +2965,7 @@ "housing_benefit_reported", "council_tax_benefit_reported" ], - "notes": "Runs after the SPI income chain and before the income-conditioned donor stages, the household counterpart of the SPI stage-2 FRS-only fill. The support copies and income band donors are whole FRS households, so without this stage each kept its FRS parent's housing, drawn for the parent's income. Trained on the FRS base households (positive household weight) and drawn for every SPI-channel household from engine-free predictors (region, household type, adults, children, single-adult status, reference-person age and household income components). Tenure, dwelling type, bedrooms and council-tax band are drawn in that order by weighted multiclass classifiers with an inverse-CDF draw; the housing amounts and the head benefit unit's Housing Benefit and the reference person's council tax benefit by one chained regime-gated QRF conditioned on the drawn categories, clipped to the training range. Every draw reads uniforms keyed on household_id. An amount is zero wherever the training households have no positive value for its tenure or region; mortgage payments need a mortgaged tenure (true of every FRS household); Housing Benefit needs a rented tenure (the engine pays it to renting reporters only); council tax benefit is capped at council tax and the household council_tax_rebate equals it, both on the reference person as the FRS holds them. Region, single-adult status, BRMA (region and the recipient's own LHA category), the flat-rate household draws and composition are kept; FRS base rows are byte-unchanged." + "notes": "Runs after the SPI income chain and before the income-conditioned donor stages, the household counterpart of the SPI stage-2 FRS-only fill. The support copies and income band donors are whole FRS households, so without this stage each kept its FRS parent's housing, drawn for the parent's income. Trained on the FRS base households (positive household weight) and drawn for every SPI-channel household from engine-free predictors (region, household type, adults, children, single-adult status, reference-person age and household income components). Tenure, dwelling type, bedrooms and council-tax band are drawn in that order by weighted multiclass classifiers with an inverse-CDF draw; the housing amounts and the head benefit unit's Housing Benefit and the reference person's council tax benefit by one chained regime-gated QRF conditioned on the drawn categories, clipped to the training range. The QRF's sign gates are cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: each is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on households the gates were not fitted to. Every draw reads uniforms keyed on household_id. An amount is zero wherever the training households have no positive value for its tenure or region; mortgage payments need a mortgaged tenure (true of every FRS household); Housing Benefit needs a rented tenure (the engine pays it to renting reporters only); council tax benefit is capped at council tax and the household council_tax_rebate equals it, both on the reference person as the FRS holds them. Region, single-adult status, BRMA (region and the recipient's own LHA category), the flat-rate household draws and composition are kept; FRS base rows are byte-unchanged." }, { "stage": "was_wealth", @@ -3160,7 +3163,8 @@ ], "undrawn_fraction": 1.0 }, - "secured_debt_within": "other_mortgage" + "secured_debt_within": "other_mortgage", + "gate_calibration": "cross_fitted" }, { "kind": "fold_into", @@ -3242,7 +3246,7 @@ "other_residential_property_secured_debt", "non_residential_property_secured_debt" ], - "notes": "Ports incumbent WAS round-8 wealth imputation with signed E5 differences: exact lower-case column matching replaces the fuzzy r/w fallback; cash ISA uses DVCISAVR8_aggr and stocks-and-shares ISA uses DVIISAVR8_aggr; private pension wealth (WAS total private pension wealth less the current defined-benefit component; DB-type components at the SCAPE rate, money-purchase components at reported fund values) is drawn as its own output private_pension_wealth and no longer folded into corporate_wealth, which keeps only the share-like holdings - pension rights are disregarded capital in every means test (UC Regs 2013 Sch 10 para 10 and the HB/JSA/ESA/IS/SPC parallels; uk-data#452) - and the downstream chain segment conditions on both components; each chain segment starts its own fit and draw RNG streams from a child seed derived deterministically from the declared seed (start_chain respawns from the model seed on every call, so one shared model coupled the k-th target of every segment); corporate_wealth folds stocks-and-shares ISA after drawing corporate_wealth_excl_isa; recipient Northern Ireland regions are mapped to Wales for prediction only; student_loan_balance is allocated by household id rather than the incumbent positional off-by-one. Tenure enters every chain segment as one four-way category built the same way on both sides (microcosm#1063): the donor's from Ten1R8 and DVPriRntR8 (owned outright; buying with a mortgage or part rent, part mortgage; rented or rent-free from a private landlord; rented from a council or housing association), the recipient's from the frame's tenure_type (council and housing association together), so the stage reads no engine tenure formula. Two columns are structural in tenure and are fitted and drawn inside their stratum only, zero by rule elsewhere: main_residence_value on the owner tenures (every WAS owner has a positive value and no renter has one) and main_residence_mortgage (TotMortR8) on the mortgaged tenure. mortgage_debt is HMortGR8, all of the household's mortgages, and is derived as the main-residence mortgage plus the mortgages on other property (other_mortgage, HMortGR8 less TotMortR8 on the donor: buy-to-let, second homes and the rest), which are held on every tenure and drawn without a stratum, so an outright owner's or a renter's buy-to-let keeps its mortgage beside the property it is secured on (OthMortR8_sum is read for the receipt only); the donor's conditioning copy carries the same rule, so consumer_debt is fitted on values recipients can hold. Totals are not drawn: property_wealth is the sum of land, the main residence, other houses, buildings and a drawn remainder (buy-to-let, overseas and other property), gross_financial_wealth is savings, the cash ISA, the share-like holdings and a drawn remainder, and net_financial_wealth is gross less consumer debt and the student loan balance - identities the pinned tab satisfies on every row and the cleaning step refuses a donor that breaks. A sum of donor-valued components that leaves the donor's range for the total gives up the excess from the remainder first, and the receipt counts the rows. Eleven chain segments, each with its own child seed: land; the main residence; the other property components; pension and share-like wealth; the financial components, vehicles and the student loan balance; the main-residence mortgage; the other mortgages; consumer debt; then three appended after them, so the first eight draw as they did before them (microcosm#1095, the WAS property draw), each fitted on the donors and drawn for the recipients holding the column holder_strata names. The first is the directly held fraction of the share-like holdings outside ISAs, from which the stage writes directly_held_shares (WAS UK shares plus employee shares and options) and unit_and_investment_trusts (WAS collective investments, which the survey asks about in one question; uk-data#501), the inputs policyengine-uk reads inside corporate_wealth (pe-uk#1974): the split is written on the final corporate_wealth less the stocks-and-shares ISA, so the two and the ISA sum to corporate_wealth and the engine's share_like_capital stays corporate_wealth; a household with such holdings but no drawn fraction (a clip that lowered the ISA alone) holds them directly (undrawn_fraction), and the receipt counts it. The other two are the debt secured on other residential property (WAS DVHseDebtR8_sum + DVBLtDebtR8_sum) and on non-residential property (DVBldDebtR8_sum), which policyengine-uk deducts after the sale costs in valuing Universal Credit property capital (UC Regs 2013 reg 49(1)(b)): each is zero where the final value of its asset is zero, and the two are parts of the mortgages on other property, so where their sum passes other_mortgage both are scaled down to it (secured_debt_within); the receipt counts the rows each rule touched, and the wealth_coherence gate holds the split and the debts as identities. HFINWNTR8_exSLC_Sum is net financial wealth excluding student loans, so gross less it is the non-student-loan financial liabilities; UKDS SN 7215 documentation is the codebook. Engine predictors materialize at their native entity and person/benunit values are summed to household, reproducing the incumbent map_to=household semantics; region is one-hot encoded jointly across donor and recipient (the incumbent's dummy encoding), with unmapped donor GOR codes becoming all-zero dummy rows. The WAS and FRS predictor definitions are not fully like-for-like and are ported as-is; raw WAS missing values are blanket-filled with zero; UKDS negative sentinel codes (-9/-8/-7/-6) are recoded to zero for the nonnegative-domain columns the licensed audit found carrying them (vcarnr8: 2 rows; HBedRmR8: 95.8 percent - the bedrooms question is effectively unasked in the WAS household file, predictor-quality revisit registered on microcosm#145) - a signed difference vs the incumbent, which trains on raw sentinels; DVPriRntR8's -9 is structural not-applicable so the private-renter reading is unchanged; genuinely negative domains are never recoded. The recipient council_tax predictor is the bill the household pays, council_tax less council_tax_rebate, the quantity the WAS donor records, since the spine's council_tax is the liability before council tax reduction (uk-data#496/#499, microcosm#1095). The donor council_tax is DVCTaxAmtAnnualR8, the annual amount paid (CTAmtR8 is one instalment), its children are NumChildR8 (NumCh18R8 overlaps NumAdultR8), and the recipient adults and children are the household's FRS claimants and partners and its other members (is_uc_claimant), which together make the household size on both sides; rental_income is the donor's net rent DVNetRentAmtAnnualR8_aggr against the household's property_income (uk-data#486/#495, microcosm#1095)." + "notes": "Ports incumbent WAS round-8 wealth imputation with signed E5 differences: exact lower-case column matching replaces the fuzzy r/w fallback; cash ISA uses DVCISAVR8_aggr and stocks-and-shares ISA uses DVIISAVR8_aggr; private pension wealth (WAS total private pension wealth less the current defined-benefit component; DB-type components at the SCAPE rate, money-purchase components at reported fund values) is drawn as its own output private_pension_wealth and no longer folded into corporate_wealth, which keeps only the share-like holdings - pension rights are disregarded capital in every means test (UC Regs 2013 Sch 10 para 10 and the HB/JSA/ESA/IS/SPC parallels; uk-data#452) - and the downstream chain segment conditions on both components; each chain segment starts its own fit and draw RNG streams from a child seed derived deterministically from the declared seed (start_chain respawns from the model seed on every call, so one shared model coupled the k-th target of every segment); corporate_wealth folds stocks-and-shares ISA after drawing corporate_wealth_excl_isa; recipient Northern Ireland regions are mapped to Wales for prediction only; student_loan_balance is allocated by household id rather than the incumbent positional off-by-one. Its QRF sign gates are cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: each is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on households the gates were not fitted to. Tenure enters every chain segment as one four-way category built the same way on both sides (microcosm#1063): the donor's from Ten1R8 and DVPriRntR8 (owned outright; buying with a mortgage or part rent, part mortgage; rented or rent-free from a private landlord; rented from a council or housing association), the recipient's from the frame's tenure_type (council and housing association together), so the stage reads no engine tenure formula. Two columns are structural in tenure and are fitted and drawn inside their stratum only, zero by rule elsewhere: main_residence_value on the owner tenures (every WAS owner has a positive value and no renter has one) and main_residence_mortgage (TotMortR8) on the mortgaged tenure. mortgage_debt is HMortGR8, all of the household's mortgages, and is derived as the main-residence mortgage plus the mortgages on other property (other_mortgage, HMortGR8 less TotMortR8 on the donor: buy-to-let, second homes and the rest), which are held on every tenure and drawn without a stratum, so an outright owner's or a renter's buy-to-let keeps its mortgage beside the property it is secured on (OthMortR8_sum is read for the receipt only); the donor's conditioning copy carries the same rule, so consumer_debt is fitted on values recipients can hold. Totals are not drawn: property_wealth is the sum of land, the main residence, other houses, buildings and a drawn remainder (buy-to-let, overseas and other property), gross_financial_wealth is savings, the cash ISA, the share-like holdings and a drawn remainder, and net_financial_wealth is gross less consumer debt and the student loan balance - identities the pinned tab satisfies on every row and the cleaning step refuses a donor that breaks. A sum of donor-valued components that leaves the donor's range for the total gives up the excess from the remainder first, and the receipt counts the rows. Eleven chain segments, each with its own child seed: land; the main residence; the other property components; pension and share-like wealth; the financial components, vehicles and the student loan balance; the main-residence mortgage; the other mortgages; consumer debt; then three appended after them, so the first eight draw as they did before them (microcosm#1095, the WAS property draw), each fitted on the donors and drawn for the recipients holding the column holder_strata names. The first is the directly held fraction of the share-like holdings outside ISAs, from which the stage writes directly_held_shares (WAS UK shares plus employee shares and options) and unit_and_investment_trusts (WAS collective investments, which the survey asks about in one question; uk-data#501), the inputs policyengine-uk reads inside corporate_wealth (pe-uk#1974): the split is written on the final corporate_wealth less the stocks-and-shares ISA, so the two and the ISA sum to corporate_wealth and the engine's share_like_capital stays corporate_wealth; a household with such holdings but no drawn fraction (a clip that lowered the ISA alone) holds them directly (undrawn_fraction), and the receipt counts it. The other two are the debt secured on other residential property (WAS DVHseDebtR8_sum + DVBLtDebtR8_sum) and on non-residential property (DVBldDebtR8_sum), which policyengine-uk deducts after the sale costs in valuing Universal Credit property capital (UC Regs 2013 reg 49(1)(b)): each is zero where the final value of its asset is zero, and the two are parts of the mortgages on other property, so where their sum passes other_mortgage both are scaled down to it (secured_debt_within); the receipt counts the rows each rule touched, and the wealth_coherence gate holds the split and the debts as identities. HFINWNTR8_exSLC_Sum is net financial wealth excluding student loans, so gross less it is the non-student-loan financial liabilities; UKDS SN 7215 documentation is the codebook. Engine predictors materialize at their native entity and person/benunit values are summed to household, reproducing the incumbent map_to=household semantics; region is one-hot encoded jointly across donor and recipient (the incumbent's dummy encoding), with unmapped donor GOR codes becoming all-zero dummy rows. The WAS and FRS predictor definitions are not fully like-for-like and are ported as-is; raw WAS missing values are blanket-filled with zero; UKDS negative sentinel codes (-9/-8/-7/-6) are recoded to zero for the nonnegative-domain columns the licensed audit found carrying them (vcarnr8: 2 rows; HBedRmR8: 95.8 percent - the bedrooms question is effectively unasked in the WAS household file, predictor-quality revisit registered on microcosm#145) - a signed difference vs the incumbent, which trains on raw sentinels; DVPriRntR8's -9 is structural not-applicable so the private-renter reading is unchanged; genuinely negative domains are never recoded. The recipient council_tax predictor is the bill the household pays, council_tax less council_tax_rebate, the quantity the WAS donor records, since the spine's council_tax is the liability before council tax reduction (uk-data#496/#499, microcosm#1095). The donor council_tax is DVCTaxAmtAnnualR8, the annual amount paid (CTAmtR8 is one instalment), its children are NumChildR8 (NumCh18R8 overlaps NumAdultR8), and the recipient adults and children are the household's FRS claimants and partners and its other members (is_uc_claimant), which together make the household size on both sides; rental_income is the donor's net rent DVNetRentAmtAnnualR8_aggr against the household's property_income (uk-data#486/#495, microcosm#1095)." }, { "stage": "was_lisa", @@ -4191,7 +4195,8 @@ ] } ] - } + }, + "gate_calibration": "cross_fitted" }, { "kind": "assign_trips_from_band_means", @@ -4291,7 +4296,7 @@ "local_bus_trips", "household_local_bus_trips" ], - "notes": "Imputes local-bus travel per person from the National Travel Survey microdata (microcosm#930; the structural fix Maria ruled on 2026-09-15 for the rake-then-bind bus fares of microcosm#890). The donor is the NTS End User Licence extract (England residents only since 2013) pooled over the declared survey years for the conditional fit; the artifact pins are the 19th-edition (November 2025) tabs, verified at runtime, and the H2 fixture drives the stage with synthetic tabs in the same codebook. One QRF target, the interview frequency-of-use band (the variable behind NTS0313; 0 is the non-user band), conditioned on age band, sex, cars (the was_wealth draw on the recipient), household size, the three-band gross household income (on the recipient its HBAI net income with the deductions policyengine-uk takes to reach it added back, gross cash income as the NTS band measures it; the engine's household_gross_income adds capital gains and imputed NHS, education and transport spending, which put a fifth of households a band too high; microcosm#1164) and region, drawn from identity-keyed uniforms and rounded to the nearest band; devolved recipients take a declared proxy region for prediction only. Each person's annual local-bus trips are the diary's weighted mean for their band and residence group (London or the rest of England), split into the bus-in-London and other-local-bus series by main mode, W5 x JJXSC over W2 persons annualised by 52.14 weeks; a seven-day diary annualised per person would be right in aggregate and wrong in distribution, so it supplies band means, not per-person counts. If the extract carries no frequency column the band is drawn from the vendored NTS0313/NTS0621 shares and declared band midpoints are scaled to the vendored NTS0303 rate (the receipt names the path). Concessionary eligibility is the declared statutory age rule of the person's area, emitted for the lcfs pricing step to zero-price eligible persons' trips; the donor's eligible share of trips per series is receipted beside the publisher's concessionary boarding share. The stage and ticket tables class every diary bus boarding by how it was paid for (at the point of use, a season ticket or pass, a concessionary pass, free) and give each person the share of fare-paying boardings paid at the point of use for their band and residence group (local_bus_single_fare_share), the boardings a per-journey fare cap binds on, with the fare paid per boarding by residence group and survey year receipted beside it (microcosm#930 C13, María's ask of 2026-09-23). The share is read on the cap years declared in fare_cap_regime only (England's £2 single-fare cap outside London ran from 1 January 2023 to 31 December 2024, and an NTS survey year is a calendar year), because nine months of the FRS 2024-25 base year (April to December 2024) sit under that cap and the last three under the £3 cap that followed it; 2022, before it, stays in the band and trip fit. The share under the £3 cap or with no cap is not observed, because the extract ends in 2024 (microcosm#1331). For England outside London the receipt also carries fare-mix lines, aggregates only. Before the cap they give the share of point-of-use boardings paid above the cap and their mean fare, at that year's prices; under it, the share paid at the cap, within the declared tolerance. A line that rests on fewer than 3 unweighted boardings or 3 distinct households, or whose complement does, reads <3. The stage records the frame's band shares against NTS0313/NTS0621, its trips per person against NTS0303 and by age band against NTS0601, and the frame's car availability against NTS0205, all from vendored rows; nothing derived from the licensed rows is committed." + "notes": "Imputes local-bus travel per person from the National Travel Survey microdata (microcosm#930; the structural fix Maria ruled on 2026-09-15 for the rake-then-bind bus fares of microcosm#890). The donor is the NTS End User Licence extract (England residents only since 2013) pooled over the declared survey years for the conditional fit; the artifact pins are the 19th-edition (November 2025) tabs, verified at runtime, and the H2 fixture drives the stage with synthetic tabs in the same codebook. One QRF target, the interview frequency-of-use band (the variable behind NTS0313; 0 is the non-user band), conditioned on age band, sex, cars (the was_wealth draw on the recipient), household size, the three-band gross household income (on the recipient its HBAI net income with the deductions policyengine-uk takes to reach it added back, gross cash income as the NTS band measures it; the engine's household_gross_income adds capital gains and imputed NHS, education and transport spending, which put a fifth of households a band too high; microcosm#1164) and region, drawn from identity-keyed uniforms and rounded to the nearest band; devolved recipients take a declared proxy region for prediction only. Its sign gate is cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: it is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on people the gate was not fitted to, with each NTS household's members in one fold. Each person's annual local-bus trips are the diary's weighted mean for their band and residence group (London or the rest of England), split into the bus-in-London and other-local-bus series by main mode, W5 x JJXSC over W2 persons annualised by 52.14 weeks; a seven-day diary annualised per person would be right in aggregate and wrong in distribution, so it supplies band means, not per-person counts. If the extract carries no frequency column the band is drawn from the vendored NTS0313/NTS0621 shares and declared band midpoints are scaled to the vendored NTS0303 rate (the receipt names the path). Concessionary eligibility is the declared statutory age rule of the person's area, emitted for the lcfs pricing step to zero-price eligible persons' trips; the donor's eligible share of trips per series is receipted beside the publisher's concessionary boarding share. The stage and ticket tables class every diary bus boarding by how it was paid for (at the point of use, a season ticket or pass, a concessionary pass, free) and give each person the share of fare-paying boardings paid at the point of use for their band and residence group (local_bus_single_fare_share), the boardings a per-journey fare cap binds on, with the fare paid per boarding by residence group and survey year receipted beside it (microcosm#930 C13, María's ask of 2026-09-23). The share is read on the cap years declared in fare_cap_regime only (England's £2 single-fare cap outside London ran from 1 January 2023 to 31 December 2024, and an NTS survey year is a calendar year), because nine months of the FRS 2024-25 base year (April to December 2024) sit under that cap and the last three under the £3 cap that followed it; 2022, before it, stays in the band and trip fit. The share under the £3 cap or with no cap is not observed, because the extract ends in 2024 (microcosm#1331). For England outside London the receipt also carries fare-mix lines, aggregates only. Before the cap they give the share of point-of-use boardings paid above the cap and their mean fare, at that year's prices; under it, the share paid at the cap, within the declared tolerance. A line that rests on fewer than 3 unweighted boardings or 3 distinct households, or whose complement does, reads <3. The stage records the frame's band shares against NTS0313/NTS0621, its trips per person against NTS0303 and by age band against NTS0601, and the frame's car availability against NTS0205, all from vendored rows; nothing derived from the licensed rows is committed." }, { "stage": "lcfs_consumption", @@ -4792,7 +4797,8 @@ ], "weights": "explicit", "seed": 0, - "n_estimators": 100 + "n_estimators": 100, + "gate_calibration": "cross_fitted" }, { "kind": "support_clip", @@ -4816,7 +4822,8 @@ "rule": "key_or_meter_payment_positive", "seed": 0, "salt": "lcfs_prepayment_meter", - "n_estimators": 100 + "n_estimators": 100, + "gate_calibration": "cross_fitted" }, { "kind": "iterative_proportional_fit", @@ -5103,7 +5110,8 @@ "rule": "positive_total_then_petrol_share", "seed": 0, "salt": "lcfs_positive_road_fuel", - "n_estimators": 100 + "n_estimators": 100, + "gate_calibration": "cross_fitted" }, { "kind": "level_road_fuel", @@ -5704,7 +5712,7 @@ "car_co2_emissions", "car_engine_size" ], - "notes": "Ports the incumbent LCFS consumption QRF, including NEED energy raking, with adjudicated weighted fits and an identity-keyed seed-0 fuel flag. The vehicle count is a numeric QRF predictor on both sides (LCFS a124 on the donor, the was_wealth draw of WAS vcarnr8 on the recipient, both clipped to 0-5), which retires the incumbent's WAS-to-LCFS has-fuel bridge (microcosm#890 A). The recipient fuel flag draws each of a household's vehicles as zero-emission at the battery-electric and fuel-cell share of the vendored DfT VEH1103 licensed-car stock (2024, Great Britain; plug-in hybrids count as fuel buyers), replacing the hand-copied NTS share (microcosm#890 E2): a household with vehicles buys fuel unless every one of them is zero-emission, so it is flagged at one minus that share raised to its vehicle count, and a one-vehicle household keeps the draw it had when the whole household was drawn at once (microcosm#1278; before, a household with several vehicles was all one or the other). The frame holds no fuel type, so the draw, keyed on the household identity, is what makes a vehicle-owning household a fuel buyer. Since microcosm#1095 B3 (J2) the per-car zero-emission share follows the household's income fifth: the national share times the fifth's relative risk among the cars NTS households keep (UK Data Service SN 5340, survey years 2022-2024, at the interview weight W3; zero-emission in the DVLA-linked 0 g/km CO2 band, the about three in ten cars without a linked band left out, as missing at random within their fifth), normalised over the frame's cars so the national share is the licensed-car one. The NTS ranks England's households by total gross income, McClements-equivalised, so the frame ranks household_gross_income over the engine's before-housing-costs equivalence scale, in household-weighted fifths; a fifth on fewer than 10 zero-emission NTS cars would pool with its neighbour (a statistical floor, not the disclosure floor of 3). The uniforms are the same, so only the threshold moves. With the redraw of microcosm#1113 every flagged household buys fuel, so this flag alone sets fuel incidence; within an income fifth, who holds the zero-emission cars stays random. The household input uses_energy_prepayment_meter, which policyengine-uk reads for the July 2023 to March 2024 Energy Price Guarantee prepayment discount (PolicyEngine/policyengine-uk#2098, from 2.123.3), is drawn by the declared impute_prepayment_meter step (microcosm#1110): the donor prepays when it last put money on an electricity, gas or combined key or meter (b1751, b1701, b233, which the LCF asks only of prepayment-meter households) or its diary records a slot-meter payment (c45114, c45214), so electricity-only prepayment counts and a household with no meter payment, including one that did not answer, does not; a weighted regime-gated QRF on the chain's predictors fits that flag and each recipient draws it at uniforms keyed on its household id, which moves no other draw. The release exports it: policyengine-uk reads it from 2.123.3 and an older engine, Microcosm's locked one among them, ignores a column it does not know; the incumbent does not carry it until uk-data#539, so it is a reviewed extra column of the export surface. The frame flags about 3.0 million Great Britain households (10.5 %) at prior weights, against the around three million prepayment households the government counted when the discount began in July 2023 (a different reference period, households in both). Energy support clipping is exempt because NEED raking governs those columns. Bus fares are clipped to donor support before the pricing step (María's rulings 2026-09-15 and 2026-09-17), which bounds the region no area prices (Wales keeps the chain's raw draw) while the priced regions move beyond donor support afterwards; for that reason the column carries no committed support bound for the terminal gate. Domestic energy is raked in kWh to the NEED 2024 shape at the DESNZ level and priced at the average prices paid (microcosm#890 F, chronicle#270), where both NEED rakes take their mean-kWh margins from the vendored NEED 2024 tables (England and Wales by income band, tenure, property type and region; Scotland by income band, tenure and property type with the all-dwellings mean as its region margin; Northern Ireland untouched), the declared price_domestic_energy step converts spend to kWh and back at each household's QEP price region through the committed crosswalk using the calendar-2024 average variable unit cost and fixed cost across payment methods, standard metering, including VAT (Northern Ireland gas at the UK average because QEP publishes no Northern Ireland gas row), a gas fixed cost only for connected households, the gas connection imposed on the recipient frame at the published share of each region (DESNZ subnational gas meters over electricity meters, 2024) by disconnecting gas-positive households in an identity-keyed uniform order, skipping a household whose weight would overshoot the published share (Northern Ireland has no subnational row and keeps the positive-gas rule), and, where the draw leaves a region below its share, by the declared connect_rule (microcosm#1164): two weighted fits on the chain's predictors give each zero-gas household the probability that a donor like it pays for gas (a gradient-boosted classifier of the donor's gas payers) and the gas such a donor pays (a regime-gated QRF of the payers' gas spend, at quantiles keyed on the household id), and the region's zero-gas households are connected in an identity-keyed order drawn in proportion to that probability, by the same weight-fitting walk, until the share is met. The labelled energy split leaves about 80 % of donors paying for gas against the about 85 % of homes DESNZ counts gas meters for (the derivation it replaced gave gas to 98 %), so without the connect leg nine of the eleven Great Britain regions fell short of their share, and after the four-margin NEED rake one factor per fuel scales the kWh so the prior-weighted frame total equals the fuel's declared level for calendar 2024: for gas the DESNZ Energy Trends domestic consumption at actual temperature summed over the four quarters, and for electricity, the one fuel in spend_level_fuels (microcosm#1418), the kWh the ONS Consumer Trends 04.5.1 household spending buys at QEP's United Kingdom average prices once the standing charges of every UK domestic meter DESNZ counts come off (gas stays on Energy Trends while ONS 04.5.2 counts bottled gas, microcosm#1095); NEED gas means are per gas-metered household, so the gas kWh margins are raked over connected households only while electricity is raked over every household, and the energy_rake gate recomputes every NEED mean, the DESNZ level and the connection shares from the vendored rows. After the level, no household is left above the domestic meter definitions behind the DESNZ total (NEED Annex B: gas meters under 73,200 kWh a year, electricity meters under 50,000 kWh on profile classes 1 and 2; María's ruling of 2026-10-12 on microcosm#1207's extreme energy values): the declared household_kwh_ceiling caps a household there, the households below it in the capped households' own NEED cells are re-raked to those cells' levelled means, and a proportional step restores the DESNZ total (microcosm#1164); the receipt counts the households capped and the share of the total they gave up, and the energy_rake gate checks both. Mobile homes have no NEED property-type row, so the rake takes them to the all-dwellings mean, the incumbent's translation; where every mobile home of a NEED geography draws a spend at or below the standing charge, that cell has no kWh for the rake to scale, and the declared zero_kwh_cells_at_need_mean starts it at its NEED mean before the first sweep (microcosm#1240). The receipt lists the cells it started, and the energy_rake gate fails on a started cell the stage does not declare and on any other cell with a zero mean. Both rakes band households on gross income, NEED's concept: the donor on LCFS p344p, cash income before tax, National Insurance, council tax and pension contributions, and the recipient on the same concept, its HBAI net income with the deductions policyengine-uk takes to reach it added back (council tax and domestic rates, income tax, National Insurance, student loan repayments, employee and personal pension contributions, maintenance and child payments, LVT), which the stage materializes for that band alone (microcosm#1164). Before it the recipient fell back to its HBAI net income, which put households in too low a band; the engine's household_gross_income would put them in too high a one, since it adds capital gains and the in-kind NHS, education and transport spending to cash income. The disconnection walk's seed-0 uniform order makes every group of households (dwelling type, income band, support channel) lose the same expected share of its drawn connected mass, so only the level of the drawn connection moves; the smallest-drawn-gas-first order it replaces piled the disconnections onto low-draw flats once the SPI support households drew gas from their own incomes, and NEED's Scottish property-type means then implied a level 2.6 % above the Scottish all-dwellings mean, a margin conflict the rake could not close. Bus fares are priced from journeys (microcosm#930), where the nts_bus_travel stage imputes each person's annual bus-in-London and other-local-bus trips and their concessionary eligibility, and the declared price_bus_journeys step sets bus_fare_spending as the sum over the household's non-eligible persons of trips times boardings per resident trip (the published BUS01 journeys over the published NTS0705a trips per resident times the ONS population) times the yield per fare-paying boarding (BUS05ai receipts over journeys less concessionary journeys; in England outside London only the older and disabled ones of BUS01c, as policyengine-uk prices it from 2.158.3), per area; bus-in-London trips take the London area's price for every resident, other-local-bus trips the price of the residence area (England outside London; Scotland and Northern Ireland from their own receipts and journeys with England's trip rate as the declared proxy); Wales is unpriced and keeps the raw draw. The chain still draws bus_fare_spending so later targets condition on the same raw draw; the emitted column is the priced value. The receipt records every factor, the frame-implied boardings beside the published ones and the frame's eligible trip share beside the publisher's concessionary boarding share, so the prior-weight fit of the bound receipts targets is read as a composition check, never a level the stage set; the #890 incidence draw and fare rake are retired. The 2024-25 diary (UKDS SN 9603, 2nd edition, whose household tab carries the annual weight as cal_weight_annual, the name weighta had; microcosm#1164) is moved to the base year by the declared uprate_donor_columns step (microcosm#890). Consumption columns and bus fares take the engine's CPI index from the April-to-March diary year, placed on the calendar-year index at three quarters of 2024 and one of 2025, back a quarter to calendar 2024 (microcosm#1113; the diary sits a quarter past it, so the factor is below one; the fare factor survives only where no fare cell levels the column, i.e. Wales). Income predictors take a factor of one: the diary year is the FRS 2024-25 year they are matched against. Petrol and diesel take the DESNZ pump-price times HMRC litres per head outturn from the vendored road_fuel_anchors.json, which sets only their donor distribution because the level step follows; the energy columns are exempt because the NEED 2024 shape at the DESNZ level and the QEP average prices paid set their level. The household adult and child counts (LCFS G018 and G019, the survey's age-18 split) predict on both sides; the recipient counts its members by age, not through the engine's is_adult and is_child flags, which policyengine-uk#1896 deprecates (uk-data#486, microcosm#1095). Road fuel incidence and level are set by two declared steps (microcosm#1113). The two-week diary leaves about a third of car-owning donors with no fuel purchase, which the chain reproduces among the households the fuel flag marks as fuel buyers, so the redraw_zero_road_fuel step redraws a flagged household that drew zero from the donor's distribution among households with positive road fuel, on the chain's predictors: a weighted regime-gated QRF draws the total, positive by construction, then the petrol share of it, at quantiles keyed on the household id; positive draws are kept. Then the level_road_fuel step, after the fuel flag has zeroed the households without a fuel car, scales petrol and diesel so their prior-weighted total equals ONS Consumer Trends household spending on COICOP 07.2.2 for calendar 2024 (the year of the DESNZ pump prices the donor uprating uses) less the donor's own other-fuels share of 07.2.2 (c72213). Since microcosm#1095 B3 (K) each fuel is levelled to that total times its share of household-paid spend, so the total stays and each household's spend within a fuel keeps its relative size, but the diary's petrol/diesel mix gives way to the household one: HMRC's FY2024-25 litres of the fuel times DESNZ's cars share of its road use (the litres audit's benchmark), times the NTS household-paid share of car miles, at the 2024 pump prices. A kept car's private and commuting miles are household-paid, its business miles and every company-car mile are not, and England stands for the UK. The diary's 07.2.2 has three lines (c72211 petrol, c72212 diesel and c72213, the other motor fuels and lubricants) and none for vehicle electricity. The LCFS diary records about a quarter less road fuel than ONS, and binding the OBR cars receipts had closed that gap by moving weight onto fuel-buying households; petrol and diesel therefore carry no committed support bound, like the other levelled columns. The totals that contain levelled columns are written back around them by the declared recompose_from_remainder step (microcosm#1113): each keeps its own chain draw less the chain's draws of the parts the stage re-levels, kept before any step touches them and floored at zero where the parts outgrow the total, and adds the levelled parts back, so housing_water_and_electricity_consumption is its draw less the drawn electricity and gas plus the levelled electricity and gas, and transport_consumption its draw less the drawn petrol, diesel and bus fares plus the levelled petrol and diesel and the priced bus fares. The chain draws each part after, and conditional on, its total, so the remainder is the chain's own split; a remainder drawn as a chain target of its own over-drew the vehicle-purchase tail of transport, 10 to 13 percent above the donor in-sample. The chain's domestic-energy target is the electricity and gas the stage derives from the diary's fuel, light and power (p537) by its labelled parts, from the LCF User Guide's derived-variable labels and P537 definition (microcosm#1164): each fuel's last account payment less its rebate (b489 electricity, b490 gas, read as the tab carries them; the stage refuses a donor where b489 equals b175 less b178, or b490 equals b170 less b173, to the penny for under 95 percent of that fuel's account payers, which pins the labels and the rebate's sign), its prepayment key or meter payment (b1751, b1701), its component of a combined utilities bill (b227 electricity, b226 gas) and of a combined key or meter payment (b2332, b2331), and the diary's second-dwelling account and slot-meter lines (c45112 and c45114, c45212 and c45214); what a combined payment leaves unsplit (the combined bill b231 less its rebate b174, and the combined key or meter payment b233, each less its parts) goes by the household's own electricity share where it pays for both fuels, and otherwise by the donor's mean share of the households that do, since a combined payment means the household pays for both; a donor with no such household fails. The diary's other fuels (central-heating oil b017 and c45312, bottled gas b018 and c45222, coal and coke c45411, wood and peat c45412, hot water, steam and ice c45511) are neither, and the donor_energy_split receipt records the split against p537: what reading refunds as zero adds, what the unclipped parts differ from p537 by, the weighted share of donors whose unclipped parts differ from their p537, and the account identity shares. The derivation it replaces read b226 as electricity by direct debit and b489 and b490 as prepayment payments, where the labels make them the gas component of a combined bill and the electricity and gas account payments less rebates. The liquid fuels (central-heating oil and paraffin with bottled gas, LPG with liquid) and the solid fuels (coal, coke, wood and peat) are drawn as liquid_fuel_consumption and solid_fuel_consumption, the inputs policyengine-uk 2.149.0 reads (pe-uk#2572; María's ruling of 2026-10-22), after the eighteen spend targets so that every earlier draw is the chain's own, uprated to calendar-2024 prices as every diary spend column is; the housing total nets their draws and adds them back unchanged, so it always holds them, and hot water, steam and ice stays in its remainder. The receipt records the published ONS 04.5.3 and 04.5.4 spend beside each fuel's donor total at diary prices and the frame's draw (published_fuels). Before the hold, each COICOP division's drawn spend per household (a recomposed total's remainder, any other division's whole draw) is set against the donor's mean of the same spend (for housing and transport, the donor's total less the same parts, since the levelled parts keep their published levels and are no over-draw); a division above the divisions' shared ratio, measured once before any levelling, comes down to it (María's rulings of 2026-10-23 and 2026-10-24, microcosm#1278; Vahid's review of microcosm#1383, item 9); the receipt records each division's ratio and factor and the shared ratio (division_levelling) and each recomposed total's levelling_factor. Each total is then held to the donor's realised maximum of that total (maximum_total: donor_support, the support every drawn column is clipped to; microcosm#1164), never below its parts, the excess coming out of its remainder: a remainder near the top of the diary's range plus levelled parts larger than the drawn ones would otherwise leave it. The two totals keep their committed support bounds, which the terminal support gate applies to the emitted frame; the recomposed_totals gate checks the declaration and the receipt, whose rows held at the maximum and weighted mass taken enter its identities. Every household spend column is at calendar-2024 prices as households paid them, the H5's year that policyengine-uk projects from and the calibration uprates to the calendar-2025 window (microcosm#1113): the diary columns by the CPI uprating to 2024, road fuel at ONS 07.2.2 for 2024, energy at DESNZ volume and QEP prices for 2024, and bus fares at each area's fiscal-year yield re-priced to 2024 by its fares index (the DfT local bus fares index by quarter for London and England outside London, Scotland's calendar-year index; Northern Ireland, which publishes no fares index, from its own yields of the two fiscal years 2024 overlaps, weighted three months and nine (microcosm#1207), in place of England's index, which carries the January 2025 rise in the English fare cap Northern Ireland did not have); the consumption_basis gate holds every level-setting step to that year. policyengine-uk applies the fiscal 2024-25 rules to model year 2024 (it samples each parameter at 30 April), so every levelled column sits about a quarter before the midpoint of the policy year it is taxed in; the calibration binds calendar-year facts as published and fiscal-year facts at the calendar window (María's rule of 2026-09-22). The stage receipt also reports, for each of the twelve COICOP divisions, the prior-weighted frame total against ONS Consumer Trends for the same calendar year less the classes a household diary does not record (02.3 narcotics, 04.2 owner-occupiers' imputed rent and 12.6.1 FISIM), on ONS's domestic concept, and the twelve together against the national concept as well; it is report-only (microcosm#1113). The report-only litres audit compares each fuel's frame litres with HMRC's clearances of that fuel scaled by the cars share of its road use, from the vendored DESNZ sub-national road transport fuel consumption by vehicle type and fuel (PolicyEngine/chronicle#322); the OBR cars share of fuel duty receipts, uniform across fuels, stays beside the total. The liquid fuels hold bottled gas (b018, c45222), which COICOP puts under 04.5.2 (gas) and ONS's 04.5.3 leaves out, so the receipt also gives the donor's liquid fuels without it; neither heating-fuel column is levelled to ONS: the donor's diary totals are about twice ONS's, and the frame's draws reach neither those nor ONS's, so a costing on either needs levelling to ONS first (Vahid's review of microcosm#1383, item 8). After its spend targets and the two fuels the chain draws five shares the derive step computes on the donor from the diary lines (microcosm#1359): tobacco's share of the off-trade alcohol and tobacco that make up P602 (c22111, c22121 and c22131 over those three and the seven lines of alcohol brought home, c21111 to c21311; P602 also sums narcotics, c23111, which the end-user tab does not carry), on-trade alcohol's share of restaurants and hotels (the eight lines of drinks away from home, cb111c to cb111j, over P611, clipped at one because the tab stores P611 to one decimal place), gambling stakes' share of recreation (the seven games-of-chance stake lines P609 sums, c94311 to c94316 and c94319: pools, bingo, lotteries, bookmaker and tote betting with gaming machines, and the National Lottery; the winnings lines beside them sit in no total), the National Lottery's share of those stakes (scratchcards and draws, c94316 and c94319, over the seven) and the betting and gaming share of the rest (football pools, bingo, and bookmaker and tote betting with gaming machines, c94311, c94312 and c94314, over the other five; society lotteries, c94313, and the Irish Lottery, c94315, pay no UK gambling duty). A household's tobacco, off-trade alcohol, on-trade alcohol and gambling stakes are its shares of the totals it carries, and its National Lottery and betting and gaming stakes its shares of its stakes, so the parts sum to the totals and no total, the VAT base included, moves; appended after the twenty targets, the shares move none of their draws. The shares and the spending they give are scratch, on no table; the report-only excise_shares receipt records each share on the frame beside the donor. The declared level_excise_quantities step turns that spending into policyengine-uk's excise inputs (microcosm#1359), so alcohol, tobacco and gambling duty stop scoring zero. Each national quantity is a published FY2024-25 figure from the vendored excise_facts.json, and the step gives each household its part in proportion to the spending that buys it, at prior weights (one factor per input, the level_road_fuel scaling), so the frame's weighted total of each input is the published one; a household that buys one product of a kind buys all of that kind in the national mix. Alcohol: each product's litres are HMRC's clearances of beer, cider, wine, spirits and other fermented products (the Alcohol Bulletin, in litres of pure alcohol) over the engine's own strength for the product, which policyengine-uk multiplies back, shared by off- and on-trade alcohol spending together; beer and cider take their draught shares from the clearances under draught relief, alone or with small producer relief, over all of their clearances, and the other products, whose draught clearances HMRC does not publish, keep the engine's zero, as does sparkling cider, which the bulletin counts within cider. A pound buys the same volume in a pub as in a shop under this rule, which leans the volume, and so the duty, towards on-trade drinkers: against a published on-trade volume share of about 27 percent, a pound spent in a pub is given about 1.6 times the volume it buys and a pound spent in a shop about 0.78 times, and about 11 percent of the volume sits with other households on the 2024-25 diary. No on-trade volume share can be archived (MESAS is a NielsenIQ and Circana dashboard with no fixed file), so the spending rule stands, its lean documented (María's ruling of 2026-10-23). Tobacco: cigarettes a week and grams a week of hand-rolling tobacco, cigars and other tobacco are HMRC's clearances (the Tobacco Bulletin) over the engine's 52 weeks, shared by tobacco spending; heated tobacco sits within other tobacco in the bulletin, so it is charged at the other-tobacco rate and its own input keeps the engine's zero. Gambling: each input is its duty's dutiable base, HMRC's cash receipts for the duty (the Betting and Gaming bulletin) or Machine Games Duty's declared liabilities for the band, over the engine's FY2024-25 rate (Gaming Duty over the engine's effective-rate proxy for it), so the engine charges back the published receipts. General Betting Duty's base, its receipts over the fixed-odds rate, is split over the land-based fixed-odds, remote horse-racing, remote other, exchange and horse-and-dog pool inputs by the Gambling Commission's gross gambling yield for Great Britain, remote fixed-odds betting by the horse-racing share of all remote betting yield, since the Commission publishes no betting activity by event; its horse racing is not only UK racing, so the remote UK horse-racing input is overstated and, from April 2027, when the engine charges other remote betting at 25 percent, too much of the base stays at 15 percent and the rise is understated; and its pool betting can hold pools on other events, such as football pools, which pay Pool Betting Duty. Spread betting, which the Commission does not regulate, has no published base and keeps the engine's zero. Lottery Duty's base is shared by the National Lottery stakes and every other gambling base by the betting and gaming stakes, since the diary cannot tell remote from land-based play or one betting product from another; the society and Irish lotteries carry none. Both keys are first brought to published participation by the declared top_up_gambling_participation step (microcosm#1359; María's ruling of 2026-10-25). The diary records a stake for about a fifth of the households the Gambling Commission's Gambling Survey for Great Britain 2025 implies (PolicyEngine/chronicle#391), and under any steady rate of play a two-week diary sees at least half of the four-week players, so the gap is play the diary misses, not its window. Each adult's chance of playing in four weeks and in twelve months is GSGB's published rate for its sex and age band (tables B.1 and B.3), as the union of a key's activities (table B.9: the National Lottery's draws, scratchcards and online instant-win games; betting, bingo, casino games, fruit and slots, football pools, other online instant-win games and other gambling), taken as independent within the population that plays any of them (all gamblers, or those who play more than lottery draws). A household plays when any adult does, combined at theta: 1 - (1 - p_max) x prod(1 - p_other)^theta, where 0 is one player per household and 1 adults who play independently. Theta is fitted on the donor so that GSGB's rates, applied to the donors' own adults, give the diary's ratio of the two-adult to the one-adult household rate, in which under-recording cancels if it is the same for both: 0.9 for the National Lottery, whose couples mostly buy their own tickets, and 0.08 for betting and gaming, mostly one adult's. Within nine strata (one, two, or three or more adults, by the youngest adult's age band: 18 to 34, 35 to 54, 55 and over), households without a stake are added by the gas connection walk's weight-fitting rule, in an identity-keyed order drawn in proportion to a regularised donor propensity (on the chain's predictors and spend draws, with recreation net of its gambling stakes, so that a recorded stake does not predict itself) times the household's published chance, first to the stratum's four-week share (regular players) and then on to its twelve-month share (occasional players); households the diary saw keep their stakes and count as regular. An added household's stake is a draw from the donor's positive stakes at a quantile keyed on its id, scaled so the added regular players' mean is the mean of the households the diary saw, and an occasional player's is a tenth of that. Both are assumptions: a two-week diary is more likely to catch frequent players, so the households it saw are probably the heavier players and equal means spread the base more evenly than play probably is; the tenth stands until GSGB publishes how often people play. The keys only re-share the bases: the stored spending stays the drawn one, so an added household's stakes are not in its recorded recreation spending. The gambling_participation gate recomputes the rates from the vendored rows, checks every stratum's shares, and holds each key's stake scale within 0.5 to 2, so a broken stake draw that the scaling would hide fails it. Known biases: the quantities are levelled to the published figures while spending and the diary's incidence stay at survey level (María's ruling of 2026-10-23), so a household's alcohol or tobacco duty is one multiple of its own spending, the same for every household that carries it: at prior weights alcohol duty is about 0.41 times alcohol spending and tobacco duty about 2.2 times tobacco spending, since the diary records a fraction of what is bought; VAT on the same goods stays on the survey base. Tobacco duty also sits on fewer households than smoke: 8.2 percent of households carry it, against 11.9 percent of UK adults who smoked cigarettes in 2023 (ONS), while the share of households with a smoker is above the adult rate; the duty per carrying household is higher by the same factor. Part of the gap is the frame's: the chain's share draws come out zero more often than the donors' (10.3 percent of donors carry tobacco), mostly within households that carry the parent total. The gambling duties sit on the households the top-up brings to participation: 62.7 percent of households carry Lottery Duty and 29.8 percent the other gambling duties, against 10.7 and 2.0 percent on the diary's draws alone, and 47 percent of adults in Great Britain who gambled in the past four weeks of 2025 (27 percent once lottery-draw-only players are left out). The top-up's own biases: GSGB is taken as the level, though the Gambling Commission's guidance on its statistics reports that an invitation that mentions gambling raised participation estimates, and that its experiment could not conclude which estimates are the more accurate; under-recording is taken as even across households, so the donor propensity carries the diary's gradient by income, tenure, region and spending; the activity unions take activities as independent within their population, which GSGB's table B.13 rules out among players (45 percent of four-week gamblers took part in one activity, against 26 percent under independence), but a model in which each adult's activities share an intensity, which comes within 2.5 points of that share in every age band, moves neither key's union by more than 9 percent in any age band, nor the share of households carrying either key by more than 0.1 points; theta is one per key, fits households of three or more adults less well, and takes the share carrying betting and gaming from 28.5 percent at 0 to 41.2 percent at 1; the stake assumptions above; and GSGB covers adults in Great Britain in calendar 2025, so Northern Ireland's adults take its rates, against the FY2024-25 bases. On the real spine at prior weights, the share of households carrying the National Lottery rises from 51.5 percent in the bottom equivalised-income decile to 67.3 percent in the top, and betting and gaming from 26.8 to 34.8 percent, whose top decile holds 25.3 percent of the base; on the diary's draws alone betting and gaming is almost flat (1.9 to 2.1 percent, 18.9 percent of the base in the top decile). Ordered by the published chance alone, betting and gaming would run from 29.2 to 29.8 percent and the Lottery from 57.0 to 67.9 percent with GSGB's age mix, but neither key's regional pattern would follow GSGB's. With the propensity, the Lottery's does (a correlation of 0.67 across Great Britain's eleven regions, London lowest, as in GSGB), and betting and gaming's barely (0.11). Other tobacco (c22131) includes e-cigarette refills, so the tobacco inputs also follow vaping spending and a household that only vapes carries tobacco duty; Vaping Products Duty, from 1 October 2026, needs a key of its own. The draught shares are national constants, so a household that buys alcohol only in shops takes the same draught relief as one that drinks in pubs. The quantities are FY2024-25's, the excise year policyengine-uk charges in model year 2024 (its excise year runs from 6 April), and the engine holds them flat after it (PolicyEngine/policyengine-uk#2596). The step moves no spending column; the excise_quantities gate recomputes every level from the vendored rows. Since microcosm#1095 B3 the declared assign_car_attributes_from_nts step writes policyengine-uk's vehicle excise duty inputs, which no stage wrote, so every household's duty was zero: a household's vehicles less its members' company cars (an employer pays their duty) go one to each other adult, oldest first, a car beyond the adults left out (policyengine-uk holds one car a person); a household the fuel flag leaves without road fuel keeps zero-emission cars only, and one that buys fuel holds a petrol, diesel or other car first and further cars at its own per-car zero-emission share; each car is a kept NTS car of its class in the household's income fifth, drawn at its interview weight scaled to its fifth and age band's kept cars (fewer of the newest and oldest cars carry the registration record its CO2 bands come from), giving car_fuel_type (a diesel registered from 2021 meets RDE2), car_co2_emissions (its band's midpoint on the scale its duty regime reads), car_engine_size (none for a zero-emission car), car_first_registration_date (the reference date of 1 October 2025 less its age, drawn uniformly within its NTS band, so each car keeps its age; the open band of over 18 years closes at 25) and car_is_ved_exempt (DLA's higher-rate or PIP's enhanced mobility component exempts the member's own car, or the oldest car-holder's in their benefit unit). The list price keeps the engine's default, so no car pays the expensive-car supplement. Vehicle excise duty is measured, never bound: no target carries it." + "notes": "Ports the incumbent LCFS consumption QRF, including NEED energy raking, with adjudicated weighted fits and an identity-keyed seed-0 fuel flag. The chain's sign gates are cross-fitted (gate_calibration: cross_fitted): each is the mean of five gates, each fitted on four of five folds of the donors stratified by sign, mapped by one weighted Platt calibration fitted on the folds they left out, so a rare spending is drawn at its donor rate on households the gates were not fitted to. A gate fitted and calibrated on the same donors memorises a rare spending's donors and draws it too rarely everywhere else: on held-out donors it drew solid fuels about a tenth as often as they occur and education under half as often. The vehicle count is a numeric QRF predictor on both sides (LCFS a124 on the donor, the was_wealth draw of WAS vcarnr8 on the recipient, both clipped to 0-5), which retires the incumbent's WAS-to-LCFS has-fuel bridge (microcosm#890 A). The recipient fuel flag draws each of a household's vehicles as zero-emission at the battery-electric and fuel-cell share of the vendored DfT VEH1103 licensed-car stock (2024, Great Britain; plug-in hybrids count as fuel buyers), replacing the hand-copied NTS share (microcosm#890 E2): a household with vehicles buys fuel unless every one of them is zero-emission, so it is flagged at one minus that share raised to its vehicle count, and a one-vehicle household keeps the draw it had when the whole household was drawn at once (microcosm#1278; before, a household with several vehicles was all one or the other). The frame holds no fuel type, so the draw, keyed on the household identity, is what makes a vehicle-owning household a fuel buyer. Since microcosm#1095 B3 (J2) the per-car zero-emission share follows the household's income fifth: the national share times the fifth's relative risk among the cars NTS households keep (UK Data Service SN 5340, survey years 2022-2024, at the interview weight W3; zero-emission in the DVLA-linked 0 g/km CO2 band, the about three in ten cars without a linked band left out, as missing at random within their fifth), normalised over the frame's cars so the national share is the licensed-car one. The NTS ranks England's households by total gross income, McClements-equivalised, so the frame ranks household_gross_income over the engine's before-housing-costs equivalence scale, in household-weighted fifths; a fifth on fewer than 10 zero-emission NTS cars would pool with its neighbour (a statistical floor, not the disclosure floor of 3). The uniforms are the same, so only the threshold moves. With the redraw of microcosm#1113 every flagged household buys fuel, so this flag alone sets fuel incidence; within an income fifth, who holds the zero-emission cars stays random. The household input uses_energy_prepayment_meter, which policyengine-uk reads for the July 2023 to March 2024 Energy Price Guarantee prepayment discount (PolicyEngine/policyengine-uk#2098, from 2.123.3), is drawn by the declared impute_prepayment_meter step (microcosm#1110): the donor prepays when it last put money on an electricity, gas or combined key or meter (b1751, b1701, b233, which the LCF asks only of prepayment-meter households) or its diary records a slot-meter payment (c45114, c45214), so electricity-only prepayment counts and a household with no meter payment, including one that did not answer, does not; a weighted regime-gated QRF on the chain's predictors fits that flag and each recipient draws it at uniforms keyed on its household id, which moves no other draw. The release exports it: policyengine-uk reads it from 2.123.3 and an older engine, Microcosm's locked one among them, ignores a column it does not know; the incumbent does not carry it until uk-data#539, so it is a reviewed extra column of the export surface. The frame flags about 3.0 million Great Britain households (10.5 %) at prior weights, against the around three million prepayment households the government counted when the discount began in July 2023 (a different reference period, households in both). Energy support clipping is exempt because NEED raking governs those columns. Bus fares are clipped to donor support before the pricing step (María's rulings 2026-09-15 and 2026-09-17), which bounds the region no area prices (Wales keeps the chain's raw draw) while the priced regions move beyond donor support afterwards; for that reason the column carries no committed support bound for the terminal gate. Domestic energy is raked in kWh to the NEED 2024 shape at the DESNZ level and priced at the average prices paid (microcosm#890 F, chronicle#270), where both NEED rakes take their mean-kWh margins from the vendored NEED 2024 tables (England and Wales by income band, tenure, property type and region; Scotland by income band, tenure and property type with the all-dwellings mean as its region margin; Northern Ireland untouched), the declared price_domestic_energy step converts spend to kWh and back at each household's QEP price region through the committed crosswalk using the calendar-2024 average variable unit cost and fixed cost across payment methods, standard metering, including VAT (Northern Ireland gas at the UK average because QEP publishes no Northern Ireland gas row), a gas fixed cost only for connected households, the gas connection imposed on the recipient frame at the published share of each region (DESNZ subnational gas meters over electricity meters, 2024) by disconnecting gas-positive households in an identity-keyed uniform order, skipping a household whose weight would overshoot the published share (Northern Ireland has no subnational row and keeps the positive-gas rule), and, where the draw leaves a region below its share, by the declared connect_rule (microcosm#1164): two weighted fits on the chain's predictors give each zero-gas household the probability that a donor like it pays for gas (a gradient-boosted classifier of the donor's gas payers) and the gas such a donor pays (a regime-gated QRF of the payers' gas spend, at quantiles keyed on the household id), and the region's zero-gas households are connected in an identity-keyed order drawn in proportion to that probability, by the same weight-fitting walk, until the share is met. The labelled energy split leaves about 80 % of donors paying for gas against the about 85 % of homes DESNZ counts gas meters for (the derivation it replaced gave gas to 98 %), so without the connect leg nine of the eleven Great Britain regions fell short of their share, and after the four-margin NEED rake one factor per fuel scales the kWh so the prior-weighted frame total equals the fuel's declared level for calendar 2024: for gas the DESNZ Energy Trends domestic consumption at actual temperature summed over the four quarters, and for electricity, the one fuel in spend_level_fuels (microcosm#1418), the kWh the ONS Consumer Trends 04.5.1 household spending buys at QEP's United Kingdom average prices once the standing charges of every UK domestic meter DESNZ counts come off (gas stays on Energy Trends while ONS 04.5.2 counts bottled gas, microcosm#1095); NEED gas means are per gas-metered household, so the gas kWh margins are raked over connected households only while electricity is raked over every household, and the energy_rake gate recomputes every NEED mean, the DESNZ level and the connection shares from the vendored rows. After the level, no household is left above the domestic meter definitions behind the DESNZ total (NEED Annex B: gas meters under 73,200 kWh a year, electricity meters under 50,000 kWh on profile classes 1 and 2; María's ruling of 2026-10-12 on microcosm#1207's extreme energy values): the declared household_kwh_ceiling caps a household there, the households below it in the capped households' own NEED cells are re-raked to those cells' levelled means, and a proportional step restores the DESNZ total (microcosm#1164); the receipt counts the households capped and the share of the total they gave up, and the energy_rake gate checks both. Mobile homes have no NEED property-type row, so the rake takes them to the all-dwellings mean, the incumbent's translation; where every mobile home of a NEED geography draws a spend at or below the standing charge, that cell has no kWh for the rake to scale, and the declared zero_kwh_cells_at_need_mean starts it at its NEED mean before the first sweep (microcosm#1240). The receipt lists the cells it started, and the energy_rake gate fails on a started cell the stage does not declare and on any other cell with a zero mean. Both rakes band households on gross income, NEED's concept: the donor on LCFS p344p, cash income before tax, National Insurance, council tax and pension contributions, and the recipient on the same concept, its HBAI net income with the deductions policyengine-uk takes to reach it added back (council tax and domestic rates, income tax, National Insurance, student loan repayments, employee and personal pension contributions, maintenance and child payments, LVT), which the stage materializes for that band alone (microcosm#1164). Before it the recipient fell back to its HBAI net income, which put households in too low a band; the engine's household_gross_income would put them in too high a one, since it adds capital gains and the in-kind NHS, education and transport spending to cash income. The disconnection walk's seed-0 uniform order makes every group of households (dwelling type, income band, support channel) lose the same expected share of its drawn connected mass, so only the level of the drawn connection moves; the smallest-drawn-gas-first order it replaces piled the disconnections onto low-draw flats once the SPI support households drew gas from their own incomes, and NEED's Scottish property-type means then implied a level 2.6 % above the Scottish all-dwellings mean, a margin conflict the rake could not close. Bus fares are priced from journeys (microcosm#930), where the nts_bus_travel stage imputes each person's annual bus-in-London and other-local-bus trips and their concessionary eligibility, and the declared price_bus_journeys step sets bus_fare_spending as the sum over the household's non-eligible persons of trips times boardings per resident trip (the published BUS01 journeys over the published NTS0705a trips per resident times the ONS population) times the yield per fare-paying boarding (BUS05ai receipts over journeys less concessionary journeys; in England outside London only the older and disabled ones of BUS01c, as policyengine-uk prices it from 2.158.3), per area; bus-in-London trips take the London area's price for every resident, other-local-bus trips the price of the residence area (England outside London; Scotland and Northern Ireland from their own receipts and journeys with England's trip rate as the declared proxy); Wales is unpriced and keeps the raw draw. The chain still draws bus_fare_spending so later targets condition on the same raw draw; the emitted column is the priced value. The receipt records every factor, the frame-implied boardings beside the published ones and the frame's eligible trip share beside the publisher's concessionary boarding share, so the prior-weight fit of the bound receipts targets is read as a composition check, never a level the stage set; the #890 incidence draw and fare rake are retired. The 2024-25 diary (UKDS SN 9603, 2nd edition, whose household tab carries the annual weight as cal_weight_annual, the name weighta had; microcosm#1164) is moved to the base year by the declared uprate_donor_columns step (microcosm#890). Consumption columns and bus fares take the engine's CPI index from the April-to-March diary year, placed on the calendar-year index at three quarters of 2024 and one of 2025, back a quarter to calendar 2024 (microcosm#1113; the diary sits a quarter past it, so the factor is below one; the fare factor survives only where no fare cell levels the column, i.e. Wales). Income predictors take a factor of one: the diary year is the FRS 2024-25 year they are matched against. Petrol and diesel take the DESNZ pump-price times HMRC litres per head outturn from the vendored road_fuel_anchors.json, which sets only their donor distribution because the level step follows; the energy columns are exempt because the NEED 2024 shape at the DESNZ level and the QEP average prices paid set their level. The household adult and child counts (LCFS G018 and G019, the survey's age-18 split) predict on both sides; the recipient counts its members by age, not through the engine's is_adult and is_child flags, which policyengine-uk#1896 deprecates (uk-data#486, microcosm#1095). Road fuel incidence and level are set by two declared steps (microcosm#1113). The two-week diary leaves about a third of car-owning donors with no fuel purchase, which the chain reproduces among the households the fuel flag marks as fuel buyers, so the redraw_zero_road_fuel step redraws a flagged household that drew zero from the donor's distribution among households with positive road fuel, on the chain's predictors: a weighted regime-gated QRF draws the total, positive by construction, then the petrol share of it, at quantiles keyed on the household id; positive draws are kept. Then the level_road_fuel step, after the fuel flag has zeroed the households without a fuel car, scales petrol and diesel so their prior-weighted total equals ONS Consumer Trends household spending on COICOP 07.2.2 for calendar 2024 (the year of the DESNZ pump prices the donor uprating uses) less the donor's own other-fuels share of 07.2.2 (c72213). Since microcosm#1095 B3 (K) each fuel is levelled to that total times its share of household-paid spend, so the total stays and each household's spend within a fuel keeps its relative size, but the diary's petrol/diesel mix gives way to the household one: HMRC's FY2024-25 litres of the fuel times DESNZ's cars share of its road use (the litres audit's benchmark), times the NTS household-paid share of car miles, at the 2024 pump prices. A kept car's private and commuting miles are household-paid, its business miles and every company-car mile are not, and England stands for the UK. The diary's 07.2.2 has three lines (c72211 petrol, c72212 diesel and c72213, the other motor fuels and lubricants) and none for vehicle electricity. The LCFS diary records about a quarter less road fuel than ONS, and binding the OBR cars receipts had closed that gap by moving weight onto fuel-buying households; petrol and diesel therefore carry no committed support bound, like the other levelled columns. The totals that contain levelled columns are written back around them by the declared recompose_from_remainder step (microcosm#1113): each keeps its own chain draw less the chain's draws of the parts the stage re-levels, kept before any step touches them and floored at zero where the parts outgrow the total, and adds the levelled parts back, so housing_water_and_electricity_consumption is its draw less the drawn electricity and gas plus the levelled electricity and gas, and transport_consumption its draw less the drawn petrol, diesel and bus fares plus the levelled petrol and diesel and the priced bus fares. The chain draws each part after, and conditional on, its total, so the remainder is the chain's own split; a remainder drawn as a chain target of its own over-drew the vehicle-purchase tail of transport, 10 to 13 percent above the donor in-sample. The chain's domestic-energy target is the electricity and gas the stage derives from the diary's fuel, light and power (p537) by its labelled parts, from the LCF User Guide's derived-variable labels and P537 definition (microcosm#1164): each fuel's last account payment less its rebate (b489 electricity, b490 gas, read as the tab carries them; the stage refuses a donor where b489 equals b175 less b178, or b490 equals b170 less b173, to the penny for under 95 percent of that fuel's account payers, which pins the labels and the rebate's sign), its prepayment key or meter payment (b1751, b1701), its component of a combined utilities bill (b227 electricity, b226 gas) and of a combined key or meter payment (b2332, b2331), and the diary's second-dwelling account and slot-meter lines (c45112 and c45114, c45212 and c45214); what a combined payment leaves unsplit (the combined bill b231 less its rebate b174, and the combined key or meter payment b233, each less its parts) goes by the household's own electricity share where it pays for both fuels, and otherwise by the donor's mean share of the households that do, since a combined payment means the household pays for both; a donor with no such household fails. The diary's other fuels (central-heating oil b017 and c45312, bottled gas b018 and c45222, coal and coke c45411, wood and peat c45412, hot water, steam and ice c45511) are neither, and the donor_energy_split receipt records the split against p537: what reading refunds as zero adds, what the unclipped parts differ from p537 by, the weighted share of donors whose unclipped parts differ from their p537, and the account identity shares. The derivation it replaces read b226 as electricity by direct debit and b489 and b490 as prepayment payments, where the labels make them the gas component of a combined bill and the electricity and gas account payments less rebates. The liquid fuels (central-heating oil and paraffin with bottled gas, LPG with liquid) and the solid fuels (coal, coke, wood and peat) are drawn as liquid_fuel_consumption and solid_fuel_consumption, the inputs policyengine-uk 2.149.0 reads (pe-uk#2572; María's ruling of 2026-10-22), after the eighteen spend targets so that every earlier draw is the chain's own, uprated to calendar-2024 prices as every diary spend column is; the housing total nets their draws and adds them back unchanged, so it always holds them, and hot water, steam and ice stays in its remainder. The receipt records the published ONS 04.5.3 and 04.5.4 spend beside each fuel's donor total at diary prices and the frame's draw (published_fuels). Before the hold, each COICOP division's drawn spend per household (a recomposed total's remainder, any other division's whole draw) is set against the donor's mean of the same spend (for housing and transport, the donor's total less the same parts, since the levelled parts keep their published levels and are no over-draw); a division above the divisions' shared ratio, measured once before any levelling, comes down to it (María's rulings of 2026-10-23 and 2026-10-24, microcosm#1278; Vahid's review of microcosm#1383, item 9); the receipt records each division's ratio and factor and the shared ratio (division_levelling) and each recomposed total's levelling_factor. Each total is then held to the donor's realised maximum of that total (maximum_total: donor_support, the support every drawn column is clipped to; microcosm#1164), never below its parts, the excess coming out of its remainder: a remainder near the top of the diary's range plus levelled parts larger than the drawn ones would otherwise leave it. The two totals keep their committed support bounds, which the terminal support gate applies to the emitted frame; the recomposed_totals gate checks the declaration and the receipt, whose rows held at the maximum and weighted mass taken enter its identities. Every household spend column is at calendar-2024 prices as households paid them, the H5's year that policyengine-uk projects from and the calibration uprates to the calendar-2025 window (microcosm#1113): the diary columns by the CPI uprating to 2024, road fuel at ONS 07.2.2 for 2024, energy at DESNZ volume and QEP prices for 2024, and bus fares at each area's fiscal-year yield re-priced to 2024 by its fares index (the DfT local bus fares index by quarter for London and England outside London, Scotland's calendar-year index; Northern Ireland, which publishes no fares index, from its own yields of the two fiscal years 2024 overlaps, weighted three months and nine (microcosm#1207), in place of England's index, which carries the January 2025 rise in the English fare cap Northern Ireland did not have); the consumption_basis gate holds every level-setting step to that year. policyengine-uk applies the fiscal 2024-25 rules to model year 2024 (it samples each parameter at 30 April), so every levelled column sits about a quarter before the midpoint of the policy year it is taxed in; the calibration binds calendar-year facts as published and fiscal-year facts at the calendar window (María's rule of 2026-09-22). The stage receipt also reports, for each of the twelve COICOP divisions, the prior-weighted frame total against ONS Consumer Trends for the same calendar year less the classes a household diary does not record (02.3 narcotics, 04.2 owner-occupiers' imputed rent and 12.6.1 FISIM), on ONS's domestic concept, and the twelve together against the national concept as well; it is report-only (microcosm#1113). The report-only litres audit compares each fuel's frame litres with HMRC's clearances of that fuel scaled by the cars share of its road use, from the vendored DESNZ sub-national road transport fuel consumption by vehicle type and fuel (PolicyEngine/chronicle#322); the OBR cars share of fuel duty receipts, uniform across fuels, stays beside the total. The liquid fuels hold bottled gas (b018, c45222), which COICOP puts under 04.5.2 (gas) and ONS's 04.5.3 leaves out, so the receipt also gives the donor's liquid fuels without it; neither heating-fuel column is levelled to ONS: the donor's diary totals are about twice ONS's, and the frame's draws reach neither those nor ONS's, so a costing on either needs levelling to ONS first (Vahid's review of microcosm#1383, item 8). After its spend targets and the two fuels the chain draws five shares the derive step computes on the donor from the diary lines (microcosm#1359): tobacco's share of the off-trade alcohol and tobacco that make up P602 (c22111, c22121 and c22131 over those three and the seven lines of alcohol brought home, c21111 to c21311; P602 also sums narcotics, c23111, which the end-user tab does not carry), on-trade alcohol's share of restaurants and hotels (the eight lines of drinks away from home, cb111c to cb111j, over P611, clipped at one because the tab stores P611 to one decimal place), gambling stakes' share of recreation (the seven games-of-chance stake lines P609 sums, c94311 to c94316 and c94319: pools, bingo, lotteries, bookmaker and tote betting with gaming machines, and the National Lottery; the winnings lines beside them sit in no total), the National Lottery's share of those stakes (scratchcards and draws, c94316 and c94319, over the seven) and the betting and gaming share of the rest (football pools, bingo, and bookmaker and tote betting with gaming machines, c94311, c94312 and c94314, over the other five; society lotteries, c94313, and the Irish Lottery, c94315, pay no UK gambling duty). A household's tobacco, off-trade alcohol, on-trade alcohol and gambling stakes are its shares of the totals it carries, and its National Lottery and betting and gaming stakes its shares of its stakes, so the parts sum to the totals and no total, the VAT base included, moves; appended after the twenty targets, the shares move none of their draws. The shares and the spending they give are scratch, on no table; the report-only excise_shares receipt records each share on the frame beside the donor. The declared level_excise_quantities step turns that spending into policyengine-uk's excise inputs (microcosm#1359), so alcohol, tobacco and gambling duty stop scoring zero. Each national quantity is a published FY2024-25 figure from the vendored excise_facts.json, and the step gives each household its part in proportion to the spending that buys it, at prior weights (one factor per input, the level_road_fuel scaling), so the frame's weighted total of each input is the published one; a household that buys one product of a kind buys all of that kind in the national mix. Alcohol: each product's litres are HMRC's clearances of beer, cider, wine, spirits and other fermented products (the Alcohol Bulletin, in litres of pure alcohol) over the engine's own strength for the product, which policyengine-uk multiplies back, shared by off- and on-trade alcohol spending together; beer and cider take their draught shares from the clearances under draught relief, alone or with small producer relief, over all of their clearances, and the other products, whose draught clearances HMRC does not publish, keep the engine's zero, as does sparkling cider, which the bulletin counts within cider. A pound buys the same volume in a pub as in a shop under this rule, which leans the volume, and so the duty, towards on-trade drinkers: against a published on-trade volume share of about 27 percent, a pound spent in a pub is given about 1.6 times the volume it buys and a pound spent in a shop about 0.78 times, and about 11 percent of the volume sits with other households on the 2024-25 diary. No on-trade volume share can be archived (MESAS is a NielsenIQ and Circana dashboard with no fixed file), so the spending rule stands, its lean documented (María's ruling of 2026-10-23). Tobacco: cigarettes a week and grams a week of hand-rolling tobacco, cigars and other tobacco are HMRC's clearances (the Tobacco Bulletin) over the engine's 52 weeks, shared by tobacco spending; heated tobacco sits within other tobacco in the bulletin, so it is charged at the other-tobacco rate and its own input keeps the engine's zero. Gambling: each input is its duty's dutiable base, HMRC's cash receipts for the duty (the Betting and Gaming bulletin) or Machine Games Duty's declared liabilities for the band, over the engine's FY2024-25 rate (Gaming Duty over the engine's effective-rate proxy for it), so the engine charges back the published receipts. General Betting Duty's base, its receipts over the fixed-odds rate, is split over the land-based fixed-odds, remote horse-racing, remote other, exchange and horse-and-dog pool inputs by the Gambling Commission's gross gambling yield for Great Britain, remote fixed-odds betting by the horse-racing share of all remote betting yield, since the Commission publishes no betting activity by event; its horse racing is not only UK racing, so the remote UK horse-racing input is overstated and, from April 2027, when the engine charges other remote betting at 25 percent, too much of the base stays at 15 percent and the rise is understated; and its pool betting can hold pools on other events, such as football pools, which pay Pool Betting Duty. Spread betting, which the Commission does not regulate, has no published base and keeps the engine's zero. Lottery Duty's base is shared by the National Lottery stakes and every other gambling base by the betting and gaming stakes, since the diary cannot tell remote from land-based play or one betting product from another; the society and Irish lotteries carry none. Both keys are first brought to published participation by the declared top_up_gambling_participation step (microcosm#1359; María's ruling of 2026-10-25). The diary records a stake for about a fifth of the households the Gambling Commission's Gambling Survey for Great Britain 2025 implies (PolicyEngine/chronicle#391), and under any steady rate of play a two-week diary sees at least half of the four-week players, so the gap is play the diary misses, not its window. Each adult's chance of playing in four weeks and in twelve months is GSGB's published rate for its sex and age band (tables B.1 and B.3), as the union of a key's activities (table B.9: the National Lottery's draws, scratchcards and online instant-win games; betting, bingo, casino games, fruit and slots, football pools, other online instant-win games and other gambling), taken as independent within the population that plays any of them (all gamblers, or those who play more than lottery draws). A household plays when any adult does, combined at theta: 1 - (1 - p_max) x prod(1 - p_other)^theta, where 0 is one player per household and 1 adults who play independently. Theta is fitted on the donor so that GSGB's rates, applied to the donors' own adults, give the diary's ratio of the two-adult to the one-adult household rate, in which under-recording cancels if it is the same for both: 0.9 for the National Lottery, whose couples mostly buy their own tickets, and 0.08 for betting and gaming, mostly one adult's. Within nine strata (one, two, or three or more adults, by the youngest adult's age band: 18 to 34, 35 to 54, 55 and over), households without a stake are added by the gas connection walk's weight-fitting rule, in an identity-keyed order drawn in proportion to a regularised donor propensity (on the chain's predictors and spend draws, with recreation net of its gambling stakes, so that a recorded stake does not predict itself) times the household's published chance, first to the stratum's four-week share (regular players) and then on to its twelve-month share (occasional players); households the diary saw keep their stakes and count as regular. An added household's stake is a draw from the donor's positive stakes at a quantile keyed on its id, scaled so the added regular players' mean is the mean of the households the diary saw, and an occasional player's is a tenth of that. Both are assumptions: a two-week diary is more likely to catch frequent players, so the households it saw are probably the heavier players and equal means spread the base more evenly than play probably is; the tenth stands until GSGB publishes how often people play. The keys only re-share the bases: the stored spending stays the drawn one, so an added household's stakes are not in its recorded recreation spending. The gambling_participation gate recomputes the rates from the vendored rows, checks every stratum's shares, and holds each key's stake scale within 0.5 to 2, so a broken stake draw that the scaling would hide fails it. Known biases: the quantities are levelled to the published figures while spending and the diary's incidence stay at survey level (María's ruling of 2026-10-23), so a household's alcohol or tobacco duty is one multiple of its own spending, the same for every household that carries it: at prior weights alcohol duty is about 0.44 times alcohol spending and tobacco duty about 1.8 times tobacco spending, since the diary records a fraction of what is bought; VAT on the same goods stays on the survey base. Tobacco duty also sits on fewer households than smoke: 8.2 percent of households carry it, against 11.9 percent of UK adults who smoked cigarettes in 2023 (ONS), while the share of households with a smoker is above the adult rate; the duty per carrying household is higher by the same factor. Part of the gap is the frame's: the chain's share draws come out zero more often than the donors' (10.3 percent of donors carry tobacco), mostly within households that carry the parent total. The gambling duties sit on the households the top-up brings to participation: 62.7 percent of households carry Lottery Duty and 29.8 percent the other gambling duties, against 10.7 and 2.0 percent on the diary's draws alone, and 47 percent of adults in Great Britain who gambled in the past four weeks of 2025 (27 percent once lottery-draw-only players are left out). The top-up's own biases: GSGB is taken as the level, though the Gambling Commission's guidance on its statistics reports that an invitation that mentions gambling raised participation estimates, and that its experiment could not conclude which estimates are the more accurate; under-recording is taken as even across households, so the donor propensity carries the diary's gradient by income, tenure, region and spending; the activity unions take activities as independent within their population, which GSGB's table B.13 rules out among players (45 percent of four-week gamblers took part in one activity, against 26 percent under independence), but a model in which each adult's activities share an intensity, which comes within 2.5 points of that share in every age band, moves neither key's union by more than 9 percent in any age band, nor the share of households carrying either key by more than 0.1 points; theta is one per key, fits households of three or more adults less well, and takes the share carrying betting and gaming from 28.5 percent at 0 to 41.2 percent at 1; the stake assumptions above; and GSGB covers adults in Great Britain in calendar 2025, so Northern Ireland's adults take its rates, against the FY2024-25 bases. On the real spine at prior weights, the share of households carrying the National Lottery rises from 51.5 percent in the bottom equivalised-income decile to 67.3 percent in the top, and betting and gaming from 26.8 to 34.8 percent, whose top decile holds 25.3 percent of the base; on the diary's draws alone betting and gaming is almost flat (1.9 to 2.1 percent, 18.9 percent of the base in the top decile). Ordered by the published chance alone, betting and gaming would run from 29.2 to 29.8 percent and the Lottery from 57.0 to 67.9 percent with GSGB's age mix, but neither key's regional pattern would follow GSGB's. With the propensity, the Lottery's does (a correlation of 0.67 across Great Britain's eleven regions, London lowest, as in GSGB), and betting and gaming's barely (0.11). Other tobacco (c22131) includes e-cigarette refills, so the tobacco inputs also follow vaping spending and a household that only vapes carries tobacco duty; Vaping Products Duty, from 1 October 2026, needs a key of its own. The draught shares are national constants, so a household that buys alcohol only in shops takes the same draught relief as one that drinks in pubs. The quantities are FY2024-25's, the excise year policyengine-uk charges in model year 2024 (its excise year runs from 6 April), and the engine holds them flat after it (PolicyEngine/policyengine-uk#2596). The step moves no spending column; the excise_quantities gate recomputes every level from the vendored rows. Since microcosm#1095 B3 the declared assign_car_attributes_from_nts step writes policyengine-uk's vehicle excise duty inputs, which no stage wrote, so every household's duty was zero: a household's vehicles less its members' company cars (an employer pays their duty) go one to each other adult, oldest first, a car beyond the adults left out (policyengine-uk holds one car a person); a household the fuel flag leaves without road fuel keeps zero-emission cars only, and one that buys fuel holds a petrol, diesel or other car first and further cars at its own per-car zero-emission share; each car is a kept NTS car of its class in the household's income fifth, drawn at its interview weight scaled to its fifth and age band's kept cars (fewer of the newest and oldest cars carry the registration record its CO2 bands come from), giving car_fuel_type (a diesel registered from 2021 meets RDE2), car_co2_emissions (its band's midpoint on the scale its duty regime reads), car_engine_size (none for a zero-emission car), car_first_registration_date (the reference date of 1 October 2025 less its age, drawn uniformly within its NTS band, so each car keeps its age; the open band of over 18 years closes at 25) and car_is_ved_exempt (DLA's higher-rate or PIP's enhanced mobility component exempts the member's own car, or the oldest car-holder's in their benefit unit). The list price keeps the engine's default, so no car pays the expensive-car supplement. Vehicle excise duty is measured, never bound: no target carries it." }, { "stage": "etb_vat", @@ -5950,7 +5958,8 @@ ], "weights": "explicit", "seed": 0, - "n_estimators": 100 + "n_estimators": 100, + "gate_calibration": "cross_fitted" }, { "kind": "support_clip", @@ -6241,7 +6250,7 @@ "nhs_admitted_patient_spending", "nhs_outpatient_spending" ], - "notes": "Ports ETB public-services QRF at household grain, uprates the FYE-2024 donor to the FRS 2024-25 base year by the declared uprate_donor_columns step (education by the engine's CPI index, rail support by ORR table 7270's own FY2024-25 over FY2023-24 outturn, bus support by DfT BUS05bi England net support, a factor the pricing overrides outside Wales and Northern Ireland and which therefore only positions the donor before the QRF), prices bus support from the frame's journeys (microcosm#930; the #890 rake to the published net support retired on María's ruling of 2026-09-23): per household, the published concessionary travel reimbursement per concessionary boarding times its eligible persons' boardings plus the rest of the published net support per boarding times every boarding, boardings being the nts_bus_travel trips times the fare pricing's boardings per resident trip, for London and England outside London (DfT BUS05bi and BUS01; outside London the concessionary boardings are BUS01c's older and disabled journeys, the travel the reimbursement pays for, microcosm#1385) and Scotland (Scottish Transport Statistics components and journeys); Wales (no published boardings) and Northern Ireland (the NITHC accounts carry bus and rail jointly) keep the chain's raw draw, clipped to donor support; the published totals stay bound as calibration targets and now measure the priced quantity, computes rail_usage from the 2024 fare index, and allocates NHS visits/spending to persons using the signed half-open age bands with the donor table's native 85-89, 90-94 and 95+ top bands (the former 85+ fold-in was retired once age_tail moved ahead of this stage and recipients could populate those bands). The year-max donor filter resolves to 2023 on the pinned tab (the file labels financial year ending 2024 as year 2023), so the services training year coincides with the VAT training year and the fare-index year - the incumbent's apparent three-way year mismatch is vacuous on this vintage. The recipient is_adult and is_child counts are the household's FRS claimants and partners and its other members (is_uc_claimant), as the donor's adults and childs count adults and dependent children, not the engine's age-18 split (uk-data#486, microcosm#1095)." + "notes": "Ports ETB public-services QRF at household grain, uprates the FYE-2024 donor to the FRS 2024-25 base year by the declared uprate_donor_columns step (education by the engine's CPI index, rail support by ORR table 7270's own FY2024-25 over FY2023-24 outturn, bus support by DfT BUS05bi England net support, a factor the pricing overrides outside Wales and Northern Ireland and which therefore only positions the donor before the QRF), prices bus support from the frame's journeys (microcosm#930; the #890 rake to the published net support retired on María's ruling of 2026-09-23): per household, the published concessionary travel reimbursement per concessionary boarding times its eligible persons' boardings plus the rest of the published net support per boarding times every boarding, boardings being the nts_bus_travel trips times the fare pricing's boardings per resident trip, for London and England outside London (DfT BUS05bi and BUS01; outside London the concessionary boardings are BUS01c's older and disabled journeys, the travel the reimbursement pays for, microcosm#1385) and Scotland (Scottish Transport Statistics components and journeys); Wales (no published boardings) and Northern Ireland (the NITHC accounts carry bus and rail jointly) keep the chain's raw draw, clipped to donor support; the published totals stay bound as calibration targets and now measure the priced quantity, computes rail_usage from the 2024 fare index, and allocates NHS visits/spending to persons using the signed half-open age bands with the donor table's native 85-89, 90-94 and 95+ top bands (the former 85+ fold-in was retired once age_tail moved ahead of this stage and recipients could populate those bands). Its QRF sign gates are cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: each is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on households the gates were not fitted to. The year-max donor filter resolves to 2023 on the pinned tab (the file labels financial year ending 2024 as year 2023), so the services training year coincides with the VAT training year and the fare-index year - the incumbent's apparent three-way year mismatch is vacuous on this vintage. The recipient is_adult and is_child counts are the household's FRS claimants and partners and its other members (is_uc_claimant), as the donor's adults and childs count adults and dependent children, not the engine's age-18 split (uk-data#486, microcosm#1095)." }, { "stage": "uc_reporter_redraw", @@ -6305,14 +6314,15 @@ "weight_mapping": "household_to_benunit", "fit": "regime_gated_qrf", "landing": "eldest_working_age_adult_lowest_person_id", - "seed": 44 + "seed": 44, + "gate_calibration": "cross_fitted" } ], "outputs": [], "rewrites": [ "universal_credit_reported" ], - "notes": "Runs after the person-grain SPI income chain and before UC capital coherence. One temporary engine simulation screens both FRS and SPI benefit units to a positive pre-take-up award using FRS-carried capital AND at least one non-child member (uc_maximum_amount pays qualifying-young-person-only units mechanically), and materializes the UC child and state-pension-age flags; engine-known values are consumed only. The consumed is_uc_couple predictor counts two retained FRS claimant/partner roles, independently of legal is_married; older dependent children do not become partners. A benefit-unit RegimeGatedQRF fitted on the screened base domain draws the screened SPI domain (rows); the rewrite domain (rewrite_rows) is the whole SPI channel, so screen-failing SPI units are zeroed. Each positive amount lands on one deterministic adult claimant; base-FRS rows remain byte-unchanged; an empty screened SPI domain refuses." + "notes": "Runs after the person-grain SPI income chain and before UC capital coherence. One temporary engine simulation screens both FRS and SPI benefit units to a positive pre-take-up award using FRS-carried capital AND at least one non-child member (uc_maximum_amount pays qualifying-young-person-only units mechanically), and materializes the UC child and state-pension-age flags; engine-known values are consumed only. The consumed is_uc_couple predictor counts two retained FRS claimant/partner roles, independently of legal is_married; older dependent children do not become partners. A benefit-unit RegimeGatedQRF fitted on the screened base domain draws the screened SPI domain (rows); the rewrite domain (rewrite_rows) is the whole SPI channel, so screen-failing SPI units are zeroed. Its sign gate is cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: it is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on benefit units the gate was not fitted to, with each household's benefit units in one fold. Each positive amount lands on one deterministic adult claimant; base-FRS rows remain byte-unchanged; an empty screened SPI domain refuses." }, { "stage": "spi_benefit_coherence", @@ -7598,7 +7608,8 @@ "clamp_minimum": 0, "clamp_maximum": "employment_income floored at zero; every row, reported or predicted, FRS and SPI channel", "preserve_asked_rows": true, - "cache": false + "cache": false, + "gate_calibration": "cross_fitted" }, { "kind": "convert_donors_to_target_stock", @@ -7664,7 +7675,7 @@ "employee_pension_contributions", "employment_income" ], - "notes": "The QRF trains only on the 2024-25 FRS asked subset with pay. Salary sacrifice is pay given up, so every amount, reported or predicted, is limited to the pay the person still receives, and a person without pay has none (uk-data#518, microcosm#1095); the limit bites above all on SPI-channel rows, which keep their FRS twin's answer beside pay redrawn from the SPI. The second arm creates support toward the reviewed 5.4m staging target by moving contributors' pension amounts, up to half their pay, into salary sacrifice and lowering their pay by the same amount, since the engine reads employment_income after sacrifice; what does not move stays an employee contribution, so the sacrifice never exceeds the pay that remains. Before microcosm#1069 c9 the pay stayed whole and the converted record lost its net-pay relief. The third arm adds bonus sacrifice beside pay toward the OBR's 2027-28 base above GBP 2,000 (microcosm#1340). A sacrificed bonus is never received, so the FRS records it in neither pay nor its bonus amounts, and pay stays as it is (María's ruling of 2026-10-24 on Vahid's review of microcosm#1383); a received FRS bonus marks a bonus-paying job and its size. An SPI-channel adult's FRS bonus is its twin's, beside the tape's pay, so it draws a bonus share of pay from a base-FRS adult in its pay cell instead." + "notes": "The QRF trains only on the 2024-25 FRS asked subset with pay. Its sign gate is cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: it is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on people the gate was not fitted to, with each household's members in one fold. Salary sacrifice is pay given up, so every amount, reported or predicted, is limited to the pay the person still receives, and a person without pay has none (uk-data#518, microcosm#1095); the limit bites above all on SPI-channel rows, which keep their FRS twin's answer beside pay redrawn from the SPI. The second arm creates support toward the reviewed 5.4m staging target by moving contributors' pension amounts, up to half their pay, into salary sacrifice and lowering their pay by the same amount, since the engine reads employment_income after sacrifice; what does not move stays an employee contribution, so the sacrifice never exceeds the pay that remains. Before microcosm#1069 c9 the pay stayed whole and the converted record lost its net-pay relief. The third arm adds bonus sacrifice beside pay toward the OBR's 2027-28 base above GBP 2,000 (microcosm#1340). A sacrificed bonus is never received, so the FRS records it in neither pay nor its bonus amounts, and pay stays as it is (María's ruling of 2026-10-24 on Vahid's review of microcosm#1383); a received FRS bonus marks a bonus-paying job and its size. An SPI-channel adult's FRS bonus is its twin's, beside the tape's pay, so it draws a bonus share of pay from a base-FRS adult in its pay cell instead." }, { "stage": "carers_allowance_take_up", diff --git a/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml b/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml index 519dd8067b..e08d84f416 100644 --- a/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml +++ b/packages/microcosm-build/src/microcosm/build/uk/spec/sources.yaml @@ -1855,6 +1855,7 @@ stages: charitable_investment_gifts: 0.0 n_estimators: 100 seed: 42 + gate_calibration: cross_fitted - kind: resample_band_donor_leaves carrier_column: person_is_spi_income_band_carrier band_column: spi_income_band_donor_lower_bound @@ -1968,6 +1969,7 @@ stages: require_all_outputs: false n_estimators: 100 seed: 43 + gate_calibration: cross_fitted - kind: zero_pension_age_reports_below_state_pension_age spi_state_pension_leaf: hmrc_spi_state_pension_income spi_channel_columns: @@ -2277,7 +2279,7 @@ stages: - private_pension_income_annual_share - contributory_benefits_annual_share - annuity_and_trust_income - notes: Runs the SPI-trained income QRFs on the raw-spine support channel, drawing for its claimants and partners aged 16 and over so dependants aged 16 to 19 keep their FRS twin's values (uk-data#504, microcosm#1095), initializes FRS charity columns to zero, trains FRS-only stage 2 on the FRS rows' reported values, flags the rows it drew (person_is_spi_income_recipient) so later stages tell tape-concept rows from FRS-concept ones without re-deriving the recipient rule (microcosm#840), leaves every FRS-channel income as reported (no base-channel redraw of dividends; uk-data#498, microcosm#1095), and emits a sidecar-only 208-fact replay report for the spine path. Stage 2 also draws trading_loss, the year's trading loss the tape does not carry, from the FRS rows (uk-data#528), and a drawn row whose self_employment_income is positive keeps no loss, so profit and loss never both hold an amount, as on the FRS rows (microcosm#1095). The chain draws self_employment_income net of the tape's losses brought forward (LOSSBF), as the tape holds profits, and last of all, so no earlier draw moves, the year's profit before them and the losses. After the FRS-only fill and the HMRC aggregates the stage moves the losses out of the profit into loss_relief and ni_class_4_losses_brought_forward, the inputs policyengine-uk relieves them against (income tax under ITA 2007 s.83, Class 4 under SSCBA 1992 Sch 2 para 3), so Universal Credit, HBAI and market income read the year's profit; where the drawn net profit is positive the losses are its gap to the year's profit and where it is zero they are at least that profit, so the profit after the relief is the drawn net profit on every row, which the HMRC aggregates and the HMRC self-employment rows read (uk-data#528, microcosm#1095). The engine carries both losses into each projected year at their nominal value while the profit grows with its index. Stage 2 draws the six owner-manager inputs last, the five flags as 0 or 1 and then the income share, so each follows the drawn incomes; the root stage's rules then hold on the drawn rows (an owner works in the company, its other inputs need an owner, and a company carries on a trade or a property business, never both), since the tape carries no director answers (microcosm#1095). A drawn row's annual income descriptors follow its drawn incomes. The tape records the tax year's income, so its pay, profit and private pension shares are 1, and its contributory benefits, stage-2 draws on the current concept with no spell of their own, take share 1 too. It keeps its twin's other-spell pay only where it drew no pay, and its twin's ceased self-employment only where it drew no profit, since the bridge draws a record without pay for a twin who left a job in the year. An undrawn copy keeps its twin's descriptors with its twin's incomes. A drawn row's annuity and trust descriptor is zero, since the tape's private pension excludes those payments and books them as other income (microcosm#1428). + notes: 'Runs the SPI-trained income QRFs on the raw-spine support channel, drawing for its claimants and partners aged 16 and over so dependants aged 16 to 19 keep their FRS twin''s values (uk-data#504, microcosm#1095), initializes FRS charity columns to zero, trains FRS-only stage 2 on the FRS rows'' reported values, flags the rows it drew (person_is_spi_income_recipient) so later stages tell tape-concept rows from FRS-concept ones without re-deriving the recipient rule (microcosm#840), leaves every FRS-channel income as reported (no base-channel redraw of dividends; uk-data#498, microcosm#1095), and emits a sidecar-only 208-fact replay report for the spine path. The sign gates of both stages, and of the FRS reference forests the transport locates twins on, are cross-fitted (gate_calibration: cross_fitted on both operations; microcosm#1359), each calibrated on the donors its fold gates left out, with each FRS household''s members in one fold. The reference forests take stage 1''s declaration, so the gate that places a twin''s observed sign and the tape gate that reads it are calibrated alike. Stage 2 also draws trading_loss, the year''s trading loss the tape does not carry, from the FRS rows (uk-data#528), and a drawn row whose self_employment_income is positive keeps no loss, so profit and loss never both hold an amount, as on the FRS rows (microcosm#1095). The chain draws self_employment_income net of the tape''s losses brought forward (LOSSBF), as the tape holds profits, and last of all, so no earlier draw moves, the year''s profit before them and the losses. After the FRS-only fill and the HMRC aggregates the stage moves the losses out of the profit into loss_relief and ni_class_4_losses_brought_forward, the inputs policyengine-uk relieves them against (income tax under ITA 2007 s.83, Class 4 under SSCBA 1992 Sch 2 para 3), so Universal Credit, HBAI and market income read the year''s profit; where the drawn net profit is positive the losses are its gap to the year''s profit and where it is zero they are at least that profit, so the profit after the relief is the drawn net profit on every row, which the HMRC aggregates and the HMRC self-employment rows read (uk-data#528, microcosm#1095). The engine carries both losses into each projected year at their nominal value while the profit grows with its index. Stage 2 draws the six owner-manager inputs last, the five flags as 0 or 1 and then the income share, so each follows the drawn incomes; the root stage''s rules then hold on the drawn rows (an owner works in the company, its other inputs need an owner, and a company carries on a trade or a property business, never both), since the tape carries no director answers (microcosm#1095). A drawn row''s annual income descriptors follow its drawn incomes. The tape records the tax year''s income, so its pay, profit and private pension shares are 1, and its contributory benefits, stage-2 draws on the current concept with no spell of their own, take share 1 too. It keeps its twin''s other-spell pay only where it drew no pay, and its twin''s ceased self-employment only where it drew no profit, since the bridge draws a record without pay for a twin who left a job in the year. An undrawn copy keeps its twin''s descriptors with its twin''s incomes. A drawn row''s annuity and trust descriptor is zero, since the tape''s private pension excludes those payments and books them as other income (microcosm#1428).' - stage: company_cars survey: Family Resources Survey 2024-25 job record; Wealth and Assets Survey round 8; HMRC Benefits in kind statistics (July 2026) source: The FRS job record's company car answers through frs_spine's carriers (EXPBEN01, EXPBEN03, CARVAL, FUELTYP, CARCON, CARAMT), WAS round-8 company cars' list prices, and HMRC's 2024-25 company car recipients by CO2 band (Table 2A) and fuel (Table 2C), via the vendored facts @@ -2494,6 +2496,7 @@ stages: landing: household_reference_person n_estimators: 100 seed: 0 + gate_calibration: cross_fitted outputs: [] rewrites: - tenure_type @@ -2513,7 +2516,7 @@ stages: - council_tax_rebate - housing_benefit_reported - council_tax_benefit_reported - notes: Runs after the SPI income chain and before the income-conditioned donor stages, the household counterpart of the SPI stage-2 FRS-only fill. The support copies and income band donors are whole FRS households, so without this stage each kept its FRS parent's housing, drawn for the parent's income. Trained on the FRS base households (positive household weight) and drawn for every SPI-channel household from engine-free predictors (region, household type, adults, children, single-adult status, reference-person age and household income components). Tenure, dwelling type, bedrooms and council-tax band are drawn in that order by weighted multiclass classifiers with an inverse-CDF draw; the housing amounts and the head benefit unit's Housing Benefit and the reference person's council tax benefit by one chained regime-gated QRF conditioned on the drawn categories, clipped to the training range. Every draw reads uniforms keyed on household_id. An amount is zero wherever the training households have no positive value for its tenure or region; mortgage payments need a mortgaged tenure (true of every FRS household); Housing Benefit needs a rented tenure (the engine pays it to renting reporters only); council tax benefit is capped at council tax and the household council_tax_rebate equals it, both on the reference person as the FRS holds them. Region, single-adult status, BRMA (region and the recipient's own LHA category), the flat-rate household draws and composition are kept; FRS base rows are byte-unchanged. + notes: 'Runs after the SPI income chain and before the income-conditioned donor stages, the household counterpart of the SPI stage-2 FRS-only fill. The support copies and income band donors are whole FRS households, so without this stage each kept its FRS parent''s housing, drawn for the parent''s income. Trained on the FRS base households (positive household weight) and drawn for every SPI-channel household from engine-free predictors (region, household type, adults, children, single-adult status, reference-person age and household income components). Tenure, dwelling type, bedrooms and council-tax band are drawn in that order by weighted multiclass classifiers with an inverse-CDF draw; the housing amounts and the head benefit unit''s Housing Benefit and the reference person''s council tax benefit by one chained regime-gated QRF conditioned on the drawn categories, clipped to the training range. The QRF''s sign gates are cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption''s are: each is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on households the gates were not fitted to. Every draw reads uniforms keyed on household_id. An amount is zero wherever the training households have no positive value for its tenure or region; mortgage payments need a mortgaged tenure (true of every FRS household); Housing Benefit needs a rented tenure (the engine pays it to renting reporters only); council tax benefit is capped at council tax and the household council_tax_rebate equals it, both on the reference person as the FRS holds them. Region, single-adult status, BRMA (region and the recipient''s own LHA category), the flat-rate household draws and composition are kept; FRS base rows are byte-unchanged.' - stage: was_wealth survey: Wealth and Assets Survey round 8 source: Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed 2006-22 household tab. @@ -2680,6 +2683,7 @@ stages: - unit_and_investment_trusts undrawn_fraction: 1.0 secured_debt_within: other_mortgage + gate_calibration: cross_fitted - kind: fold_into output: corporate_wealth inputs: @@ -2746,8 +2750,7 @@ stages: - unit_and_investment_trusts - other_residential_property_secured_debt - non_residential_property_secured_debt - notes: 'Ports incumbent WAS round-8 wealth imputation with signed E5 differences: exact lower-case column matching replaces the fuzzy r/w fallback; cash ISA uses DVCISAVR8_aggr and stocks-and-shares ISA uses DVIISAVR8_aggr; private pension wealth (WAS total private pension wealth less the current defined-benefit component; DB-type components at the SCAPE rate, money-purchase components at reported fund values) is drawn as its own output private_pension_wealth and no longer folded into corporate_wealth, which keeps only the share-like holdings - pension rights are disregarded capital in every means test (UC Regs 2013 Sch 10 para 10 and the HB/JSA/ESA/IS/SPC parallels; uk-data#452) - and the downstream chain segment conditions on both components; each chain segment starts its own fit and draw RNG streams from a child seed derived deterministically from the declared seed (start_chain respawns from the model seed on every call, so one shared model coupled the k-th target of every segment); corporate_wealth folds stocks-and-shares ISA after drawing corporate_wealth_excl_isa; recipient Northern Ireland regions are mapped to Wales for prediction only; student_loan_balance is allocated by household id rather than the incumbent positional off-by-one. Tenure enters every chain segment as one four-way category built the same way on both sides (microcosm#1063): the donor''s from Ten1R8 and DVPriRntR8 (owned outright; buying with a mortgage or part rent, part mortgage; rented or rent-free from a private landlord; rented from a council or housing association), the recipient''s from the frame''s tenure_type (council and housing association together), so the stage reads no engine tenure formula. Two columns are structural in tenure and are fitted and drawn inside their stratum only, zero by rule elsewhere: main_residence_value on the owner tenures (every WAS owner has a positive value and no renter has one) and main_residence_mortgage (TotMortR8) on the mortgaged tenure. mortgage_debt is HMortGR8, all of the household''s mortgages, and is derived as the main-residence mortgage plus the mortgages on other property (other_mortgage, HMortGR8 less TotMortR8 on the donor: buy-to-let, second homes and the rest), which are held on every tenure and drawn without a stratum, so an outright owner''s or a renter''s buy-to-let keeps its mortgage beside the property it is secured on (OthMortR8_sum is read for the receipt only); the donor''s conditioning copy carries the same rule, so consumer_debt is fitted on values recipients can hold. Totals are not drawn: property_wealth is the sum of land, the main residence, other houses, buildings and a drawn remainder (buy-to-let, overseas and other property), gross_financial_wealth is savings, the cash ISA, the share-like holdings and a drawn remainder, and net_financial_wealth is gross less consumer debt and the student loan balance - identities the pinned tab satisfies on every row and the cleaning step refuses a donor that breaks. A sum of donor-valued components that leaves the donor''s range for the total gives up the excess from the remainder first, and the receipt counts the rows. Eleven chain segments, each with its own child seed: land; the main residence; the other property components; pension and share-like wealth; the financial components, vehicles and the student loan balance; the main-residence mortgage; the other mortgages; consumer debt; then three appended after them, so the first eight draw as they did before them (microcosm#1095, the WAS property draw), each fitted on the donors and drawn for the recipients holding the column holder_strata names. The first is the directly held fraction of the share-like holdings outside ISAs, from which the stage writes directly_held_shares (WAS UK shares plus employee shares and options) and unit_and_investment_trusts (WAS collective investments, which the survey asks about in one question; uk-data#501), the inputs policyengine-uk reads inside corporate_wealth (pe-uk#1974): the split is written on the final corporate_wealth less the stocks-and-shares ISA, so the two and the ISA sum to corporate_wealth and the engine''s share_like_capital stays corporate_wealth; a household with such holdings but no drawn fraction (a clip that lowered the ISA alone) holds them directly (undrawn_fraction), and the receipt counts it. The other two are the debt secured on other residential property (WAS DVHseDebtR8_sum + DVBLtDebtR8_sum) and on non-residential property (DVBldDebtR8_sum), which policyengine-uk deducts after the sale costs in valuing Universal Credit property capital (UC Regs 2013 reg 49(1)(b)): each is zero where the final value of its asset is zero, and the two are parts of the mortgages on other property, so where their sum passes other_mortgage both are scaled down to it (secured_debt_within); the receipt counts the rows each rule touched, and the wealth_coherence gate holds the split and the debts as identities. HFINWNTR8_exSLC_Sum is net financial wealth excluding student loans, so gross less it is the non-student-loan financial liabilities; UKDS SN 7215 documentation is the codebook. Engine predictors materialize at their native entity and person/benunit values are summed to household, reproducing the incumbent map_to=household semantics; region is one-hot encoded jointly across donor and recipient (the incumbent''s dummy encoding), with unmapped donor GOR codes becoming all-zero dummy rows. The WAS and FRS predictor definitions are not fully like-for-like and are ported as-is; raw WAS missing values are blanket-filled with zero; UKDS negative sentinel codes (-9/-8/-7/-6) are recoded to zero - for the nonnegative-domain columns the licensed audit found carrying them (vcarnr8: 2 rows; HBedRmR8: 95.8 percent - the bedrooms question is effectively unasked in the WAS household file, predictor-quality revisit registered on microcosm#145) - a signed difference vs the incumbent, which trains on raw sentinels; DVPriRntR8''s -9 is structural not-applicable so the private-renter reading is unchanged; genuinely negative domains are never recoded. The recipient council_tax predictor is the bill the household pays, council_tax less council_tax_rebate, the quantity the WAS donor records, since the spine''s council_tax is the liability before council tax reduction (uk-data#496/#499, microcosm#1095). The donor council_tax is DVCTaxAmtAnnualR8, the annual amount paid (CTAmtR8 is one instalment), its children are NumChildR8 (NumCh18R8 overlaps NumAdultR8), and the recipient adults and children are the household''s FRS claimants and partners and its other members (is_uc_claimant), which together make the household size on both sides; rental_income is the donor''s net rent DVNetRentAmtAnnualR8_aggr against the household''s property_income (uk-data#486/#495, microcosm#1095).' + notes: 'Ports incumbent WAS round-8 wealth imputation with signed E5 differences: exact lower-case column matching replaces the fuzzy r/w fallback; cash ISA uses DVCISAVR8_aggr and stocks-and-shares ISA uses DVIISAVR8_aggr; private pension wealth (WAS total private pension wealth less the current defined-benefit component; DB-type components at the SCAPE rate, money-purchase components at reported fund values) is drawn as its own output private_pension_wealth and no longer folded into corporate_wealth, which keeps only the share-like holdings - pension rights are disregarded capital in every means test (UC Regs 2013 Sch 10 para 10 and the HB/JSA/ESA/IS/SPC parallels; uk-data#452) - and the downstream chain segment conditions on both components; each chain segment starts its own fit and draw RNG streams from a child seed derived deterministically from the declared seed (start_chain respawns from the model seed on every call, so one shared model coupled the k-th target of every segment); corporate_wealth folds stocks-and-shares ISA after drawing corporate_wealth_excl_isa; recipient Northern Ireland regions are mapped to Wales for prediction only; student_loan_balance is allocated by household id rather than the incumbent positional off-by-one. Its QRF sign gates are cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption''s are: each is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on households the gates were not fitted to. Tenure enters every chain segment as one four-way category built the same way on both sides (microcosm#1063): the donor''s from Ten1R8 and DVPriRntR8 (owned outright; buying with a mortgage or part rent, part mortgage; rented or rent-free from a private landlord; rented from a council or housing association), the recipient''s from the frame''s tenure_type (council and housing association together), so the stage reads no engine tenure formula. Two columns are structural in tenure and are fitted and drawn inside their stratum only, zero by rule elsewhere: main_residence_value on the owner tenures (every WAS owner has a positive value and no renter has one) and main_residence_mortgage (TotMortR8) on the mortgaged tenure. mortgage_debt is HMortGR8, all of the household''s mortgages, and is derived as the main-residence mortgage plus the mortgages on other property (other_mortgage, HMortGR8 less TotMortR8 on the donor: buy-to-let, second homes and the rest), which are held on every tenure and drawn without a stratum, so an outright owner''s or a renter''s buy-to-let keeps its mortgage beside the property it is secured on (OthMortR8_sum is read for the receipt only); the donor''s conditioning copy carries the same rule, so consumer_debt is fitted on values recipients can hold. Totals are not drawn: property_wealth is the sum of land, the main residence, other houses, buildings and a drawn remainder (buy-to-let, overseas and other property), gross_financial_wealth is savings, the cash ISA, the share-like holdings and a drawn remainder, and net_financial_wealth is gross less consumer debt and the student loan balance - identities the pinned tab satisfies on every row and the cleaning step refuses a donor that breaks. A sum of donor-valued components that leaves the donor''s range for the total gives up the excess from the remainder first, and the receipt counts the rows. Eleven chain segments, each with its own child seed: land; the main residence; the other property components; pension and share-like wealth; the financial components, vehicles and the student loan balance; the main-residence mortgage; the other mortgages; consumer debt; then three appended after them, so the first eight draw as they did before them (microcosm#1095, the WAS property draw), each fitted on the donors and drawn for the recipients holding the column holder_strata names. The first is the directly held fraction of the share-like holdings outside ISAs, from which the stage writes directly_held_shares (WAS UK shares plus employee shares and options) and unit_and_investment_trusts (WAS collective investments, which the survey asks about in one question; uk-data#501), the inputs policyengine-uk reads inside corporate_wealth (pe-uk#1974): the split is written on the final corporate_wealth less the stocks-and-shares ISA, so the two and the ISA sum to corporate_wealth and the engine''s share_like_capital stays corporate_wealth; a household with such holdings but no drawn fraction (a clip that lowered the ISA alone) holds them directly (undrawn_fraction), and the receipt counts it. The other two are the debt secured on other residential property (WAS DVHseDebtR8_sum + DVBLtDebtR8_sum) and on non-residential property (DVBldDebtR8_sum), which policyengine-uk deducts after the sale costs in valuing Universal Credit property capital (UC Regs 2013 reg 49(1)(b)): each is zero where the final value of its asset is zero, and the two are parts of the mortgages on other property, so where their sum passes other_mortgage both are scaled down to it (secured_debt_within); the receipt counts the rows each rule touched, and the wealth_coherence gate holds the split and the debts as identities. HFINWNTR8_exSLC_Sum is net financial wealth excluding student loans, so gross less it is the non-student-loan financial liabilities; UKDS SN 7215 documentation is the codebook. Engine predictors materialize at their native entity and person/benunit values are summed to household, reproducing the incumbent map_to=household semantics; region is one-hot encoded jointly across donor and recipient (the incumbent''s dummy encoding), with unmapped donor GOR codes becoming all-zero dummy rows. The WAS and FRS predictor definitions are not fully like-for-like and are ported as-is; raw WAS missing values are blanket-filled with zero; UKDS negative sentinel codes (-9/-8/-7/-6) are recoded to zero for the nonnegative-domain columns the licensed audit found carrying them (vcarnr8: 2 rows; HBedRmR8: 95.8 percent - the bedrooms question is effectively unasked in the WAS household file, predictor-quality revisit registered on microcosm#145) - a signed difference vs the incumbent, which trains on raw sentinels; DVPriRntR8''s -9 is structural not-applicable so the private-renter reading is unchanged; genuinely negative domains are never recoded. The recipient council_tax predictor is the bill the household pays, council_tax less council_tax_rebate, the quantity the WAS donor records, since the spine''s council_tax is the liability before council tax reduction (uk-data#496/#499, microcosm#1095). The donor council_tax is DVCTaxAmtAnnualR8, the annual amount paid (CTAmtR8 is one instalment), its children are NumChildR8 (NumCh18R8 overlaps NumAdultR8), and the recipient adults and children are the household''s FRS claimants and partners and its other members (is_uc_claimant), which together make the household size on both sides; rental_income is the donor''s net rent DVNetRentAmtAnnualR8_aggr against the household''s property_income (uk-data#486/#495, microcosm#1095).' - stage: was_lisa survey: Wealth and Assets Survey round 8 source: Office for National Statistics Wealth and Assets Survey, UK Data Service SN 7215, DOI 10.5255/UKDA-SN-7215-20; local licensed round-8 person and household tabs (interviews April 2020 to March 2022, Great Britain). @@ -3468,6 +3471,7 @@ stages: trips_per_year: 0 labels: - Less than once a year or never (%) + gate_calibration: cross_fitted - kind: assign_trips_from_band_means outputs: - bus_in_london_trips @@ -3542,7 +3546,7 @@ stages: - other_local_bus_trips - local_bus_trips - household_local_bus_trips - notes: Imputes local-bus travel per person from the National Travel Survey microdata (microcosm#930; the structural fix Maria ruled on 2026-09-15 for the rake-then-bind bus fares of microcosm#890). The donor is the NTS End User Licence extract (England residents only since 2013) pooled over the declared survey years for the conditional fit; the artifact pins are the 19th-edition (November 2025) tabs, verified at runtime, and the H2 fixture drives the stage with synthetic tabs in the same codebook. One QRF target, the interview frequency-of-use band (the variable behind NTS0313; 0 is the non-user band), conditioned on age band, sex, cars (the was_wealth draw on the recipient), household size, the three-band gross household income (on the recipient its HBAI net income with the deductions policyengine-uk takes to reach it added back, gross cash income as the NTS band measures it; the engine's household_gross_income adds capital gains and imputed NHS, education and transport spending, which put a fifth of households a band too high; microcosm#1164) and region, drawn from identity-keyed uniforms and rounded to the nearest band; devolved recipients take a declared proxy region for prediction only. Each person's annual local-bus trips are the diary's weighted mean for their band and residence group (London or the rest of England), split into the bus-in-London and other-local-bus series by main mode, W5 x JJXSC over W2 persons annualised by 52.14 weeks; a seven-day diary annualised per person would be right in aggregate and wrong in distribution, so it supplies band means, not per-person counts. If the extract carries no frequency column the band is drawn from the vendored NTS0313/NTS0621 shares and declared band midpoints are scaled to the vendored NTS0303 rate (the receipt names the path). Concessionary eligibility is the declared statutory age rule of the person's area, emitted for the lcfs pricing step to zero-price eligible persons' trips; the donor's eligible share of trips per series is receipted beside the publisher's concessionary boarding share. The stage and ticket tables class every diary bus boarding by how it was paid for (at the point of use, a season ticket or pass, a concessionary pass, free) and give each person the share of fare-paying boardings paid at the point of use for their band and residence group (local_bus_single_fare_share), the boardings a per-journey fare cap binds on, with the fare paid per boarding by residence group and survey year receipted beside it (microcosm#930 C13, María's ask of 2026-09-23). The share is read on the cap years declared in fare_cap_regime only (England's £2 single-fare cap outside London ran from 1 January 2023 to 31 December 2024, and an NTS survey year is a calendar year), because nine months of the FRS 2024-25 base year (April to December 2024) sit under that cap and the last three under the £3 cap that followed it; 2022, before it, stays in the band and trip fit. The share under the £3 cap or with no cap is not observed, because the extract ends in 2024 (microcosm#1331). For England outside London the receipt also carries fare-mix lines, aggregates only. Before the cap they give the share of point-of-use boardings paid above the cap and their mean fare, at that year's prices; under it, the share paid at the cap, within the declared tolerance. A line that rests on fewer than 3 unweighted boardings or 3 distinct households, or whose complement does, reads <3. The stage records the frame's band shares against NTS0313/NTS0621, its trips per person against NTS0303 and by age band against NTS0601, and the frame's car availability against NTS0205, all from vendored rows; nothing derived from the licensed rows is committed. + notes: 'Imputes local-bus travel per person from the National Travel Survey microdata (microcosm#930; the structural fix Maria ruled on 2026-09-15 for the rake-then-bind bus fares of microcosm#890). The donor is the NTS End User Licence extract (England residents only since 2013) pooled over the declared survey years for the conditional fit; the artifact pins are the 19th-edition (November 2025) tabs, verified at runtime, and the H2 fixture drives the stage with synthetic tabs in the same codebook. One QRF target, the interview frequency-of-use band (the variable behind NTS0313; 0 is the non-user band), conditioned on age band, sex, cars (the was_wealth draw on the recipient), household size, the three-band gross household income (on the recipient its HBAI net income with the deductions policyengine-uk takes to reach it added back, gross cash income as the NTS band measures it; the engine''s household_gross_income adds capital gains and imputed NHS, education and transport spending, which put a fifth of households a band too high; microcosm#1164) and region, drawn from identity-keyed uniforms and rounded to the nearest band; devolved recipients take a declared proxy region for prediction only. Its sign gate is cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption''s are: it is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on people the gate was not fitted to, with each NTS household''s members in one fold. Each person''s annual local-bus trips are the diary''s weighted mean for their band and residence group (London or the rest of England), split into the bus-in-London and other-local-bus series by main mode, W5 x JJXSC over W2 persons annualised by 52.14 weeks; a seven-day diary annualised per person would be right in aggregate and wrong in distribution, so it supplies band means, not per-person counts. If the extract carries no frequency column the band is drawn from the vendored NTS0313/NTS0621 shares and declared band midpoints are scaled to the vendored NTS0303 rate (the receipt names the path). Concessionary eligibility is the declared statutory age rule of the person''s area, emitted for the lcfs pricing step to zero-price eligible persons'' trips; the donor''s eligible share of trips per series is receipted beside the publisher''s concessionary boarding share. The stage and ticket tables class every diary bus boarding by how it was paid for (at the point of use, a season ticket or pass, a concessionary pass, free) and give each person the share of fare-paying boardings paid at the point of use for their band and residence group (local_bus_single_fare_share), the boardings a per-journey fare cap binds on, with the fare paid per boarding by residence group and survey year receipted beside it (microcosm#930 C13, María''s ask of 2026-09-23). The share is read on the cap years declared in fare_cap_regime only (England''s £2 single-fare cap outside London ran from 1 January 2023 to 31 December 2024, and an NTS survey year is a calendar year), because nine months of the FRS 2024-25 base year (April to December 2024) sit under that cap and the last three under the £3 cap that followed it; 2022, before it, stays in the band and trip fit. The share under the £3 cap or with no cap is not observed, because the extract ends in 2024 (microcosm#1331). For England outside London the receipt also carries fare-mix lines, aggregates only. Before the cap they give the share of point-of-use boardings paid above the cap and their mean fare, at that year''s prices; under it, the share paid at the cap, within the declared tolerance. A line that rests on fewer than 3 unweighted boardings or 3 distinct households, or whose complement does, reads <3. The stage records the frame''s band shares against NTS0313/NTS0621, its trips per person against NTS0303 and by age band against NTS0601, and the frame''s car availability against NTS0205, all from vendored rows; nothing derived from the licensed rows is committed.' - stage: lcfs_consumption survey: Living Costs and Food Survey 2024-25 source: UK Data Service SN 9603 Living Costs and Food Survey 2024-25 (2nd edition) household/person tabs and the vendored Chronicle facts for NEED 2024 mean kWh, DESNZ Energy Trends and QEP average prices paid for calendar 2024, road-fuel outturn (DESNZ, HMRC, ONS Consumer Trends) and road fuel by vehicle type (DESNZ), ONS Consumer Trends household spending by COICOP division, the DfT VEH1103 licensed-car stock, NTS bus use, the NTS private cars (UK Data Service SN 5340, End User Licence; the vehicle and household tabs, survey years 2022-2024) for the zero-emission share by income fifth and the household-paid road-fuel mix, and the DfT and devolved bus finance tables and fares indices. @@ -3936,6 +3940,7 @@ stages: weights: explicit seed: 0 n_estimators: 100 + gate_calibration: cross_fitted - kind: support_clip range: donor_realized exempt: @@ -3954,6 +3959,7 @@ stages: seed: 0 salt: lcfs_prepayment_meter n_estimators: 100 + gate_calibration: cross_fitted - kind: iterative_proportional_fit columns: - electricity_consumption @@ -4175,6 +4181,7 @@ stages: seed: 0 salt: lcfs_positive_road_fuel n_estimators: 100 + gate_calibration: cross_fitted - kind: level_road_fuel columns: - petrol_spending @@ -4628,7 +4635,7 @@ stages: - horse_and_dog_pool_betting_net_losses - car_co2_emissions - car_engine_size - notes: 'Ports the incumbent LCFS consumption QRF, including NEED energy raking, with adjudicated weighted fits and an identity-keyed seed-0 fuel flag. The vehicle count is a numeric QRF predictor on both sides (LCFS a124 on the donor, the was_wealth draw of WAS vcarnr8 on the recipient, both clipped to 0-5), which retires the incumbent''s WAS-to-LCFS has-fuel bridge (microcosm#890 A). The recipient fuel flag draws each of a household''s vehicles as zero-emission at the battery-electric and fuel-cell share of the vendored DfT VEH1103 licensed-car stock (2024, Great Britain; plug-in hybrids count as fuel buyers), replacing the hand-copied NTS share (microcosm#890 E2): a household with vehicles buys fuel unless every one of them is zero-emission, so it is flagged at one minus that share raised to its vehicle count, and a one-vehicle household keeps the draw it had when the whole household was drawn at once (microcosm#1278; before, a household with several vehicles was all one or the other). The frame holds no fuel type, so the draw, keyed on the household identity, is what makes a vehicle-owning household a fuel buyer. Since microcosm#1095 B3 (J2) the per-car zero-emission share follows the household''s income fifth: the national share times the fifth''s relative risk among the cars NTS households keep (UK Data Service SN 5340, survey years 2022-2024, at the interview weight W3; zero-emission in the DVLA-linked 0 g/km CO2 band, the about three in ten cars without a linked band left out, as missing at random within their fifth), normalised over the frame''s cars so the national share is the licensed-car one. The NTS ranks England''s households by total gross income, McClements-equivalised, so the frame ranks household_gross_income over the engine''s before-housing-costs equivalence scale, in household-weighted fifths; a fifth on fewer than 10 zero-emission NTS cars would pool with its neighbour (a statistical floor, not the disclosure floor of 3). The uniforms are the same, so only the threshold moves. With the redraw of microcosm#1113 every flagged household buys fuel, so this flag alone sets fuel incidence; within an income fifth, who holds the zero-emission cars stays random. The household input uses_energy_prepayment_meter, which policyengine-uk reads for the July 2023 to March 2024 Energy Price Guarantee prepayment discount (PolicyEngine/policyengine-uk#2098, from 2.123.3), is drawn by the declared impute_prepayment_meter step (microcosm#1110): the donor prepays when it last put money on an electricity, gas or combined key or meter (b1751, b1701, b233, which the LCF asks only of prepayment-meter households) or its diary records a slot-meter payment (c45114, c45214), so electricity-only prepayment counts and a household with no meter payment, including one that did not answer, does not; a weighted regime-gated QRF on the chain''s predictors fits that flag and each recipient draws it at uniforms keyed on its household id, which moves no other draw. The release exports it: policyengine-uk reads it from 2.123.3 and an older engine, Microcosm''s locked one among them, ignores a column it does not know; the incumbent does not carry it until uk-data#539, so it is a reviewed extra column of the export surface. The frame flags about 3.0 million Great Britain households (10.5 %) at prior weights, against the around three million prepayment households the government counted when the discount began in July 2023 (a different reference period, households in both). Energy support clipping is exempt because NEED raking governs those columns. Bus fares are clipped to donor support before the pricing step (María''s rulings 2026-09-15 and 2026-09-17), which bounds the region no area prices (Wales keeps the chain''s raw draw) while the priced regions move beyond donor support afterwards; for that reason the column carries no committed support bound for the terminal gate. Domestic energy is raked in kWh to the NEED 2024 shape at the DESNZ level and priced at the average prices paid (microcosm#890 F, chronicle#270), where both NEED rakes take their mean-kWh margins from the vendored NEED 2024 tables (England and Wales by income band, tenure, property type and region; Scotland by income band, tenure and property type with the all-dwellings mean as its region margin; Northern Ireland untouched), the declared price_domestic_energy step converts spend to kWh and back at each household''s QEP price region through the committed crosswalk using the calendar-2024 average variable unit cost and fixed cost across payment methods, standard metering, including VAT (Northern Ireland gas at the UK average because QEP publishes no Northern Ireland gas row), a gas fixed cost only for connected households, the gas connection imposed on the recipient frame at the published share of each region (DESNZ subnational gas meters over electricity meters, 2024) by disconnecting gas-positive households in an identity-keyed uniform order, skipping a household whose weight would overshoot the published share (Northern Ireland has no subnational row and keeps the positive-gas rule), and, where the draw leaves a region below its share, by the declared connect_rule (microcosm#1164): two weighted fits on the chain''s predictors give each zero-gas household the probability that a donor like it pays for gas (a gradient-boosted classifier of the donor''s gas payers) and the gas such a donor pays (a regime-gated QRF of the payers'' gas spend, at quantiles keyed on the household id), and the region''s zero-gas households are connected in an identity-keyed order drawn in proportion to that probability, by the same weight-fitting walk, until the share is met. The labelled energy split leaves about 80 % of donors paying for gas against the about 85 % of homes DESNZ counts gas meters for (the derivation it replaced gave gas to 98 %), so without the connect leg nine of the eleven Great Britain regions fell short of their share, and after the four-margin NEED rake one factor per fuel scales the kWh so the prior-weighted frame total equals the fuel''s declared level for calendar 2024: for gas the DESNZ Energy Trends domestic consumption at actual temperature summed over the four quarters, and for electricity, the one fuel in spend_level_fuels (microcosm#1418), the kWh the ONS Consumer Trends 04.5.1 household spending buys at QEP''s United Kingdom average prices once the standing charges of every UK domestic meter DESNZ counts come off (gas stays on Energy Trends while ONS 04.5.2 counts bottled gas, microcosm#1095); NEED gas means are per gas-metered household, so the gas kWh margins are raked over connected households only while electricity is raked over every household, and the energy_rake gate recomputes every NEED mean, the DESNZ level and the connection shares from the vendored rows. After the level, no household is left above the domestic meter definitions behind the DESNZ total (NEED Annex B: gas meters under 73,200 kWh a year, electricity meters under 50,000 kWh on profile classes 1 and 2; María''s ruling of 2026-10-12 on microcosm#1207''s extreme energy values): the declared household_kwh_ceiling caps a household there, the households below it in the capped households'' own NEED cells are re-raked to those cells'' levelled means, and a proportional step restores the DESNZ total (microcosm#1164); the receipt counts the households capped and the share of the total they gave up, and the energy_rake gate checks both. Mobile homes have no NEED property-type row, so the rake takes them to the all-dwellings mean, the incumbent''s translation; where every mobile home of a NEED geography draws a spend at or below the standing charge, that cell has no kWh for the rake to scale, and the declared zero_kwh_cells_at_need_mean starts it at its NEED mean before the first sweep (microcosm#1240). The receipt lists the cells it started, and the energy_rake gate fails on a started cell the stage does not declare and on any other cell with a zero mean. Both rakes band households on gross income, NEED''s concept: the donor on LCFS p344p, cash income before tax, National Insurance, council tax and pension contributions, and the recipient on the same concept, its HBAI net income with the deductions policyengine-uk takes to reach it added back (council tax and domestic rates, income tax, National Insurance, student loan repayments, employee and personal pension contributions, maintenance and child payments, LVT), which the stage materializes for that band alone (microcosm#1164). Before it the recipient fell back to its HBAI net income, which put households in too low a band; the engine''s household_gross_income would put them in too high a one, since it adds capital gains and the in-kind NHS, education and transport spending to cash income. The disconnection walk''s seed-0 uniform order makes every group of households (dwelling type, income band, support channel) lose the same expected share of its drawn connected mass, so only the level of the drawn connection moves; the smallest-drawn-gas-first order it replaces piled the disconnections onto low-draw flats once the SPI support households drew gas from their own incomes, and NEED''s Scottish property-type means then implied a level 2.6 % above the Scottish all-dwellings mean, a margin conflict the rake could not close. Bus fares are priced from journeys (microcosm#930), where the nts_bus_travel stage imputes each person''s annual bus-in-London and other-local-bus trips and their concessionary eligibility, and the declared price_bus_journeys step sets bus_fare_spending as the sum over the household''s non-eligible persons of trips times boardings per resident trip (the published BUS01 journeys over the published NTS0705a trips per resident times the ONS population) times the yield per fare-paying boarding (BUS05ai receipts over journeys less concessionary journeys; in England outside London only the older and disabled ones of BUS01c, as policyengine-uk prices it from 2.158.3), per area; bus-in-London trips take the London area''s price for every resident, other-local-bus trips the price of the residence area (England outside London; Scotland and Northern Ireland from their own receipts and journeys with England''s trip rate as the declared proxy); Wales is unpriced and keeps the raw draw. The chain still draws bus_fare_spending so later targets condition on the same raw draw; the emitted column is the priced value. The receipt records every factor, the frame-implied boardings beside the published ones and the frame''s eligible trip share beside the publisher''s concessionary boarding share, so the prior-weight fit of the bound receipts targets is read as a composition check, never a level the stage set; the #890 incidence draw and fare rake are retired. The 2024-25 diary (UKDS SN 9603, 2nd edition, whose household tab carries the annual weight as cal_weight_annual, the name weighta had; microcosm#1164) is moved to the base year by the declared uprate_donor_columns step (microcosm#890). Consumption columns and bus fares take the engine''s CPI index from the April-to-March diary year, placed on the calendar-year index at three quarters of 2024 and one of 2025, back a quarter to calendar 2024 (microcosm#1113; the diary sits a quarter past it, so the factor is below one; the fare factor survives only where no fare cell levels the column, i.e. Wales). Income predictors take a factor of one: the diary year is the FRS 2024-25 year they are matched against. Petrol and diesel take the DESNZ pump-price times HMRC litres per head outturn from the vendored road_fuel_anchors.json, which sets only their donor distribution because the level step follows; the energy columns are exempt because the NEED 2024 shape at the DESNZ level and the QEP average prices paid set their level. The household adult and child counts (LCFS G018 and G019, the survey''s age-18 split) predict on both sides; the recipient counts its members by age, not through the engine''s is_adult and is_child flags, which policyengine-uk#1896 deprecates (uk-data#486, microcosm#1095). Road fuel incidence and level are set by two declared steps (microcosm#1113). The two-week diary leaves about a third of car-owning donors with no fuel purchase, which the chain reproduces among the households the fuel flag marks as fuel buyers, so the redraw_zero_road_fuel step redraws a flagged household that drew zero from the donor''s distribution among households with positive road fuel, on the chain''s predictors: a weighted regime-gated QRF draws the total, positive by construction, then the petrol share of it, at quantiles keyed on the household id; positive draws are kept. Then the level_road_fuel step, after the fuel flag has zeroed the households without a fuel car, scales petrol and diesel so their prior-weighted total equals ONS Consumer Trends household spending on COICOP 07.2.2 for calendar 2024 (the year of the DESNZ pump prices the donor uprating uses) less the donor''s own other-fuels share of 07.2.2 (c72213). Since microcosm#1095 B3 (K) each fuel is levelled to that total times its share of household-paid spend, so the total stays and each household''s spend within a fuel keeps its relative size, but the diary''s petrol/diesel mix gives way to the household one: HMRC''s FY2024-25 litres of the fuel times DESNZ''s cars share of its road use (the litres audit''s benchmark), times the NTS household-paid share of car miles, at the 2024 pump prices. A kept car''s private and commuting miles are household-paid, its business miles and every company-car mile are not, and England stands for the UK. The diary''s 07.2.2 has three lines (c72211 petrol, c72212 diesel and c72213, the other motor fuels and lubricants) and none for vehicle electricity. The LCFS diary records about a quarter less road fuel than ONS, and binding the OBR cars receipts had closed that gap by moving weight onto fuel-buying households; petrol and diesel therefore carry no committed support bound, like the other levelled columns. The totals that contain levelled columns are written back around them by the declared recompose_from_remainder step (microcosm#1113): each keeps its own chain draw less the chain''s draws of the parts the stage re-levels, kept before any step touches them and floored at zero where the parts outgrow the total, and adds the levelled parts back, so housing_water_and_electricity_consumption is its draw less the drawn electricity and gas plus the levelled electricity and gas, and transport_consumption its draw less the drawn petrol, diesel and bus fares plus the levelled petrol and diesel and the priced bus fares. The chain draws each part after, and conditional on, its total, so the remainder is the chain''s own split; a remainder drawn as a chain target of its own over-drew the vehicle-purchase tail of transport, 10 to 13 percent above the donor in-sample. The chain''s domestic-energy target is the electricity and gas the stage derives from the diary''s fuel, light and power (p537) by its labelled parts, from the LCF User Guide''s derived-variable labels and P537 definition (microcosm#1164): each fuel''s last account payment less its rebate (b489 electricity, b490 gas, read as the tab carries them; the stage refuses a donor where b489 equals b175 less b178, or b490 equals b170 less b173, to the penny for under 95 percent of that fuel''s account payers, which pins the labels and the rebate''s sign), its prepayment key or meter payment (b1751, b1701), its component of a combined utilities bill (b227 electricity, b226 gas) and of a combined key or meter payment (b2332, b2331), and the diary''s second-dwelling account and slot-meter lines (c45112 and c45114, c45212 and c45214); what a combined payment leaves unsplit (the combined bill b231 less its rebate b174, and the combined key or meter payment b233, each less its parts) goes by the household''s own electricity share where it pays for both fuels, and otherwise by the donor''s mean share of the households that do, since a combined payment means the household pays for both; a donor with no such household fails. The diary''s other fuels (central-heating oil b017 and c45312, bottled gas b018 and c45222, coal and coke c45411, wood and peat c45412, hot water, steam and ice c45511) are neither, and the donor_energy_split receipt records the split against p537: what reading refunds as zero adds, what the unclipped parts differ from p537 by, the weighted share of donors whose unclipped parts differ from their p537, and the account identity shares. The derivation it replaces read b226 as electricity by direct debit and b489 and b490 as prepayment payments, where the labels make them the gas component of a combined bill and the electricity and gas account payments less rebates. The liquid fuels (central-heating oil and paraffin with bottled gas, LPG with liquid) and the solid fuels (coal, coke, wood and peat) are drawn as liquid_fuel_consumption and solid_fuel_consumption, the inputs policyengine-uk 2.149.0 reads (pe-uk#2572; María''s ruling of 2026-10-22), after the eighteen spend targets so that every earlier draw is the chain''s own, uprated to calendar-2024 prices as every diary spend column is; the housing total nets their draws and adds them back unchanged, so it always holds them, and hot water, steam and ice stays in its remainder. The receipt records the published ONS 04.5.3 and 04.5.4 spend beside each fuel''s donor total at diary prices and the frame''s draw (published_fuels). Before the hold, each COICOP division''s drawn spend per household (a recomposed total''s remainder, any other division''s whole draw) is set against the donor''s mean of the same spend (for housing and transport, the donor''s total less the same parts, since the levelled parts keep their published levels and are no over-draw); a division above the divisions'' shared ratio, measured once before any levelling, comes down to it (María''s rulings of 2026-10-23 and 2026-10-24, microcosm#1278; Vahid''s review of microcosm#1383, item 9); the receipt records each division''s ratio and factor and the shared ratio (division_levelling) and each recomposed total''s levelling_factor. Each total is then held to the donor''s realised maximum of that total (maximum_total: donor_support, the support every drawn column is clipped to; microcosm#1164), never below its parts, the excess coming out of its remainder: a remainder near the top of the diary''s range plus levelled parts larger than the drawn ones would otherwise leave it. The two totals keep their committed support bounds, which the terminal support gate applies to the emitted frame; the recomposed_totals gate checks the declaration and the receipt, whose rows held at the maximum and weighted mass taken enter its identities. Every household spend column is at calendar-2024 prices as households paid them, the H5''s year that policyengine-uk projects from and the calibration uprates to the calendar-2025 window (microcosm#1113): the diary columns by the CPI uprating to 2024, road fuel at ONS 07.2.2 for 2024, energy at DESNZ volume and QEP prices for 2024, and bus fares at each area''s fiscal-year yield re-priced to 2024 by its fares index (the DfT local bus fares index by quarter for London and England outside London, Scotland''s calendar-year index; Northern Ireland, which publishes no fares index, from its own yields of the two fiscal years 2024 overlaps, weighted three months and nine (microcosm#1207), in place of England''s index, which carries the January 2025 rise in the English fare cap Northern Ireland did not have); the consumption_basis gate holds every level-setting step to that year. policyengine-uk applies the fiscal 2024-25 rules to model year 2024 (it samples each parameter at 30 April), so every levelled column sits about a quarter before the midpoint of the policy year it is taxed in; the calibration binds calendar-year facts as published and fiscal-year facts at the calendar window (María''s rule of 2026-09-22). The stage receipt also reports, for each of the twelve COICOP divisions, the prior-weighted frame total against ONS Consumer Trends for the same calendar year less the classes a household diary does not record (02.3 narcotics, 04.2 owner-occupiers'' imputed rent and 12.6.1 FISIM), on ONS''s domestic concept, and the twelve together against the national concept as well; it is report-only (microcosm#1113). The report-only litres audit compares each fuel''s frame litres with HMRC''s clearances of that fuel scaled by the cars share of its road use, from the vendored DESNZ sub-national road transport fuel consumption by vehicle type and fuel (PolicyEngine/chronicle#322); the OBR cars share of fuel duty receipts, uniform across fuels, stays beside the total. The liquid fuels hold bottled gas (b018, c45222), which COICOP puts under 04.5.2 (gas) and ONS''s 04.5.3 leaves out, so the receipt also gives the donor''s liquid fuels without it; neither heating-fuel column is levelled to ONS: the donor''s diary totals are about twice ONS''s, and the frame''s draws reach neither those nor ONS''s, so a costing on either needs levelling to ONS first (Vahid''s review of microcosm#1383, item 8). After its spend targets and the two fuels the chain draws five shares the derive step computes on the donor from the diary lines (microcosm#1359): tobacco''s share of the off-trade alcohol and tobacco that make up P602 (c22111, c22121 and c22131 over those three and the seven lines of alcohol brought home, c21111 to c21311; P602 also sums narcotics, c23111, which the end-user tab does not carry), on-trade alcohol''s share of restaurants and hotels (the eight lines of drinks away from home, cb111c to cb111j, over P611, clipped at one because the tab stores P611 to one decimal place), gambling stakes'' share of recreation (the seven games-of-chance stake lines P609 sums, c94311 to c94316 and c94319: pools, bingo, lotteries, bookmaker and tote betting with gaming machines, and the National Lottery; the winnings lines beside them sit in no total), the National Lottery''s share of those stakes (scratchcards and draws, c94316 and c94319, over the seven) and the betting and gaming share of the rest (football pools, bingo, and bookmaker and tote betting with gaming machines, c94311, c94312 and c94314, over the other five; society lotteries, c94313, and the Irish Lottery, c94315, pay no UK gambling duty). A household''s tobacco, off-trade alcohol, on-trade alcohol and gambling stakes are its shares of the totals it carries, and its National Lottery and betting and gaming stakes its shares of its stakes, so the parts sum to the totals and no total, the VAT base included, moves; appended after the twenty targets, the shares move none of their draws. The shares and the spending they give are scratch, on no table; the report-only excise_shares receipt records each share on the frame beside the donor. The declared level_excise_quantities step turns that spending into policyengine-uk''s excise inputs (microcosm#1359), so alcohol, tobacco and gambling duty stop scoring zero. Each national quantity is a published FY2024-25 figure from the vendored excise_facts.json, and the step gives each household its part in proportion to the spending that buys it, at prior weights (one factor per input, the level_road_fuel scaling), so the frame''s weighted total of each input is the published one; a household that buys one product of a kind buys all of that kind in the national mix. Alcohol: each product''s litres are HMRC''s clearances of beer, cider, wine, spirits and other fermented products (the Alcohol Bulletin, in litres of pure alcohol) over the engine''s own strength for the product, which policyengine-uk multiplies back, shared by off- and on-trade alcohol spending together; beer and cider take their draught shares from the clearances under draught relief, alone or with small producer relief, over all of their clearances, and the other products, whose draught clearances HMRC does not publish, keep the engine''s zero, as does sparkling cider, which the bulletin counts within cider. A pound buys the same volume in a pub as in a shop under this rule, which leans the volume, and so the duty, towards on-trade drinkers: against a published on-trade volume share of about 27 percent, a pound spent in a pub is given about 1.6 times the volume it buys and a pound spent in a shop about 0.78 times, and about 11 percent of the volume sits with other households on the 2024-25 diary. No on-trade volume share can be archived (MESAS is a NielsenIQ and Circana dashboard with no fixed file), so the spending rule stands, its lean documented (María''s ruling of 2026-10-23). Tobacco: cigarettes a week and grams a week of hand-rolling tobacco, cigars and other tobacco are HMRC''s clearances (the Tobacco Bulletin) over the engine''s 52 weeks, shared by tobacco spending; heated tobacco sits within other tobacco in the bulletin, so it is charged at the other-tobacco rate and its own input keeps the engine''s zero. Gambling: each input is its duty''s dutiable base, HMRC''s cash receipts for the duty (the Betting and Gaming bulletin) or Machine Games Duty''s declared liabilities for the band, over the engine''s FY2024-25 rate (Gaming Duty over the engine''s effective-rate proxy for it), so the engine charges back the published receipts. General Betting Duty''s base, its receipts over the fixed-odds rate, is split over the land-based fixed-odds, remote horse-racing, remote other, exchange and horse-and-dog pool inputs by the Gambling Commission''s gross gambling yield for Great Britain, remote fixed-odds betting by the horse-racing share of all remote betting yield, since the Commission publishes no betting activity by event; its horse racing is not only UK racing, so the remote UK horse-racing input is overstated and, from April 2027, when the engine charges other remote betting at 25 percent, too much of the base stays at 15 percent and the rise is understated; and its pool betting can hold pools on other events, such as football pools, which pay Pool Betting Duty. Spread betting, which the Commission does not regulate, has no published base and keeps the engine''s zero. Lottery Duty''s base is shared by the National Lottery stakes and every other gambling base by the betting and gaming stakes, since the diary cannot tell remote from land-based play or one betting product from another; the society and Irish lotteries carry none. Both keys are first brought to published participation by the declared top_up_gambling_participation step (microcosm#1359; María''s ruling of 2026-10-25). The diary records a stake for about a fifth of the households the Gambling Commission''s Gambling Survey for Great Britain 2025 implies (PolicyEngine/chronicle#391), and under any steady rate of play a two-week diary sees at least half of the four-week players, so the gap is play the diary misses, not its window. Each adult''s chance of playing in four weeks and in twelve months is GSGB''s published rate for its sex and age band (tables B.1 and B.3), as the union of a key''s activities (table B.9: the National Lottery''s draws, scratchcards and online instant-win games; betting, bingo, casino games, fruit and slots, football pools, other online instant-win games and other gambling), taken as independent within the population that plays any of them (all gamblers, or those who play more than lottery draws). A household plays when any adult does, combined at theta: 1 - (1 - p_max) x prod(1 - p_other)^theta, where 0 is one player per household and 1 adults who play independently. Theta is fitted on the donor so that GSGB''s rates, applied to the donors'' own adults, give the diary''s ratio of the two-adult to the one-adult household rate, in which under-recording cancels if it is the same for both: 0.9 for the National Lottery, whose couples mostly buy their own tickets, and 0.08 for betting and gaming, mostly one adult''s. Within nine strata (one, two, or three or more adults, by the youngest adult''s age band: 18 to 34, 35 to 54, 55 and over), households without a stake are added by the gas connection walk''s weight-fitting rule, in an identity-keyed order drawn in proportion to a regularised donor propensity (on the chain''s predictors and spend draws, with recreation net of its gambling stakes, so that a recorded stake does not predict itself) times the household''s published chance, first to the stratum''s four-week share (regular players) and then on to its twelve-month share (occasional players); households the diary saw keep their stakes and count as regular. An added household''s stake is a draw from the donor''s positive stakes at a quantile keyed on its id, scaled so the added regular players'' mean is the mean of the households the diary saw, and an occasional player''s is a tenth of that. Both are assumptions: a two-week diary is more likely to catch frequent players, so the households it saw are probably the heavier players and equal means spread the base more evenly than play probably is; the tenth stands until GSGB publishes how often people play. The keys only re-share the bases: the stored spending stays the drawn one, so an added household''s stakes are not in its recorded recreation spending. The gambling_participation gate recomputes the rates from the vendored rows, checks every stratum''s shares, and holds each key''s stake scale within 0.5 to 2, so a broken stake draw that the scaling would hide fails it. Known biases: the quantities are levelled to the published figures while spending and the diary''s incidence stay at survey level (María''s ruling of 2026-10-23), so a household''s alcohol or tobacco duty is one multiple of its own spending, the same for every household that carries it: at prior weights alcohol duty is about 0.41 times alcohol spending and tobacco duty about 2.2 times tobacco spending, since the diary records a fraction of what is bought; VAT on the same goods stays on the survey base. Tobacco duty also sits on fewer households than smoke: 8.2 percent of households carry it, against 11.9 percent of UK adults who smoked cigarettes in 2023 (ONS), while the share of households with a smoker is above the adult rate; the duty per carrying household is higher by the same factor. Part of the gap is the frame''s: the chain''s share draws come out zero more often than the donors'' (10.3 percent of donors carry tobacco), mostly within households that carry the parent total. The gambling duties sit on the households the top-up brings to participation: 62.7 percent of households carry Lottery Duty and 29.8 percent the other gambling duties, against 10.7 and 2.0 percent on the diary''s draws alone, and 47 percent of adults in Great Britain who gambled in the past four weeks of 2025 (27 percent once lottery-draw-only players are left out). The top-up''s own biases: GSGB is taken as the level, though the Gambling Commission''s guidance on its statistics reports that an invitation that mentions gambling raised participation estimates, and that its experiment could not conclude which estimates are the more accurate; under-recording is taken as even across households, so the donor propensity carries the diary''s gradient by income, tenure, region and spending; the activity unions take activities as independent within their population, which GSGB''s table B.13 rules out among players (45 percent of four-week gamblers took part in one activity, against 26 percent under independence), but a model in which each adult''s activities share an intensity, which comes within 2.5 points of that share in every age band, moves neither key''s union by more than 9 percent in any age band, nor the share of households carrying either key by more than 0.1 points; theta is one per key, fits households of three or more adults less well, and takes the share carrying betting and gaming from 28.5 percent at 0 to 41.2 percent at 1; the stake assumptions above; and GSGB covers adults in Great Britain in calendar 2025, so Northern Ireland''s adults take its rates, against the FY2024-25 bases. On the real spine at prior weights, the share of households carrying the National Lottery rises from 51.5 percent in the bottom equivalised-income decile to 67.3 percent in the top, and betting and gaming from 26.8 to 34.8 percent, whose top decile holds 25.3 percent of the base; on the diary''s draws alone betting and gaming is almost flat (1.9 to 2.1 percent, 18.9 percent of the base in the top decile). Ordered by the published chance alone, betting and gaming would run from 29.2 to 29.8 percent and the Lottery from 57.0 to 67.9 percent with GSGB''s age mix, but neither key''s regional pattern would follow GSGB''s. With the propensity, the Lottery''s does (a correlation of 0.67 across Great Britain''s eleven regions, London lowest, as in GSGB), and betting and gaming''s barely (0.11). Other tobacco (c22131) includes e-cigarette refills, so the tobacco inputs also follow vaping spending and a household that only vapes carries tobacco duty; Vaping Products Duty, from 1 October 2026, needs a key of its own. The draught shares are national constants, so a household that buys alcohol only in shops takes the same draught relief as one that drinks in pubs. The quantities are FY2024-25''s, the excise year policyengine-uk charges in model year 2024 (its excise year runs from 6 April), and the engine holds them flat after it (PolicyEngine/policyengine-uk#2596). The step moves no spending column; the excise_quantities gate recomputes every level from the vendored rows. Since microcosm#1095 B3 the declared assign_car_attributes_from_nts step writes policyengine-uk''s vehicle excise duty inputs, which no stage wrote, so every household''s duty was zero: a household''s vehicles less its members'' company cars (an employer pays their duty) go one to each other adult, oldest first, a car beyond the adults left out (policyengine-uk holds one car a person); a household the fuel flag leaves without road fuel keeps zero-emission cars only, and one that buys fuel holds a petrol, diesel or other car first and further cars at its own per-car zero-emission share; each car is a kept NTS car of its class in the household''s income fifth, drawn at its interview weight scaled to its fifth and age band''s kept cars (fewer of the newest and oldest cars carry the registration record its CO2 bands come from), giving car_fuel_type (a diesel registered from 2021 meets RDE2), car_co2_emissions (its band''s midpoint on the scale its duty regime reads), car_engine_size (none for a zero-emission car), car_first_registration_date (the reference date of 1 October 2025 less its age, drawn uniformly within its NTS band, so each car keeps its age; the open band of over 18 years closes at 25) and car_is_ved_exempt (DLA''s higher-rate or PIP''s enhanced mobility component exempts the member''s own car, or the oldest car-holder''s in their benefit unit). The list price keeps the engine''s default, so no car pays the expensive-car supplement. Vehicle excise duty is measured, never bound: no target carries it.' + notes: 'Ports the incumbent LCFS consumption QRF, including NEED energy raking, with adjudicated weighted fits and an identity-keyed seed-0 fuel flag. The chain''s sign gates are cross-fitted (gate_calibration: cross_fitted): each is the mean of five gates, each fitted on four of five folds of the donors stratified by sign, mapped by one weighted Platt calibration fitted on the folds they left out, so a rare spending is drawn at its donor rate on households the gates were not fitted to. A gate fitted and calibrated on the same donors memorises a rare spending''s donors and draws it too rarely everywhere else: on held-out donors it drew solid fuels about a tenth as often as they occur and education under half as often. The vehicle count is a numeric QRF predictor on both sides (LCFS a124 on the donor, the was_wealth draw of WAS vcarnr8 on the recipient, both clipped to 0-5), which retires the incumbent''s WAS-to-LCFS has-fuel bridge (microcosm#890 A). The recipient fuel flag draws each of a household''s vehicles as zero-emission at the battery-electric and fuel-cell share of the vendored DfT VEH1103 licensed-car stock (2024, Great Britain; plug-in hybrids count as fuel buyers), replacing the hand-copied NTS share (microcosm#890 E2): a household with vehicles buys fuel unless every one of them is zero-emission, so it is flagged at one minus that share raised to its vehicle count, and a one-vehicle household keeps the draw it had when the whole household was drawn at once (microcosm#1278; before, a household with several vehicles was all one or the other). The frame holds no fuel type, so the draw, keyed on the household identity, is what makes a vehicle-owning household a fuel buyer. Since microcosm#1095 B3 (J2) the per-car zero-emission share follows the household''s income fifth: the national share times the fifth''s relative risk among the cars NTS households keep (UK Data Service SN 5340, survey years 2022-2024, at the interview weight W3; zero-emission in the DVLA-linked 0 g/km CO2 band, the about three in ten cars without a linked band left out, as missing at random within their fifth), normalised over the frame''s cars so the national share is the licensed-car one. The NTS ranks England''s households by total gross income, McClements-equivalised, so the frame ranks household_gross_income over the engine''s before-housing-costs equivalence scale, in household-weighted fifths; a fifth on fewer than 10 zero-emission NTS cars would pool with its neighbour (a statistical floor, not the disclosure floor of 3). The uniforms are the same, so only the threshold moves. With the redraw of microcosm#1113 every flagged household buys fuel, so this flag alone sets fuel incidence; within an income fifth, who holds the zero-emission cars stays random. The household input uses_energy_prepayment_meter, which policyengine-uk reads for the July 2023 to March 2024 Energy Price Guarantee prepayment discount (PolicyEngine/policyengine-uk#2098, from 2.123.3), is drawn by the declared impute_prepayment_meter step (microcosm#1110): the donor prepays when it last put money on an electricity, gas or combined key or meter (b1751, b1701, b233, which the LCF asks only of prepayment-meter households) or its diary records a slot-meter payment (c45114, c45214), so electricity-only prepayment counts and a household with no meter payment, including one that did not answer, does not; a weighted regime-gated QRF on the chain''s predictors fits that flag and each recipient draws it at uniforms keyed on its household id, which moves no other draw. The release exports it: policyengine-uk reads it from 2.123.3 and an older engine, Microcosm''s locked one among them, ignores a column it does not know; the incumbent does not carry it until uk-data#539, so it is a reviewed extra column of the export surface. The frame flags about 3.0 million Great Britain households (10.5 %) at prior weights, against the around three million prepayment households the government counted when the discount began in July 2023 (a different reference period, households in both). Energy support clipping is exempt because NEED raking governs those columns. Bus fares are clipped to donor support before the pricing step (María''s rulings 2026-09-15 and 2026-09-17), which bounds the region no area prices (Wales keeps the chain''s raw draw) while the priced regions move beyond donor support afterwards; for that reason the column carries no committed support bound for the terminal gate. Domestic energy is raked in kWh to the NEED 2024 shape at the DESNZ level and priced at the average prices paid (microcosm#890 F, chronicle#270), where both NEED rakes take their mean-kWh margins from the vendored NEED 2024 tables (England and Wales by income band, tenure, property type and region; Scotland by income band, tenure and property type with the all-dwellings mean as its region margin; Northern Ireland untouched), the declared price_domestic_energy step converts spend to kWh and back at each household''s QEP price region through the committed crosswalk using the calendar-2024 average variable unit cost and fixed cost across payment methods, standard metering, including VAT (Northern Ireland gas at the UK average because QEP publishes no Northern Ireland gas row), a gas fixed cost only for connected households, the gas connection imposed on the recipient frame at the published share of each region (DESNZ subnational gas meters over electricity meters, 2024) by disconnecting gas-positive households in an identity-keyed uniform order, skipping a household whose weight would overshoot the published share (Northern Ireland has no subnational row and keeps the positive-gas rule), and, where the draw leaves a region below its share, by the declared connect_rule (microcosm#1164): two weighted fits on the chain''s predictors give each zero-gas household the probability that a donor like it pays for gas (a gradient-boosted classifier of the donor''s gas payers) and the gas such a donor pays (a regime-gated QRF of the payers'' gas spend, at quantiles keyed on the household id), and the region''s zero-gas households are connected in an identity-keyed order drawn in proportion to that probability, by the same weight-fitting walk, until the share is met. The labelled energy split leaves about 80 % of donors paying for gas against the about 85 % of homes DESNZ counts gas meters for (the derivation it replaced gave gas to 98 %), so without the connect leg nine of the eleven Great Britain regions fell short of their share, and after the four-margin NEED rake one factor per fuel scales the kWh so the prior-weighted frame total equals the fuel''s declared level for calendar 2024: for gas the DESNZ Energy Trends domestic consumption at actual temperature summed over the four quarters, and for electricity, the one fuel in spend_level_fuels (microcosm#1418), the kWh the ONS Consumer Trends 04.5.1 household spending buys at QEP''s United Kingdom average prices once the standing charges of every UK domestic meter DESNZ counts come off (gas stays on Energy Trends while ONS 04.5.2 counts bottled gas, microcosm#1095); NEED gas means are per gas-metered household, so the gas kWh margins are raked over connected households only while electricity is raked over every household, and the energy_rake gate recomputes every NEED mean, the DESNZ level and the connection shares from the vendored rows. After the level, no household is left above the domestic meter definitions behind the DESNZ total (NEED Annex B: gas meters under 73,200 kWh a year, electricity meters under 50,000 kWh on profile classes 1 and 2; María''s ruling of 2026-10-12 on microcosm#1207''s extreme energy values): the declared household_kwh_ceiling caps a household there, the households below it in the capped households'' own NEED cells are re-raked to those cells'' levelled means, and a proportional step restores the DESNZ total (microcosm#1164); the receipt counts the households capped and the share of the total they gave up, and the energy_rake gate checks both. Mobile homes have no NEED property-type row, so the rake takes them to the all-dwellings mean, the incumbent''s translation; where every mobile home of a NEED geography draws a spend at or below the standing charge, that cell has no kWh for the rake to scale, and the declared zero_kwh_cells_at_need_mean starts it at its NEED mean before the first sweep (microcosm#1240). The receipt lists the cells it started, and the energy_rake gate fails on a started cell the stage does not declare and on any other cell with a zero mean. Both rakes band households on gross income, NEED''s concept: the donor on LCFS p344p, cash income before tax, National Insurance, council tax and pension contributions, and the recipient on the same concept, its HBAI net income with the deductions policyengine-uk takes to reach it added back (council tax and domestic rates, income tax, National Insurance, student loan repayments, employee and personal pension contributions, maintenance and child payments, LVT), which the stage materializes for that band alone (microcosm#1164). Before it the recipient fell back to its HBAI net income, which put households in too low a band; the engine''s household_gross_income would put them in too high a one, since it adds capital gains and the in-kind NHS, education and transport spending to cash income. The disconnection walk''s seed-0 uniform order makes every group of households (dwelling type, income band, support channel) lose the same expected share of its drawn connected mass, so only the level of the drawn connection moves; the smallest-drawn-gas-first order it replaces piled the disconnections onto low-draw flats once the SPI support households drew gas from their own incomes, and NEED''s Scottish property-type means then implied a level 2.6 % above the Scottish all-dwellings mean, a margin conflict the rake could not close. Bus fares are priced from journeys (microcosm#930), where the nts_bus_travel stage imputes each person''s annual bus-in-London and other-local-bus trips and their concessionary eligibility, and the declared price_bus_journeys step sets bus_fare_spending as the sum over the household''s non-eligible persons of trips times boardings per resident trip (the published BUS01 journeys over the published NTS0705a trips per resident times the ONS population) times the yield per fare-paying boarding (BUS05ai receipts over journeys less concessionary journeys; in England outside London only the older and disabled ones of BUS01c, as policyengine-uk prices it from 2.158.3), per area; bus-in-London trips take the London area''s price for every resident, other-local-bus trips the price of the residence area (England outside London; Scotland and Northern Ireland from their own receipts and journeys with England''s trip rate as the declared proxy); Wales is unpriced and keeps the raw draw. The chain still draws bus_fare_spending so later targets condition on the same raw draw; the emitted column is the priced value. The receipt records every factor, the frame-implied boardings beside the published ones and the frame''s eligible trip share beside the publisher''s concessionary boarding share, so the prior-weight fit of the bound receipts targets is read as a composition check, never a level the stage set; the #890 incidence draw and fare rake are retired. The 2024-25 diary (UKDS SN 9603, 2nd edition, whose household tab carries the annual weight as cal_weight_annual, the name weighta had; microcosm#1164) is moved to the base year by the declared uprate_donor_columns step (microcosm#890). Consumption columns and bus fares take the engine''s CPI index from the April-to-March diary year, placed on the calendar-year index at three quarters of 2024 and one of 2025, back a quarter to calendar 2024 (microcosm#1113; the diary sits a quarter past it, so the factor is below one; the fare factor survives only where no fare cell levels the column, i.e. Wales). Income predictors take a factor of one: the diary year is the FRS 2024-25 year they are matched against. Petrol and diesel take the DESNZ pump-price times HMRC litres per head outturn from the vendored road_fuel_anchors.json, which sets only their donor distribution because the level step follows; the energy columns are exempt because the NEED 2024 shape at the DESNZ level and the QEP average prices paid set their level. The household adult and child counts (LCFS G018 and G019, the survey''s age-18 split) predict on both sides; the recipient counts its members by age, not through the engine''s is_adult and is_child flags, which policyengine-uk#1896 deprecates (uk-data#486, microcosm#1095). Road fuel incidence and level are set by two declared steps (microcosm#1113). The two-week diary leaves about a third of car-owning donors with no fuel purchase, which the chain reproduces among the households the fuel flag marks as fuel buyers, so the redraw_zero_road_fuel step redraws a flagged household that drew zero from the donor''s distribution among households with positive road fuel, on the chain''s predictors: a weighted regime-gated QRF draws the total, positive by construction, then the petrol share of it, at quantiles keyed on the household id; positive draws are kept. Then the level_road_fuel step, after the fuel flag has zeroed the households without a fuel car, scales petrol and diesel so their prior-weighted total equals ONS Consumer Trends household spending on COICOP 07.2.2 for calendar 2024 (the year of the DESNZ pump prices the donor uprating uses) less the donor''s own other-fuels share of 07.2.2 (c72213). Since microcosm#1095 B3 (K) each fuel is levelled to that total times its share of household-paid spend, so the total stays and each household''s spend within a fuel keeps its relative size, but the diary''s petrol/diesel mix gives way to the household one: HMRC''s FY2024-25 litres of the fuel times DESNZ''s cars share of its road use (the litres audit''s benchmark), times the NTS household-paid share of car miles, at the 2024 pump prices. A kept car''s private and commuting miles are household-paid, its business miles and every company-car mile are not, and England stands for the UK. The diary''s 07.2.2 has three lines (c72211 petrol, c72212 diesel and c72213, the other motor fuels and lubricants) and none for vehicle electricity. The LCFS diary records about a quarter less road fuel than ONS, and binding the OBR cars receipts had closed that gap by moving weight onto fuel-buying households; petrol and diesel therefore carry no committed support bound, like the other levelled columns. The totals that contain levelled columns are written back around them by the declared recompose_from_remainder step (microcosm#1113): each keeps its own chain draw less the chain''s draws of the parts the stage re-levels, kept before any step touches them and floored at zero where the parts outgrow the total, and adds the levelled parts back, so housing_water_and_electricity_consumption is its draw less the drawn electricity and gas plus the levelled electricity and gas, and transport_consumption its draw less the drawn petrol, diesel and bus fares plus the levelled petrol and diesel and the priced bus fares. The chain draws each part after, and conditional on, its total, so the remainder is the chain''s own split; a remainder drawn as a chain target of its own over-drew the vehicle-purchase tail of transport, 10 to 13 percent above the donor in-sample. The chain''s domestic-energy target is the electricity and gas the stage derives from the diary''s fuel, light and power (p537) by its labelled parts, from the LCF User Guide''s derived-variable labels and P537 definition (microcosm#1164): each fuel''s last account payment less its rebate (b489 electricity, b490 gas, read as the tab carries them; the stage refuses a donor where b489 equals b175 less b178, or b490 equals b170 less b173, to the penny for under 95 percent of that fuel''s account payers, which pins the labels and the rebate''s sign), its prepayment key or meter payment (b1751, b1701), its component of a combined utilities bill (b227 electricity, b226 gas) and of a combined key or meter payment (b2332, b2331), and the diary''s second-dwelling account and slot-meter lines (c45112 and c45114, c45212 and c45214); what a combined payment leaves unsplit (the combined bill b231 less its rebate b174, and the combined key or meter payment b233, each less its parts) goes by the household''s own electricity share where it pays for both fuels, and otherwise by the donor''s mean share of the households that do, since a combined payment means the household pays for both; a donor with no such household fails. The diary''s other fuels (central-heating oil b017 and c45312, bottled gas b018 and c45222, coal and coke c45411, wood and peat c45412, hot water, steam and ice c45511) are neither, and the donor_energy_split receipt records the split against p537: what reading refunds as zero adds, what the unclipped parts differ from p537 by, the weighted share of donors whose unclipped parts differ from their p537, and the account identity shares. The derivation it replaces read b226 as electricity by direct debit and b489 and b490 as prepayment payments, where the labels make them the gas component of a combined bill and the electricity and gas account payments less rebates. The liquid fuels (central-heating oil and paraffin with bottled gas, LPG with liquid) and the solid fuels (coal, coke, wood and peat) are drawn as liquid_fuel_consumption and solid_fuel_consumption, the inputs policyengine-uk 2.149.0 reads (pe-uk#2572; María''s ruling of 2026-10-22), after the eighteen spend targets so that every earlier draw is the chain''s own, uprated to calendar-2024 prices as every diary spend column is; the housing total nets their draws and adds them back unchanged, so it always holds them, and hot water, steam and ice stays in its remainder. The receipt records the published ONS 04.5.3 and 04.5.4 spend beside each fuel''s donor total at diary prices and the frame''s draw (published_fuels). Before the hold, each COICOP division''s drawn spend per household (a recomposed total''s remainder, any other division''s whole draw) is set against the donor''s mean of the same spend (for housing and transport, the donor''s total less the same parts, since the levelled parts keep their published levels and are no over-draw); a division above the divisions'' shared ratio, measured once before any levelling, comes down to it (María''s rulings of 2026-10-23 and 2026-10-24, microcosm#1278; Vahid''s review of microcosm#1383, item 9); the receipt records each division''s ratio and factor and the shared ratio (division_levelling) and each recomposed total''s levelling_factor. Each total is then held to the donor''s realised maximum of that total (maximum_total: donor_support, the support every drawn column is clipped to; microcosm#1164), never below its parts, the excess coming out of its remainder: a remainder near the top of the diary''s range plus levelled parts larger than the drawn ones would otherwise leave it. The two totals keep their committed support bounds, which the terminal support gate applies to the emitted frame; the recomposed_totals gate checks the declaration and the receipt, whose rows held at the maximum and weighted mass taken enter its identities. Every household spend column is at calendar-2024 prices as households paid them, the H5''s year that policyengine-uk projects from and the calibration uprates to the calendar-2025 window (microcosm#1113): the diary columns by the CPI uprating to 2024, road fuel at ONS 07.2.2 for 2024, energy at DESNZ volume and QEP prices for 2024, and bus fares at each area''s fiscal-year yield re-priced to 2024 by its fares index (the DfT local bus fares index by quarter for London and England outside London, Scotland''s calendar-year index; Northern Ireland, which publishes no fares index, from its own yields of the two fiscal years 2024 overlaps, weighted three months and nine (microcosm#1207), in place of England''s index, which carries the January 2025 rise in the English fare cap Northern Ireland did not have); the consumption_basis gate holds every level-setting step to that year. policyengine-uk applies the fiscal 2024-25 rules to model year 2024 (it samples each parameter at 30 April), so every levelled column sits about a quarter before the midpoint of the policy year it is taxed in; the calibration binds calendar-year facts as published and fiscal-year facts at the calendar window (María''s rule of 2026-09-22). The stage receipt also reports, for each of the twelve COICOP divisions, the prior-weighted frame total against ONS Consumer Trends for the same calendar year less the classes a household diary does not record (02.3 narcotics, 04.2 owner-occupiers'' imputed rent and 12.6.1 FISIM), on ONS''s domestic concept, and the twelve together against the national concept as well; it is report-only (microcosm#1113). The report-only litres audit compares each fuel''s frame litres with HMRC''s clearances of that fuel scaled by the cars share of its road use, from the vendored DESNZ sub-national road transport fuel consumption by vehicle type and fuel (PolicyEngine/chronicle#322); the OBR cars share of fuel duty receipts, uniform across fuels, stays beside the total. The liquid fuels hold bottled gas (b018, c45222), which COICOP puts under 04.5.2 (gas) and ONS''s 04.5.3 leaves out, so the receipt also gives the donor''s liquid fuels without it; neither heating-fuel column is levelled to ONS: the donor''s diary totals are about twice ONS''s, and the frame''s draws reach neither those nor ONS''s, so a costing on either needs levelling to ONS first (Vahid''s review of microcosm#1383, item 8). After its spend targets and the two fuels the chain draws five shares the derive step computes on the donor from the diary lines (microcosm#1359): tobacco''s share of the off-trade alcohol and tobacco that make up P602 (c22111, c22121 and c22131 over those three and the seven lines of alcohol brought home, c21111 to c21311; P602 also sums narcotics, c23111, which the end-user tab does not carry), on-trade alcohol''s share of restaurants and hotels (the eight lines of drinks away from home, cb111c to cb111j, over P611, clipped at one because the tab stores P611 to one decimal place), gambling stakes'' share of recreation (the seven games-of-chance stake lines P609 sums, c94311 to c94316 and c94319: pools, bingo, lotteries, bookmaker and tote betting with gaming machines, and the National Lottery; the winnings lines beside them sit in no total), the National Lottery''s share of those stakes (scratchcards and draws, c94316 and c94319, over the seven) and the betting and gaming share of the rest (football pools, bingo, and bookmaker and tote betting with gaming machines, c94311, c94312 and c94314, over the other five; society lotteries, c94313, and the Irish Lottery, c94315, pay no UK gambling duty). A household''s tobacco, off-trade alcohol, on-trade alcohol and gambling stakes are its shares of the totals it carries, and its National Lottery and betting and gaming stakes its shares of its stakes, so the parts sum to the totals and no total, the VAT base included, moves; appended after the twenty targets, the shares move none of their draws. The shares and the spending they give are scratch, on no table; the report-only excise_shares receipt records each share on the frame beside the donor. The declared level_excise_quantities step turns that spending into policyengine-uk''s excise inputs (microcosm#1359), so alcohol, tobacco and gambling duty stop scoring zero. Each national quantity is a published FY2024-25 figure from the vendored excise_facts.json, and the step gives each household its part in proportion to the spending that buys it, at prior weights (one factor per input, the level_road_fuel scaling), so the frame''s weighted total of each input is the published one; a household that buys one product of a kind buys all of that kind in the national mix. Alcohol: each product''s litres are HMRC''s clearances of beer, cider, wine, spirits and other fermented products (the Alcohol Bulletin, in litres of pure alcohol) over the engine''s own strength for the product, which policyengine-uk multiplies back, shared by off- and on-trade alcohol spending together; beer and cider take their draught shares from the clearances under draught relief, alone or with small producer relief, over all of their clearances, and the other products, whose draught clearances HMRC does not publish, keep the engine''s zero, as does sparkling cider, which the bulletin counts within cider. A pound buys the same volume in a pub as in a shop under this rule, which leans the volume, and so the duty, towards on-trade drinkers: against a published on-trade volume share of about 27 percent, a pound spent in a pub is given about 1.6 times the volume it buys and a pound spent in a shop about 0.78 times, and about 11 percent of the volume sits with other households on the 2024-25 diary. No on-trade volume share can be archived (MESAS is a NielsenIQ and Circana dashboard with no fixed file), so the spending rule stands, its lean documented (María''s ruling of 2026-10-23). Tobacco: cigarettes a week and grams a week of hand-rolling tobacco, cigars and other tobacco are HMRC''s clearances (the Tobacco Bulletin) over the engine''s 52 weeks, shared by tobacco spending; heated tobacco sits within other tobacco in the bulletin, so it is charged at the other-tobacco rate and its own input keeps the engine''s zero. Gambling: each input is its duty''s dutiable base, HMRC''s cash receipts for the duty (the Betting and Gaming bulletin) or Machine Games Duty''s declared liabilities for the band, over the engine''s FY2024-25 rate (Gaming Duty over the engine''s effective-rate proxy for it), so the engine charges back the published receipts. General Betting Duty''s base, its receipts over the fixed-odds rate, is split over the land-based fixed-odds, remote horse-racing, remote other, exchange and horse-and-dog pool inputs by the Gambling Commission''s gross gambling yield for Great Britain, remote fixed-odds betting by the horse-racing share of all remote betting yield, since the Commission publishes no betting activity by event; its horse racing is not only UK racing, so the remote UK horse-racing input is overstated and, from April 2027, when the engine charges other remote betting at 25 percent, too much of the base stays at 15 percent and the rise is understated; and its pool betting can hold pools on other events, such as football pools, which pay Pool Betting Duty. Spread betting, which the Commission does not regulate, has no published base and keeps the engine''s zero. Lottery Duty''s base is shared by the National Lottery stakes and every other gambling base by the betting and gaming stakes, since the diary cannot tell remote from land-based play or one betting product from another; the society and Irish lotteries carry none. Both keys are first brought to published participation by the declared top_up_gambling_participation step (microcosm#1359; María''s ruling of 2026-10-25). The diary records a stake for about a fifth of the households the Gambling Commission''s Gambling Survey for Great Britain 2025 implies (PolicyEngine/chronicle#391), and under any steady rate of play a two-week diary sees at least half of the four-week players, so the gap is play the diary misses, not its window. Each adult''s chance of playing in four weeks and in twelve months is GSGB''s published rate for its sex and age band (tables B.1 and B.3), as the union of a key''s activities (table B.9: the National Lottery''s draws, scratchcards and online instant-win games; betting, bingo, casino games, fruit and slots, football pools, other online instant-win games and other gambling), taken as independent within the population that plays any of them (all gamblers, or those who play more than lottery draws). A household plays when any adult does, combined at theta: 1 - (1 - p_max) x prod(1 - p_other)^theta, where 0 is one player per household and 1 adults who play independently. Theta is fitted on the donor so that GSGB''s rates, applied to the donors'' own adults, give the diary''s ratio of the two-adult to the one-adult household rate, in which under-recording cancels if it is the same for both: 0.9 for the National Lottery, whose couples mostly buy their own tickets, and 0.08 for betting and gaming, mostly one adult''s. Within nine strata (one, two, or three or more adults, by the youngest adult''s age band: 18 to 34, 35 to 54, 55 and over), households without a stake are added by the gas connection walk''s weight-fitting rule, in an identity-keyed order drawn in proportion to a regularised donor propensity (on the chain''s predictors and spend draws, with recreation net of its gambling stakes, so that a recorded stake does not predict itself) times the household''s published chance, first to the stratum''s four-week share (regular players) and then on to its twelve-month share (occasional players); households the diary saw keep their stakes and count as regular. An added household''s stake is a draw from the donor''s positive stakes at a quantile keyed on its id, scaled so the added regular players'' mean is the mean of the households the diary saw, and an occasional player''s is a tenth of that. Both are assumptions: a two-week diary is more likely to catch frequent players, so the households it saw are probably the heavier players and equal means spread the base more evenly than play probably is; the tenth stands until GSGB publishes how often people play. The keys only re-share the bases: the stored spending stays the drawn one, so an added household''s stakes are not in its recorded recreation spending. The gambling_participation gate recomputes the rates from the vendored rows, checks every stratum''s shares, and holds each key''s stake scale within 0.5 to 2, so a broken stake draw that the scaling would hide fails it. Known biases: the quantities are levelled to the published figures while spending and the diary''s incidence stay at survey level (María''s ruling of 2026-10-23), so a household''s alcohol or tobacco duty is one multiple of its own spending, the same for every household that carries it: at prior weights alcohol duty is about 0.44 times alcohol spending and tobacco duty about 1.8 times tobacco spending, since the diary records a fraction of what is bought; VAT on the same goods stays on the survey base. Tobacco duty also sits on fewer households than smoke: 8.2 percent of households carry it, against 11.9 percent of UK adults who smoked cigarettes in 2023 (ONS), while the share of households with a smoker is above the adult rate; the duty per carrying household is higher by the same factor. Part of the gap is the frame''s: the chain''s share draws come out zero more often than the donors'' (10.3 percent of donors carry tobacco), mostly within households that carry the parent total. The gambling duties sit on the households the top-up brings to participation: 62.7 percent of households carry Lottery Duty and 29.8 percent the other gambling duties, against 10.7 and 2.0 percent on the diary''s draws alone, and 47 percent of adults in Great Britain who gambled in the past four weeks of 2025 (27 percent once lottery-draw-only players are left out). The top-up''s own biases: GSGB is taken as the level, though the Gambling Commission''s guidance on its statistics reports that an invitation that mentions gambling raised participation estimates, and that its experiment could not conclude which estimates are the more accurate; under-recording is taken as even across households, so the donor propensity carries the diary''s gradient by income, tenure, region and spending; the activity unions take activities as independent within their population, which GSGB''s table B.13 rules out among players (45 percent of four-week gamblers took part in one activity, against 26 percent under independence), but a model in which each adult''s activities share an intensity, which comes within 2.5 points of that share in every age band, moves neither key''s union by more than 9 percent in any age band, nor the share of households carrying either key by more than 0.1 points; theta is one per key, fits households of three or more adults less well, and takes the share carrying betting and gaming from 28.5 percent at 0 to 41.2 percent at 1; the stake assumptions above; and GSGB covers adults in Great Britain in calendar 2025, so Northern Ireland''s adults take its rates, against the FY2024-25 bases. On the real spine at prior weights, the share of households carrying the National Lottery rises from 51.5 percent in the bottom equivalised-income decile to 67.3 percent in the top, and betting and gaming from 26.8 to 34.8 percent, whose top decile holds 25.3 percent of the base; on the diary''s draws alone betting and gaming is almost flat (1.9 to 2.1 percent, 18.9 percent of the base in the top decile). Ordered by the published chance alone, betting and gaming would run from 29.2 to 29.8 percent and the Lottery from 57.0 to 67.9 percent with GSGB''s age mix, but neither key''s regional pattern would follow GSGB''s. With the propensity, the Lottery''s does (a correlation of 0.67 across Great Britain''s eleven regions, London lowest, as in GSGB), and betting and gaming''s barely (0.11). Other tobacco (c22131) includes e-cigarette refills, so the tobacco inputs also follow vaping spending and a household that only vapes carries tobacco duty; Vaping Products Duty, from 1 October 2026, needs a key of its own. The draught shares are national constants, so a household that buys alcohol only in shops takes the same draught relief as one that drinks in pubs. The quantities are FY2024-25''s, the excise year policyengine-uk charges in model year 2024 (its excise year runs from 6 April), and the engine holds them flat after it (PolicyEngine/policyengine-uk#2596). The step moves no spending column; the excise_quantities gate recomputes every level from the vendored rows. Since microcosm#1095 B3 the declared assign_car_attributes_from_nts step writes policyengine-uk''s vehicle excise duty inputs, which no stage wrote, so every household''s duty was zero: a household''s vehicles less its members'' company cars (an employer pays their duty) go one to each other adult, oldest first, a car beyond the adults left out (policyengine-uk holds one car a person); a household the fuel flag leaves without road fuel keeps zero-emission cars only, and one that buys fuel holds a petrol, diesel or other car first and further cars at its own per-car zero-emission share; each car is a kept NTS car of its class in the household''s income fifth, drawn at its interview weight scaled to its fifth and age band''s kept cars (fewer of the newest and oldest cars carry the registration record its CO2 bands come from), giving car_fuel_type (a diesel registered from 2021 meets RDE2), car_co2_emissions (its band''s midpoint on the scale its duty regime reads), car_engine_size (none for a zero-emission car), car_first_registration_date (the reference date of 1 October 2025 less its age, drawn uniformly within its NTS band, so each car keeps its age; the open band of over 18 years closes at 25) and car_is_ved_exempt (DLA''s higher-rate or PIP''s enhanced mobility component exempts the member''s own car, or the oldest car-holder''s in their benefit unit). The list price keeps the engine''s default, so no car pays the expensive-car supplement. Vehicle excise duty is measured, never bound: no target carries it.' - stage: etb_vat survey: Effects of Taxes and Benefits 1977-2024 source: UK Data Service SN 8856 Effects of Taxes and Benefits household tab and cited VAT anchor resource. @@ -4811,6 +4818,7 @@ stages: weights: explicit seed: 0 n_estimators: 100 + gate_calibration: cross_fitted - kind: support_clip range: donor_realized - kind: price_bus_support @@ -5032,7 +5040,7 @@ stages: - nhs_a_and_e_spending - nhs_admitted_patient_spending - nhs_outpatient_spending - notes: 'Ports ETB public-services QRF at household grain, uprates the FYE-2024 donor to the FRS 2024-25 base year by the declared uprate_donor_columns step (education by the engine''s CPI index, rail support by ORR table 7270''s own FY2024-25 over FY2023-24 outturn, bus support by DfT BUS05bi England net support, a factor the pricing overrides outside Wales and Northern Ireland and which therefore only positions the donor before the QRF), prices bus support from the frame''s journeys (microcosm#930; the #890 rake to the published net support retired on María''s ruling of 2026-09-23): per household, the published concessionary travel reimbursement per concessionary boarding times its eligible persons'' boardings plus the rest of the published net support per boarding times every boarding, boardings being the nts_bus_travel trips times the fare pricing''s boardings per resident trip, for London and England outside London (DfT BUS05bi and BUS01; outside London the concessionary boardings are BUS01c''s older and disabled journeys, the travel the reimbursement pays for, microcosm#1385) and Scotland (Scottish Transport Statistics components and journeys); Wales (no published boardings) and Northern Ireland (the NITHC accounts carry bus and rail jointly) keep the chain''s raw draw, clipped to donor support; the published totals stay bound as calibration targets and now measure the priced quantity, computes rail_usage from the 2024 fare index, and allocates NHS visits/spending to persons using the signed half-open age bands with the donor table''s native 85-89, 90-94 and 95+ top bands (the former 85+ fold-in was retired once age_tail moved ahead of this stage and recipients could populate those bands). The year-max donor filter resolves to 2023 on the pinned tab (the file labels financial year ending 2024 as year 2023), so the services training year coincides with the VAT training year and the fare-index year - the incumbent''s apparent three-way year mismatch is vacuous on this vintage. The recipient is_adult and is_child counts are the household''s FRS claimants and partners and its other members (is_uc_claimant), as the donor''s adults and childs count adults and dependent children, not the engine''s age-18 split (uk-data#486, microcosm#1095).' + notes: 'Ports ETB public-services QRF at household grain, uprates the FYE-2024 donor to the FRS 2024-25 base year by the declared uprate_donor_columns step (education by the engine''s CPI index, rail support by ORR table 7270''s own FY2024-25 over FY2023-24 outturn, bus support by DfT BUS05bi England net support, a factor the pricing overrides outside Wales and Northern Ireland and which therefore only positions the donor before the QRF), prices bus support from the frame''s journeys (microcosm#930; the #890 rake to the published net support retired on María''s ruling of 2026-09-23): per household, the published concessionary travel reimbursement per concessionary boarding times its eligible persons'' boardings plus the rest of the published net support per boarding times every boarding, boardings being the nts_bus_travel trips times the fare pricing''s boardings per resident trip, for London and England outside London (DfT BUS05bi and BUS01; outside London the concessionary boardings are BUS01c''s older and disabled journeys, the travel the reimbursement pays for, microcosm#1385) and Scotland (Scottish Transport Statistics components and journeys); Wales (no published boardings) and Northern Ireland (the NITHC accounts carry bus and rail jointly) keep the chain''s raw draw, clipped to donor support; the published totals stay bound as calibration targets and now measure the priced quantity, computes rail_usage from the 2024 fare index, and allocates NHS visits/spending to persons using the signed half-open age bands with the donor table''s native 85-89, 90-94 and 95+ top bands (the former 85+ fold-in was retired once age_tail moved ahead of this stage and recipients could populate those bands). Its QRF sign gates are cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption''s are: each is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on households the gates were not fitted to. The year-max donor filter resolves to 2023 on the pinned tab (the file labels financial year ending 2024 as year 2023), so the services training year coincides with the VAT training year and the fare-index year - the incumbent''s apparent three-way year mismatch is vacuous on this vintage. The recipient is_adult and is_child counts are the household''s FRS claimants and partners and its other members (is_uc_claimant), as the donor''s adults and childs count adults and dependent children, not the engine''s age-18 split (uk-data#486, microcosm#1095).' - stage: uc_reporter_redraw survey: Family Resources Survey 2024-25 source: Family Resources Survey 2024-25 reported Universal Credit amounts, conditioned on benefit-unit composition and post-SPI incomes with PolicyEngine-UK eligibility inputs. @@ -5083,10 +5091,11 @@ stages: fit: regime_gated_qrf landing: eldest_working_age_adult_lowest_person_id seed: 44 + gate_calibration: cross_fitted outputs: [] rewrites: - universal_credit_reported - notes: Runs after the person-grain SPI income chain and before UC capital coherence. One temporary engine simulation screens both FRS and SPI benefit units to a positive pre-take-up award using FRS-carried capital AND at least one non-child member (uc_maximum_amount pays qualifying-young-person-only units mechanically), and materializes the UC child and state-pension-age flags; engine-known values are consumed only. The consumed is_uc_couple predictor counts two retained FRS claimant/partner roles, independently of legal is_married; older dependent children do not become partners. A benefit-unit RegimeGatedQRF fitted on the screened base domain draws the screened SPI domain (rows); the rewrite domain (rewrite_rows) is the whole SPI channel, so screen-failing SPI units are zeroed. Each positive amount lands on one deterministic adult claimant; base-FRS rows remain byte-unchanged; an empty screened SPI domain refuses. + notes: 'Runs after the person-grain SPI income chain and before UC capital coherence. One temporary engine simulation screens both FRS and SPI benefit units to a positive pre-take-up award using FRS-carried capital AND at least one non-child member (uc_maximum_amount pays qualifying-young-person-only units mechanically), and materializes the UC child and state-pension-age flags; engine-known values are consumed only. The consumed is_uc_couple predictor counts two retained FRS claimant/partner roles, independently of legal is_married; older dependent children do not become partners. A benefit-unit RegimeGatedQRF fitted on the screened base domain draws the screened SPI domain (rows); the rewrite domain (rewrite_rows) is the whole SPI channel, so screen-failing SPI units are zeroed. Its sign gate is cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption''s are: it is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on benefit units the gate was not fitted to, with each household''s benefit units in one fold. Each positive amount lands on one deterministic adult claimant; base-FRS rows remain byte-unchanged; an empty screened SPI domain refuses.' - stage: spi_benefit_coherence survey: Family Resources Survey 2024-25 source: Family Resources Survey 2024-25 benefit reports carried through the SPI support channel, with the UK take-up contract's Universal Credit rate. @@ -6100,6 +6109,7 @@ stages: clamp_maximum: employment_income floored at zero; every row, reported or predicted, FRS and SPI channel preserve_asked_rows: true cache: false + gate_calibration: cross_fitted - kind: convert_donors_to_target_stock resource: salary_sacrifice_anchor.json target: 5400000 @@ -6155,7 +6165,7 @@ stages: - pension_contributions_via_salary_sacrifice - employee_pension_contributions - employment_income - notes: The QRF trains only on the 2024-25 FRS asked subset with pay. Salary sacrifice is pay given up, so every amount, reported or predicted, is limited to the pay the person still receives, and a person without pay has none (uk-data#518, microcosm#1095); the limit bites above all on SPI-channel rows, which keep their FRS twin's answer beside pay redrawn from the SPI. The second arm creates support toward the reviewed 5.4m staging target by moving contributors' pension amounts, up to half their pay, into salary sacrifice and lowering their pay by the same amount, since the engine reads employment_income after sacrifice; what does not move stays an employee contribution, so the sacrifice never exceeds the pay that remains. Before microcosm#1069 c9 the pay stayed whole and the converted record lost its net-pay relief. The third arm adds bonus sacrifice beside pay toward the OBR's 2027-28 base above GBP 2,000 (microcosm#1340). A sacrificed bonus is never received, so the FRS records it in neither pay nor its bonus amounts, and pay stays as it is (María's ruling of 2026-10-24 on Vahid's review of microcosm#1383); a received FRS bonus marks a bonus-paying job and its size. An SPI-channel adult's FRS bonus is its twin's, beside the tape's pay, so it draws a bonus share of pay from a base-FRS adult in its pay cell instead. + notes: 'The QRF trains only on the 2024-25 FRS asked subset with pay. Its sign gate is cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption''s are: it is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on people the gate was not fitted to, with each household''s members in one fold. Salary sacrifice is pay given up, so every amount, reported or predicted, is limited to the pay the person still receives, and a person without pay has none (uk-data#518, microcosm#1095); the limit bites above all on SPI-channel rows, which keep their FRS twin''s answer beside pay redrawn from the SPI. The second arm creates support toward the reviewed 5.4m staging target by moving contributors'' pension amounts, up to half their pay, into salary sacrifice and lowering their pay by the same amount, since the engine reads employment_income after sacrifice; what does not move stays an employee contribution, so the sacrifice never exceeds the pay that remains. Before microcosm#1069 c9 the pay stayed whole and the converted record lost its net-pay relief. The third arm adds bonus sacrifice beside pay toward the OBR''s 2027-28 base above GBP 2,000 (microcosm#1340). A sacrificed bonus is never received, so the FRS records it in neither pay nor its bonus amounts, and pay stays as it is (María''s ruling of 2026-10-24 on Vahid''s review of microcosm#1383); a received FRS bonus marks a bonus-paying job and its size. An SPI-channel adult''s FRS bonus is its twin''s, beside the tape''s pay, so it draws a bonus share of pay from a base-FRS adult in its pay cell instead.' - stage: carers_allowance_take_up survey: Family Resources Survey 2024-25 source: 'Independent Review of Carer''s Allowance Overpayments (July 2025), chapter 7, and DWP benefit statistics, through the UK take-up contract''s carers_allowance_newly_entitled rate, applied to PolicyEngine-UK''s Carer''s Allowance earnings test after the SPI income chain.' diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/etb_services.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/etb_services.py index ead29566b9..b9ea27b057 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/etb_services.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/etb_services.py @@ -40,6 +40,12 @@ uk_time_period, validate_uk_national_frame, ) +from microcosm.build.uk_runtime.qrf_gates import ( + UK_DEFAULT_GATE_CALIBRATION, + UK_GATE_OUTCOMES_EVIDENCE, + declared_gate_calibration, + gate_outcomes, +) from microcosm.build.uk_runtime.support_clip import ( UKSupportClipReceipt, UKSupportClipResult, @@ -132,6 +138,7 @@ class UKETBServicesResult: nhs_cells: dict[str, object] = field(default_factory=dict) donor_uprating: dict[str, object] | None = None bus_support_pricing: dict[str, object] | None = None + gate_outcomes: dict[str, str] = field(default_factory=dict) def evidence(self) -> dict[str, object]: evidence: dict[str, object] = { @@ -143,6 +150,8 @@ def evidence(self) -> dict[str, object]: evidence["donor_uprating"] = dict(self.donor_uprating) if self.bus_support_pricing is not None: evidence["bus_support_pricing"] = dict(self.bus_support_pricing) + if self.gate_outcomes: + evidence[UK_GATE_OUTCOMES_EVIDENCE] = dict(self.gate_outcomes) return evidence @@ -190,11 +199,16 @@ def __call__(self, frame: Frame) -> Frame: uprating=uprating_factors, ) predictors = recipient_predictors(frame, self.engine) + outcomes: dict[str, str] = {} draws, records = impute_etb_services( donor, predictors, seed=_qrf_seed(self.stage), record_ids=frame.table("household")["household_id"].to_numpy(), + gate_calibration=declared_gate_calibration( + self.stage, "fit_weighted_qrf_chain" + ), + outcomes=outcomes, ) clip_result = support_clip_to_donor( draws, donor, exempt=support_clip_exempt(self.stage) @@ -244,6 +258,7 @@ def __call__(self, frame: Frame) -> Frame: nhs_cells=nhs_cells, donor_uprating=uprating_receipt, bus_support_pricing=pricing_receipt, + gate_outcomes=outcomes, ) return result @@ -450,12 +465,17 @@ def impute_etb_services( seed: int, record_ids: Sequence[object] | np.ndarray, n_estimators: int = 100, + gate_calibration: str = UK_DEFAULT_GATE_CALIBRATION, + outcomes: dict[str, str] | None = None, ) -> tuple[pd.DataFrame, tuple[FitWeightRecord, ...]]: """Chain-draw the ETB services targets from household-keyed uniforms. Each draw reads uniforms keyed on the household's own id (``record_ids``, in recipient row order) and the target, so a household's draws move only when its own predictors do, whatever happens to the other recipients. + ``gate_calibration`` is the chain's declared + :class:`~microcosm.fit.GateCalibration`; when it is not the in-sample + gate, ``outcomes`` (if given) is filled with each target's gate outcome. """ from microcosm.fit import RegimeGatedQRF @@ -466,7 +486,9 @@ def impute_etb_services( raise ValueError( "ETB record_ids must name every recipient once, in recipient row order." ) - model = RegimeGatedQRF(n_estimators=n_estimators, seed=seed) + model = RegimeGatedQRF( + n_estimators=n_estimators, seed=seed, gate_calibration=gate_calibration + ) state = model.start_chain( donor, list(UK_ETB_SERVICES_PREDICTORS), @@ -490,6 +512,8 @@ def impute_etb_services( records.append( FitWeightRecord(f"{UK_ETB_SERVICES_FIT_NAME}:{target}", result.weight_kind) ) + if outcomes is not None and gate_calibration != UK_DEFAULT_GATE_CALIBRATION: + outcomes.update(gate_outcomes(UK_ETB_SERVICES_FIT_NAME, result.fitted)) state = result.state return raw, tuple(records) diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/graph.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/graph.py index a9c8de4acb..a93d395cfb 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/graph.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/graph.py @@ -462,6 +462,8 @@ "employment_income", "self_employment_income", "hours_worked", + # The pension payments the receipt reads beside them. + "private_pension_income", ) ), # The receipt counts support by source household. diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/lcfs_consumption.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/lcfs_consumption.py index 22574f8d9c..02aca4b5a4 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/lcfs_consumption.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/lcfs_consumption.py @@ -90,6 +90,12 @@ assign_car_attributes, car_attributes_operation, ) +from microcosm.build.uk_runtime.qrf_gates import ( + UK_DEFAULT_GATE_CALIBRATION, + UK_GATE_OUTCOMES_EVIDENCE, + declared_gate_calibration, + gate_outcomes, +) from microcosm.build.uk_runtime.receipt_counts import ( extreme_count, floored_share, @@ -907,6 +913,7 @@ class UKLCFSConsumptionResult: gambling_participation: Mapping[str, Any] | None = None excise_quantities: Mapping[str, Any] | None = None car_attributes: Mapping[str, Any] | None = None + gate_outcomes: Mapping[str, str] | None = None def evidence(self) -> dict[str, object]: evidence: dict[str, object] = { @@ -949,6 +956,8 @@ def evidence(self) -> dict[str, object]: evidence[UK_LCFS_EXCISE_QUANTITIES_RECEIPT] = dict(self.excise_quantities) if self.car_attributes is not None: evidence[ASSIGN_CAR_ATTRIBUTES_KIND] = dict(self.car_attributes) + if self.gate_outcomes: + evidence[UK_GATE_OUTCOMES_EVIDENCE] = dict(self.gate_outcomes) return evidence @@ -1092,6 +1101,7 @@ def __call__(self, frame: Frame) -> Frame: n_estimators=_qrf_n_estimators(self.stage), record_ids=frame.table("household")["household_id"].to_numpy(), targets=lcfs_chain_targets(self.stage, shares), + gate_calibration=_qrf_gate_calibration(self.stage), ) clip_result = support_clip_to_donor( imputation.draws, donor, exempt=support_clip_exempt(self.stage) @@ -1283,6 +1293,15 @@ def __call__(self, frame: Frame) -> Frame: gambling_participation=None if gambling is None else gambling.receipt, excise_quantities=excise_quantities, car_attributes=None if car_attributes is None else car_attributes.receipt, + gate_outcomes={ + **imputation.gate_outcomes, + **incidence.receipt.get(UK_GATE_OUTCOMES_EVIDENCE, {}), + **( + {} + if prepayment is None + else prepayment.receipt.get(UK_GATE_OUTCOMES_EVIDENCE, {}) + ), + }, ) return result @@ -1303,6 +1322,8 @@ def checkpoint_metadata(self) -> dict[str, object]: class UKLCFSConsumptionImputationResult: draws: pd.DataFrame fit_weight_records: tuple[FitWeightRecord, ...] + #: Each chain target's gate outcome, when the chain is not in-sample. + gate_outcomes: Mapping[str, str] = field(default_factory=dict) class DiagnosticUnavailableError(ValueError): @@ -1925,6 +1946,10 @@ def redraw_zero_road_fuel( zero = flagged & ~(before > 0) redrawn = household_draws.copy() regimes: dict[str, str] | None = None + gate_calibration = str( + parameters.get("gate_calibration", UK_DEFAULT_GATE_CALIBRATION) + ) + outcomes: dict[str, str] = {} training_rows = 0 records: tuple[FitWeightRecord, ...] = () if zero.any(): @@ -1946,9 +1971,11 @@ def redraw_zero_road_fuel( / donor_total[positive] ) targets = [UK_LCFS_ROAD_FUEL_TOTAL, UK_LCFS_PETROL_SHARE] - fitted = RegimeGatedQRF(n_estimators=n_estimators, seed=seed).fit( - train, list(predictors), targets, weights="household_weight" - ) + fitted = RegimeGatedQRF( + n_estimators=n_estimators, seed=seed, gate_calibration=gate_calibration + ).fit(train, list(predictors), targets, weights="household_weight") + if gate_calibration != UK_DEFAULT_GATE_CALIBRATION: + outcomes = gate_outcomes(UK_LCFS_CONSUMPTION_FIT_NAME, fitted) regimes = {target: str(regime) for target, regime in fitted.regimes().items()} if regimes[UK_LCFS_ROAD_FUEL_TOTAL] != Regime.POSITIVE_ONLY: raise ValueError( @@ -2020,6 +2047,9 @@ def weighted_mean(values: np.ndarray, mask: np.ndarray) -> float | None: "weighted_total_before": float(np.dot(weight, before)), "weighted_total_after": float(np.dot(weight, after)), } + if gate_calibration != UK_DEFAULT_GATE_CALIBRATION: + receipt["gate_calibration"] = gate_calibration + receipt[UK_GATE_OUTCOMES_EVIDENCE] = outcomes return RoadFuelIncidence(redrawn, receipt, records) @@ -2106,9 +2136,12 @@ def impute_prepayment_meter( train = donor_encoded[[*predictors, "household_weight"]].reset_index(drop=True) donor_flag = donor[target].to_numpy(dtype=float) train[target] = donor_flag - fitted = RegimeGatedQRF(n_estimators=n_estimators, seed=seed).fit( - train, list(predictors), [target], weights="household_weight" + gate_calibration = str( + parameters.get("gate_calibration", UK_DEFAULT_GATE_CALIBRATION) ) + fitted = RegimeGatedQRF( + n_estimators=n_estimators, seed=seed, gate_calibration=gate_calibration + ).fit(train, list(predictors), [target], weights="household_weight") ids = np.asarray(household_ids) drawn = fitted.predict_from_uniforms( recipient_encoded[list(predictors)].reset_index(drop=True), @@ -2145,6 +2178,11 @@ def share(values: np.ndarray, mass: np.ndarray) -> float | None: weight[great_britain & flags].sum() ), } + if gate_calibration != UK_DEFAULT_GATE_CALIBRATION: + receipt["gate_calibration"] = gate_calibration + receipt[UK_GATE_OUTCOMES_EVIDENCE] = gate_outcomes( + UK_LCFS_CONSUMPTION_FIT_NAME, fitted + ) records = ( FitWeightRecord(f"{UK_LCFS_CONSUMPTION_FIT_NAME}:{target}", fitted.weight_kind), ) @@ -5377,6 +5415,7 @@ def impute_lcfs_consumption( n_estimators: int, record_ids: Sequence[object] | np.ndarray, targets: Sequence[str] = UK_LCFS_CONSUMPTION_TARGET_COLUMNS, + gate_calibration: str = "in_sample", ) -> UKLCFSConsumptionImputationResult: """Chain-draw the targets in the declared order. @@ -5389,7 +5428,10 @@ def impute_lcfs_consumption( household's consumption moves only when its own predictors do. ``targets`` is the spend targets, optionally followed by the declared excise shares (microcosm#1359): a target appended after them leaves every - earlier draw as it was. + earlier draw as it was. ``gate_calibration`` is the chain's declared + :class:`~microcosm.fit.GateCalibration`: cross-fitted gates draw a rare + spending at the donor's rate on households they were not fitted to, and + move no forest and no uniform. """ targets = tuple(targets) @@ -5411,7 +5453,9 @@ def impute_lcfs_consumption( raise ValueError( "LCFS record_ids must name every recipient once, in recipient row order." ) - model = RegimeGatedQRF(n_estimators=n_estimators, seed=seed) + model = RegimeGatedQRF( + n_estimators=n_estimators, seed=seed, gate_calibration=gate_calibration + ) state = model.start_chain( donor_encoded, list(predictors), @@ -5421,6 +5465,7 @@ def impute_lcfs_consumption( raw = pd.DataFrame(index=recipient_encoded.index) draws = pd.DataFrame(index=recipient_encoded.index) fit_records: list[FitWeightRecord] = [] + outcomes: dict[str, str] = {} for target in targets: features = recipient_encoded.loc[:, list(predictors)] salt = f"{UK_LCFS_CONSUMPTION_FIT_NAME}:{target}" @@ -5440,8 +5485,10 @@ def impute_lcfs_consumption( f"{UK_LCFS_CONSUMPTION_FIT_NAME}:{target}", result.weight_kind ) ) + if gate_calibration != UK_DEFAULT_GATE_CALIBRATION: + outcomes.update(gate_outcomes(UK_LCFS_CONSUMPTION_FIT_NAME, result.fitted)) state = result.state - return UKLCFSConsumptionImputationResult(draws, tuple(fit_records)) + return UKLCFSConsumptionImputationResult(draws, tuple(fit_records), outcomes) def support_clip_to_donor( @@ -5599,6 +5646,11 @@ def _qrf_n_estimators(stage: SourceStageSpec) -> int: return 100 +def _qrf_gate_calibration(stage: SourceStageSpec) -> str: + """The chain's declared gate calibration; the in-sample gate when undeclared.""" + return declared_gate_calibration(stage, "fit_weighted_qrf_chain") + + def _require_path(path: str | Path | None) -> Path: if path is None: raise ValueError("LCFS consumption stage requires caller-supplied donor paths.") diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/nts_bus_travel.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/nts_bus_travel.py index f3e9c3d3e9..598d9ef2d2 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/nts_bus_travel.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/nts_bus_travel.py @@ -59,6 +59,12 @@ uk_time_period, validate_uk_national_frame, ) +from microcosm.build.uk_runtime.qrf_gates import ( + UK_DEFAULT_GATE_CALIBRATION, + UK_GATE_OUTCOMES_EVIDENCE, + declared_gate_calibration, + gate_outcomes, +) from microcosm.build.uk_runtime.receipt_counts import UK_DISCLOSURE_FLOOR, UK_WITHHELD from microcosm.build.uk_runtime.support_clip import ( UKSupportClipReceipt, @@ -1192,6 +1198,7 @@ def impute_bus_use_band( *, seed: int, n_estimators: int, + gate_calibration: str = UK_DEFAULT_GATE_CALIBRATION, ) -> BandImputation: """Draw each recipient person's interview band from a QRF fitted on the donor. @@ -1199,19 +1206,36 @@ def impute_bus_use_band( the gate draws user / non-user, the positive forest the band among users, both from identity-keyed uniforms (``stable_identity_uniforms`` on the person id), so the draw is invariant to ordering and batching. Draws are - rounded to the nearest band. + rounded to the nearest band. A cross-fitted gate (``gate_calibration``) + deals each NTS household's members to the same fold, and the receipt then + names the gate's outcome. """ from microcosm.fit.qrf import RegimeGatedQRF if BAND_COLUMN not in donor: raise NTSBusTravelError("the donor carries no interview band to fit.") + groups = donor["household_id"].to_numpy() if "household_id" in donor else None + if groups is None and gate_calibration != UK_DEFAULT_GATE_CALIBRATION: + # Row folds would split a household's members between fold gates. + raise NTSBusTravelError( + "a cross-fitted gate deals each household to one fold, but the " + "donor carries no household_id." + ) donor_encoded, recipient_encoded, predictors = _encode_pair(donor, recipient) train = donor_encoded.copy() train[BAND_COLUMN] = donor[BAND_COLUMN].to_numpy(dtype=float) train["weight"] = donor["weight"].to_numpy(dtype=float) - model = RegimeGatedQRF(n_estimators=n_estimators, seed=seed) - fitted = model.fit(train, predictors, [BAND_COLUMN], weights="weight") + model = RegimeGatedQRF( + n_estimators=n_estimators, seed=seed, gate_calibration=gate_calibration + ) + fitted = model.fit( + train, + predictors, + [BAND_COLUMN], + weights="weight", + groups=groups, + ) ids = recipient["person_id"].to_numpy() quantiles = stable_identity_uniforms(ids, seed=seed, salt=BAND_SALT_QUANTILE) signs = stable_identity_uniforms(ids, seed=seed, salt=BAND_SALT_SIGN) @@ -1236,6 +1260,11 @@ def impute_bus_use_band( "donor_persons": int(len(donor)), "recipient_persons": int(len(recipient)), } + if gate_calibration != UK_DEFAULT_GATE_CALIBRATION: + receipt["gate_calibration"] = gate_calibration + receipt[UK_GATE_OUTCOMES_EVIDENCE] = gate_outcomes( + UK_NTS_BUS_TRAVEL_STAGE_NAME, fitted + ) records = ( FitWeightRecord( f"{UK_NTS_BUS_TRAVEL_STAGE_NAME}:{BAND_COLUMN}", fitted.weight_kind @@ -1892,6 +1921,9 @@ def __call__(self, frame: Frame) -> Frame: recipient, seed=seed, n_estimators=int(band_parameters.get("n_estimators", 100)), + gate_calibration=declared_gate_calibration( + self.stage, IMPUTE_BUS_USE_BAND_KIND + ), ) means, means_receipt = band_means_from_donor(donor.person) single_fare_shares, shares_receipt = single_fare_shares_from_donor( diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/qrf_gates.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/qrf_gates.py new file mode 100644 index 0000000000..617c82b54c --- /dev/null +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/qrf_gates.py @@ -0,0 +1,77 @@ +"""The QRF sign-gate calibration each UK stage declares, and what each gate got. + +A stage operation that fits a :class:`~microcosm.fit.RegimeGatedQRF` names its +``gate_calibration`` in ``uk/spec/sources.yaml`` (microcosm#1359). An +undeclared operation keeps the in-sample gate. The fitted model says which +calibration each target's gate actually has +(:meth:`~microcosm.fit.FittedRegimeGatedQRF.gate_outcomes`), and the stages +record that in their evidence under :data:`UK_GATE_OUTCOMES_EVIDENCE`, so a +target that kept the in-sample gate or fell back to the class rates is seen. +""" + +from __future__ import annotations + +from collections import Counter +from collections.abc import Mapping, Sequence +from typing import Any + +from microcosm.build.source_manifest import SourceStageSpec + +#: The calibration an operation that declares none keeps. +UK_DEFAULT_GATE_CALIBRATION = "in_sample" +#: The stage-evidence key holding each fit's gate outcomes. +UK_GATE_OUTCOMES_EVIDENCE = "gate_outcomes" + + +def declared_gate_calibration( + stage: SourceStageSpec, kind: str, **match: object +) -> str: + """The ``gate_calibration`` the stage's ``kind`` operation declares. + + ``match`` narrows to the operation whose parameters carry those values, + for a stage that declares the kind more than once. + """ + + for operation in stage.operations: + if operation.kind == kind and all( + operation.parameters.get(key) == value for key, value in match.items() + ): + return str( + operation.parameters.get( + "gate_calibration", UK_DEFAULT_GATE_CALIBRATION + ) + ) + return UK_DEFAULT_GATE_CALIBRATION + + +def gate_outcomes(fit_name: str, fitted: Any) -> dict[str, str]: + """``{":": outcome}`` for each gated target of a fit.""" + + outcomes: Mapping[str, str | None] = fitted.gate_outcomes() + return { + f"{fit_name}:{target}": outcome + for target, outcome in outcomes.items() + if outcome is not None + } + + +def pooled_gate_outcomes(fit_name: str, fits: Sequence[Any]) -> dict[str, str]: + """One :func:`gate_outcomes` entry per target over fits of the same targets. + + A target whose fits (the folds of a cross-fitted reference, say) all got + one outcome names it; otherwise the entry counts the fits behind each + outcome, as ``"cross_fitted 4, in_sample_thin_class 1"``. + """ + + counts: dict[str, Counter[str]] = {} + for fitted in fits: + for key, outcome in gate_outcomes(fit_name, fitted).items(): + counts.setdefault(key, Counter())[outcome] += 1 + return { + key: ( + next(iter(count)) + if len(count) == 1 + else ", ".join(f"{outcome} {n}" for outcome, n in sorted(count.items())) + ) + for key, count in counts.items() + } diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/salary_sacrifice.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/salary_sacrifice.py index 0f6c4a0ead..987238586d 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/salary_sacrifice.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/salary_sacrifice.py @@ -36,6 +36,11 @@ uk_time_period, validate_uk_national_frame, ) +from microcosm.build.uk_runtime.qrf_gates import ( + UK_DEFAULT_GATE_CALIBRATION, + UK_GATE_OUTCOMES_EVIDENCE, + gate_outcomes, +) from microcosm.build.uk_runtime.receipt_counts import ( distinct_count, small_cell_share, @@ -69,6 +74,10 @@ #: rest of the contribution stays an employee contribution (uk-data#518). SALSAC_MOVE_PAY_SHARE_CAP = 0.5 SALSAC_QRF_SEED = 42 +#: The fit's sign gate is cross-fitted, its folds dealt by household +#: (microcosm#1359): an in-sample gate draws a rare sacrifice too rarely on +#: the people it was not fitted to. +SALSAC_QRF_GATE_CALIBRATION = "cross_fitted" SALSAC_QRF_ESTIMATORS = 100 SALSAC_CONVERSION_SEED = 2024 SALSAC_CONVERSION_SALT = "salary_sacrifice_conversion" @@ -436,6 +445,8 @@ class UKSalarySacrificeResult: realization_deviation: float #: The bonus conversion's receipt (microcosm#1340). bonus_receipt: Mapping[str, object] | None = None + #: The fit's gate outcome, when the gate is not in-sample. + gate_outcomes: Mapping[str, str] | None = None def evidence(self) -> dict[str, object]: return { @@ -484,6 +495,11 @@ def evidence(self) -> dict[str, object]: if self.bonus_receipt is None else {"bonus_sacrifice_receipt": dict(self.bonus_receipt)} ), + **( + {UK_GATE_OUTCOMES_EVIDENCE: dict(self.gate_outcomes)} + if self.gate_outcomes + else {} + ), } @@ -598,12 +614,19 @@ def impute_salary_sacrifice( person_weights = person_households.map(household_weights).to_numpy(dtype=float) training = numeric.loc[training_mask, [*SALSAC_PREDICTORS, SALSAC_OUTPUT]].copy() training["_fit_weight"] = person_weights[training_mask.to_numpy()] - model = _qrf_class()(n_estimators=SALSAC_QRF_ESTIMATORS, seed=SALSAC_QRF_SEED) + model = _qrf_class()( + n_estimators=SALSAC_QRF_ESTIMATORS, + seed=SALSAC_QRF_SEED, + gate_calibration=SALSAC_QRF_GATE_CALIBRATION, + ) + # A person's household mates share its predictors' household parts, so a + # cross-fitted gate deals each household to one fold. fitted = model.fit( training, list(SALSAC_PREDICTORS), [SALSAC_OUTPUT], weights="_fit_weight", + groups=person_households.loc[training_mask].to_numpy(), ) if predict_mask.any(): # Uniforms keyed on each person's own id, never a positional stream: @@ -843,6 +866,11 @@ def bonus_sources(mask: np.ndarray) -> int: else 0.0 ), bonus_receipt=bonus_receipt, + gate_outcomes=( + gate_outcomes("salary_sacrifice", fitted) + if SALSAC_QRF_GATE_CALIBRATION != UK_DEFAULT_GATE_CALIBRATION + else None + ), ) @@ -887,6 +915,7 @@ def salary_sacrifice_operation_parameters() -> tuple[ "weight_mapping": "household_to_person", "seed": SALSAC_QRF_SEED, "n_estimators": SALSAC_QRF_ESTIMATORS, + "gate_calibration": SALSAC_QRF_GATE_CALIBRATION, "clamp_minimum": 0, "clamp_maximum": SALSAC_AMOUNT_LIMIT, "preserve_asked_rows": True, diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_benefit_coherence.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_benefit_coherence.py index 9a7fb47d10..34e665ddf9 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_benefit_coherence.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_benefit_coherence.py @@ -74,7 +74,23 @@ which the gross test leaves in. The SPI tape has no hours, so the copy keeps its twin's usual hours (``hours_worked`` over 52 weeks), which the SPI pay floor also reads as the copy's (uk-data#629), and the hours tests read them. -Neither award is reduced for the copy's pension payments. +The tape's pay covers the tax year, so averaging it over 52 weeks is strict +for anyone who worked part of the year: a copy whose pay was earned in 26 +weeks and which claimed in the other 26 is tested on half its weekly pay in +work, not on the nil it earned while claiming. The tests therefore understate +part-year claimants, above all of contribution-based JSA, which lasts at most +182 days (Jobseekers Act 1995 s. 5(1)). + +Neither award is reduced for the copy's pension payments, though the copy +carries the tape's pension income (``private_pension_income``, from its +PENSION): JSA Regs 1996 reg 81 takes every pound of pension payments above +policyengine-uk's ``gov.dwp.JSA.contrib.pension_disregard`` (GBP 50 a week) +off contribution-based JSA, and ESA Regs 2008 reg 74 half of every pound +above GBP 85 a week off contributory ESA. B10 tests the copy's work alone, so +the receipt shows how much rests on the omission: for each award, the support +and weighted award of the copies whose pension payments are above its +threshold, the most a reduction could take off (Vahid's review of +microcosm#1426). """ from __future__ import annotations @@ -209,6 +225,14 @@ "for ESA, incapacity, which the copy keeps, but not work outside each " "benefit's own earnings and hours limits" ) +#: The copy's pension payments, the tape's PENSION, which neither award is +#: reduced for; the receipt reads them against each award's threshold. +SPI_PENSION_PAYMENTS_COLUMN = "private_pension_income" +#: Half of every pound of pension payments above GBP 85 a week comes off +#: contributory ESA (ESA Regs 2008 reg 74(1)), an amount policyengine-uk has +#: no parameter for. JSA's threshold is policyengine-uk's +#: ``gov.dwp.JSA.contrib.pension_disregard`` (JSA Regs 1996 reg 81(1)). +SPI_ESA_PENSION_PAYMENTS_THRESHOLD = 85.0 SPI_TWIN_LINKAGE = "person_source_id -> FRS-channel person_id" SPI_BENEFITS_IN_OWN_RIGHT_OUTPUT = "receives_benefits_in_own_right" SPI_BENEFITS_IN_OWN_RIGHT_RULE = ( @@ -359,6 +383,8 @@ class UKSPIPermittedWorkLimit: ``esa_hours_limit`` hours. JSA: under ``jsa_remunerative_hours`` hours and earnings below the age-related amount plus ``jsa_earnings_disregard``, and an award of at most that amount less the earnings above the disregard. + ``jsa_pension_disregard`` is the weekly pension payments above which JSA + is reduced, which only the receipt reads. """ esa_weekly_limit: float @@ -367,6 +393,7 @@ class UKSPIPermittedWorkLimit: jsa_amount_from_25: float jsa_earnings_disregard: float jsa_remunerative_hours: float + jsa_pension_disregard: float year: int source: str @@ -379,6 +406,14 @@ def jsa_amount(self, age: np.ndarray) -> np.ndarray: self.jsa_amount_from_25, ) + def pension_payments_thresholds(self) -> dict[str, float]: + """Each award's weekly pension payments threshold (reg 81, reg 74).""" + + return { + SPI_JSA_CONTRIB_COLUMN: self.jsa_pension_disregard, + SPI_ESA_CONTRIB_COLUMN: SPI_ESA_PENSION_PAYMENTS_THRESHOLD, + } + def evidence(self) -> dict[str, object]: return { "esa_weekly_limit": self.esa_weekly_limit, @@ -387,6 +422,8 @@ def evidence(self) -> dict[str, object]: "jsa_amount_from_25": self.jsa_amount_from_25, "jsa_earnings_disregard": self.jsa_earnings_disregard, "jsa_remunerative_hours": self.jsa_remunerative_hours, + "jsa_pension_disregard": self.jsa_pension_disregard, + "esa_pension_payments_threshold": SPI_ESA_PENSION_PAYMENTS_THRESHOLD, "year": self.year, "source": self.source, } @@ -431,6 +468,7 @@ def uk_spi_permitted_work_limit(year: int | str) -> UKSPIPermittedWorkLimit: "jsa_amount_from_25": float(dwp.JSA.contrib.amount_over_25), "jsa_earnings_disregard": float(dwp.JSA.contrib.earn_disregard), "jsa_remunerative_hours": float(dwp.JSA.remunerative_work.claimant_hours), + "jsa_pension_disregard": float(dwp.JSA.contrib.pension_disregard), } invalid = { name: value @@ -522,6 +560,7 @@ def apply_spi_benefit_coherence( *SPI_WITHIN_LIMIT_REPORT_COLUMNS, *SPI_WITHIN_LIMIT_EARNINGS_COLUMNS, SPI_WITHIN_LIMIT_HOURS_COLUMN, + SPI_PENSION_PAYMENTS_COLUMN, *BENEFITS_IN_OWN_RIGHT_REPORTED_COLUMNS, *frs_disability.UK_DISABILITY_FLAG_REPORTED_COLUMNS, *frs_disability.FRS_DISABILITY_OUTPUT_COLUMNS, @@ -619,6 +658,10 @@ def apply_spi_benefit_coherence( limit = permitted_work_limit or uk_spi_permitted_work_limit(uk_time_period(frame)) within_limits, award_caps = _contributory_work_limits(person, limit) + weekly_pension = ( + _numeric(person[SPI_PENSION_PAYMENTS_COLUMN]) / SPI_WITHIN_LIMIT_WEEKS_IN_YEAR + ) + pension_thresholds = limit.pension_payments_thresholds() sources = _person_source_households(person, household) twin_awards = fill_support_channel_from_source( person, @@ -641,6 +684,7 @@ def apply_spi_benefit_coherence( twin_reports=twin_reports, outside=twin_reports & ~within, reduced=twin_reports & within & (award < twin_award), + pension_above=weekly_pension > pension_thresholds[column], weights=weights, sources=sources, ) @@ -861,7 +905,11 @@ def _numeric(values: pd.Series) -> np.ndarray: def _weekly_earnings(person: pd.DataFrame) -> np.ndarray: - """Employment income plus any self-employment profit, over 52 weeks.""" + """Employment income plus any self-employment profit, over 52 weeks. + + Annual pay averaged over 52 weeks, which understates part-year claimants + (see the module docstring). + """ employment, profit = ( _numeric(person[column]) for column in SPI_WITHIN_LIMIT_EARNINGS_COLUMNS @@ -906,6 +954,7 @@ def _within_limit_receipt( twin_reports: np.ndarray, outside: np.ndarray, reduced: np.ndarray, + pension_above: np.ndarray, weights: np.ndarray, sources: np.ndarray, ) -> dict[str, object]: @@ -913,7 +962,10 @@ def _within_limit_receipt( Support is banded. A weighted figure is "<3" when one or two source households carry it, or carry the change between its before and after, - which the two figures would otherwise give back by difference. + which the two figures would otherwise give back by difference. The award + on the copies whose pension payments are above its threshold is "<3" too + when one or two carry the rest of the award, which it would give back + beside the whole. """ changed = distinct_count(sources, spi & ~np.isclose(old, new), weights) @@ -926,6 +978,14 @@ def weighted(values: np.ndarray, mask: np.ndarray) -> float | str: before = spi & (old > 0.0) after = spi & (new > 0.0) + above = after & np.asarray(pension_above, dtype=bool) + rest = distinct_count(sources, after & ~above, weights) + + def weighted_above(values: np.ndarray) -> float | str: + if 0 < rest < UK_DISCLOSURE_FLOOR: + return UK_WITHHELD + return weighted(values, above) + return { "twin_reporters": support_band(distinct_count(sources, twin_reports, weights)), "twin_reporters_outside_limits": support_band( @@ -939,6 +999,11 @@ def weighted(values: np.ndarray, mask: np.ndarray) -> float | str: "weighted_amount_after": weighted(new, after), "weighted_reporters_before": weighted(np.ones_like(old), before), "weighted_reporters_after": weighted(np.ones_like(new), after), + "pension_payments_above_threshold": { + "source_households": support_band(distinct_count(sources, above, weights)), + "weighted_amount_after": weighted_above(new), + "weighted_reporters_after": weighted_above(np.ones_like(new)), + }, } diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_housing_shell.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_housing_shell.py index a20a2a592c..86aafa74f0 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_housing_shell.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_housing_shell.py @@ -38,6 +38,12 @@ UK_COUNCIL_TAX_BANDS_BY_REGION, UK_NATION_BY_REGION, ) +from microcosm.build.uk_runtime.qrf_gates import ( + UK_DEFAULT_GATE_CALIBRATION, + UK_GATE_OUTCOMES_EVIDENCE, + declared_gate_calibration, + gate_outcomes, +) __all__ = [ "HOUSING_AMOUNT_COLUMNS", @@ -413,8 +419,13 @@ def fit_housing_model( *, seed: int, n_estimators: int, + gate_calibration: str = UK_DEFAULT_GATE_CALIBRATION, ) -> FittedHousingModel: - """Fit the categorical steps and the chained amounts on training households.""" + """Fit the categorical steps and the chained amounts on training households. + + ``gate_calibration`` is the amounts' declared + :class:`~microcosm.fit.GateCalibration`. + """ from microcosm.fit.qrf import RegimeGatedQRF @@ -453,7 +464,9 @@ def fit_housing_model( table = pd.concat( [features, targets[list(amount_targets)].astype(float)], axis=1 ).reset_index(drop=True) - model.amount_model = RegimeGatedQRF(n_estimators=n_estimators, seed=seed).fit( + model.amount_model = RegimeGatedQRF( + n_estimators=n_estimators, seed=seed, gate_calibration=gate_calibration + ).fit( table, list(features.columns), list(amount_targets), @@ -512,8 +525,13 @@ def impute_spi_housing_shell( *, seed: int = 0, n_estimators: int = 100, + gate_calibration: str = UK_DEFAULT_GATE_CALIBRATION, ) -> tuple[pd.DataFrame, pd.DataFrame, dict[str, Any]]: - """Redraw every SPI-channel household's housing; FRS rows are untouched.""" + """Redraw every SPI-channel household's housing; FRS rows are untouched. + + When ``gate_calibration`` is not the in-sample gate, the receipt names each + amount target's gate outcome. + """ channel = household["household_support_channel"].astype(str).to_numpy() if not set(channel) <= {FRS_CHANNEL, SPI_CHANNEL}: @@ -536,6 +554,7 @@ def impute_spi_housing_shell( weights.loc[training_ids].to_numpy(), seed=seed, n_estimators=n_estimators, + gate_calibration=gate_calibration, ) band_redraws: dict[str, int] = {} raw = model.draw(predictors.loc[recipient_ids], firings=band_redraws) @@ -587,6 +606,10 @@ def impute_spi_housing_shell( for column in HOUSING_CATEGORICAL_COLUMNS }, } + if gate_calibration != UK_DEFAULT_GATE_CALIBRATION: + receipt[UK_GATE_OUTCOMES_EVIDENCE] = gate_outcomes( + UK_SPI_HOUSING_SHELL_STAGE_NAME, model.amount_model + ) return person_out, household_out, receipt @@ -625,6 +648,7 @@ def _weighted_shares(values: pd.Series, weights: pd.Series) -> dict[str, float]: "landing": "household_reference_person", "n_estimators": 100, "seed": 0, + "gate_calibration": "cross_fitted", } UK_SPI_HOUSING_SHELL_REWRITES: tuple[str, ...] = ( *HOUSING_CATEGORICAL_COLUMNS, @@ -687,6 +711,9 @@ def __call__(self, frame): n_estimators=int( self.n_estimators or UK_SPI_HOUSING_SHELL_OPERATION["n_estimators"] ), + gate_calibration=declared_gate_calibration( + self.stage, "impute_spi_housing_shell" + ), ) _assert_invariants(frame.table("person"), household, person_out, household_out) result = uk_national_frame( diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_income.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_income.py index 8b2c243a3b..0c79397450 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_income.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_income.py @@ -53,6 +53,11 @@ coherence_receipt, twin_rate_employer_contributions, ) +from microcosm.build.uk_runtime.qrf_gates import ( + UK_DEFAULT_GATE_CALIBRATION, + gate_outcomes, + pooled_gate_outcomes, +) from microcosm.build.uk_runtime.receipt_counts import ( UK_DISCLOSURE_FLOOR, UK_WITHHELD, @@ -1118,6 +1123,8 @@ class UKSPIIncomeImputationResult: pension_coherence: Mapping[str, object] | None = None employment_pay_floor: Mapping[str, object] | None = None gift_anchor: Mapping[str, object] | None = None + #: Each gated target's gate outcome, for the fits not on the in-sample gate. + gate_outcomes: Mapping[str, str] | None = None @dataclass(frozen=True) @@ -1226,6 +1233,8 @@ def impute_uk_spi_income_support( state_pension_age: int | None = None, allow_in_sample_reference: bool = False, employment_pay_floor: SPIEmploymentPayFloor | None = None, + stage1_gate_calibration: str = UK_DEFAULT_GATE_CALIBRATION, + stage2_gate_calibration: str = UK_DEFAULT_GATE_CALIBRATION, ) -> UKSPIIncomeImputationResult: """Run strict SPI-income and FRS-only QRFs on rebuilt positive support. @@ -1243,6 +1252,13 @@ def impute_uk_spi_income_support( minimum wage for its age, on drawn recipients other than band carriers whose twin works as an employee with no trade, before employment_income is derived and stage 2 reads it; ``None`` keeps every draw. + ``stage1_gate_calibration`` and ``stage2_gate_calibration`` are the two + operations' declared :class:`~microcosm.fit.GateCalibration`. The FRS + reference forests take stage 1's, so the gate that places a twin's + observed sign and the tape forest's gate that reads it are calibrated + alike; their cross-fitted folds, like stage 2's, keep an FRS household's + members together. The result names each gate's outcome for the fits not + on the in-sample gate. """ if support.household_weight_kind is not WeightKind.IMPORTANCE: @@ -1473,7 +1489,11 @@ def impute_uk_spi_income_support( weight_kind=WeightKind.DESIGN, ) qrf_cls = _qrf_class() - stage1 = qrf_cls(n_estimators=n_estimators, seed=seed).fit( + stage1 = qrf_cls( + n_estimators=n_estimators, + seed=seed, + gate_calibration=stage1_gate_calibration, + ).fit( donor_frame, list(donor_predictors.columns), list(SPI_INCOME_QRF_OUTPUT_COLUMNS), @@ -1490,6 +1510,7 @@ def impute_uk_spi_income_support( reference_weights = person_weights.loc[reference_people] reference_targets = list(analogue_targets(SPI_INCOME_QRF_OUTPUT_COLUMNS)) reference_weight_kind: dict[str, str] = {} + reference_fits: list[Any] = [] def fit_reference(encoded: pd.DataFrame, observed: pd.DataFrame): frame = _person_fit_frame( @@ -1499,9 +1520,18 @@ def fit_reference(encoded: pd.DataFrame, observed: pd.DataFrame): weight_kind=WeightKind.IMPORTANCE, ) fitted = qrf_cls( - n_estimators=n_estimators, seed=seed + SPI_TRANSPORT_SEED_OFFSET - ).fit(frame, list(encoded.columns), reference_targets, weights="importance") + n_estimators=n_estimators, + seed=seed + SPI_TRANSPORT_SEED_OFFSET, + gate_calibration=stage1_gate_calibration, + ).fit( + frame, + list(encoded.columns), + reference_targets, + weights="importance", + groups=person.loc[encoded.index, "person_household_id"].to_numpy(), + ) reference_weight_kind.setdefault("kind", fitted.weight_kind) + reference_fits.append(fitted) return fitted training_folds, used_folds = cell_fold_ids( @@ -1728,11 +1758,16 @@ def fit_reference(encoded: pd.DataFrame, observed: pd.DataFrame): ) # Stage 2 deliberately derives a distinct RNG stream from the single # reviewed stage seed; changing this edits the derivation convention. - stage2 = qrf_cls(n_estimators=n_estimators, seed=seed + 1).fit( + stage2 = qrf_cls( + n_estimators=n_estimators, + seed=seed + 1, + gate_calibration=stage2_gate_calibration, + ).fit( stage2_frame, list(encoded_train.columns), list(stage2_outputs), weights="importance", + groups=training_person["person_household_id"].to_numpy(), ) stage2_keys = integer_record_keys( person.loc[spi_age_domain, "person_id"].to_numpy(), @@ -1853,6 +1888,21 @@ def fit_reference(encoded: pd.DataFrame, observed: pd.DataFrame): pension_coherence=pension_coherence, employment_pay_floor=pay_floor_receipt, gift_anchor=gift_anchor, + gate_outcomes={ + **( + {} + if stage1_gate_calibration == UK_DEFAULT_GATE_CALIBRATION + else { + **gate_outcomes(SPI_DONOR_FIT_NAME, stage1), + **pooled_gate_outcomes(SPI_TRANSPORT_FIT_NAME, reference_fits), + } + ), + **( + {} + if stage2_gate_calibration == UK_DEFAULT_GATE_CALIBRATION + else gate_outcomes(FRS_ONLY_FIT_NAME, stage2) + ), + }, ) diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_spine.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_spine.py index 96a5070387..2aa95cb6c6 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_spine.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/spi_spine.py @@ -49,6 +49,10 @@ uk_time_period, validate_uk_national_frame, ) +from microcosm.build.uk_runtime.qrf_gates import ( + UK_GATE_OUTCOMES_EVIDENCE, + declared_gate_calibration, +) from microcosm.build.uk_runtime.release_input_coverage import ( DEFAULT_MINIMUM_NONDEFAULT_MASS_SHARE, ) @@ -431,7 +435,7 @@ class UKSPIIncomeSpineResult: post_draw_identity_rows: int def evidence(self) -> dict[str, object]: - return { + evidence: dict[str, object] = { "stage": UK_HMRC_SPI_INCOME_SPINE_STAGE_NAME, "source_vintages": { "spi_donor": "2022-23", @@ -484,6 +488,9 @@ def evidence(self) -> dict[str, object]: "exact": True, }, } + if self.imputation.gate_outcomes: + evidence[UK_GATE_OUTCOMES_EVIDENCE] = dict(self.imputation.gate_outcomes) + return evidence @dataclass(frozen=True) @@ -885,6 +892,12 @@ def __call__(self, frame: Frame) -> Frame: None if donor_age_model is None else donor_age_model.state_pension_age ), employment_pay_floor=employment_pay_floor, + stage1_gate_calibration=declared_gate_calibration( + self.stage, "fit_weighted_qrf_stage1" + ), + stage2_gate_calibration=declared_gate_calibration( + self.stage, "fit_weighted_qrf_stage2" + ), ) result_frame = uk_national_frame( person=imputation.person, diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/uc_reporter_redraw.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/uc_reporter_redraw.py index e8c595f700..88a8a5bc87 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/uc_reporter_redraw.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/uc_reporter_redraw.py @@ -27,6 +27,11 @@ uk_time_period, validate_uk_national_frame, ) +from microcosm.build.uk_runtime.qrf_gates import ( + UK_DEFAULT_GATE_CALIBRATION, + UK_GATE_OUTCOMES_EVIDENCE, + gate_outcomes, +) from microcosm.build.uk_runtime.spi_support import ( BASE_FRS_SUPPORT_CHANNEL, SPI_SYNTHETIC_SUPPORT_CHANNEL, @@ -56,6 +61,10 @@ UC_REPORTER_REDRAW_STAGE_NAME = "uc_reporter_redraw" UC_REPORTER_REDRAW_OUTPUT = "universal_credit_reported" UC_REPORTER_REDRAW_SEED = 44 +#: The redraw's sign gate is cross-fitted, its folds dealt by household +#: (microcosm#1359): an in-sample gate draws the rare reported award too +#: rarely on the benefit units it was not fitted to. +UC_REPORTER_GATE_CALIBRATION = "cross_fitted" UC_REPORTER_SCREEN_VARIABLES = ( "uc_maximum_amount", "uc_income_reduction", @@ -137,11 +146,13 @@ class UKUCReporterRedrawResult: screened_spi_benunits: int screen_failed_spi_benunits: int reporter_transitions: Mapping[str, Mapping[str, Mapping[str, int]]] + #: The redraw's gate outcome, when the gate is not in-sample. + gate_outcomes: Mapping[str, str] | None = None def evidence(self) -> dict[str, object]: """Return JSON-safe stage evidence.""" - return { + evidence: dict[str, object] = { "stage": UC_REPORTER_REDRAW_STAGE_NAME, "seed": UC_REPORTER_REDRAW_SEED, "training_benunits": self.training_benunits, @@ -155,6 +166,9 @@ def evidence(self) -> dict[str, object]: for channel, families in self.reporter_transitions.items() }, } + if self.gate_outcomes: + evidence[UK_GATE_OUTCOMES_EVIDENCE] = dict(self.gate_outcomes) + return evidence @dataclass(frozen=True) @@ -323,11 +337,22 @@ def redraw_spi_reported_uc( model_predictors = [ column for column in encoded_train.columns if column != UC_REPORTER_TARGET ] - fitted = qrf_factory(seed=UC_REPORTER_REDRAW_SEED).fit( + # A household's benefit units share its household predictors, so a + # cross-fitted gate deals each household to one fold. + benunit_household = ( + person.groupby("person_benunit_id", sort=False)["person_household_id"] + .first() + .reindex(benunit["benunit_id"]) + .to_numpy() + ) + fitted = qrf_factory( + seed=UC_REPORTER_REDRAW_SEED, gate_calibration=UC_REPORTER_GATE_CALIBRATION + ).fit( encoded_train, model_predictors, [UC_REPORTER_TARGET], weights=weights[training], + groups=benunit_household[training], ) draws = np.zeros(len(benunit), dtype=np.float64) # Uniforms keyed on each benefit unit's own id, never a positional @@ -405,6 +430,11 @@ def redraw_spi_reported_uc( screened_spi_benunits=int(target.sum()), screen_failed_spi_benunits=int((spi & ~screen).sum()), reporter_transitions=transitions, + gate_outcomes=( + gate_outcomes(UC_REPORTER_REDRAW_STAGE_NAME, fitted) + if UC_REPORTER_GATE_CALIBRATION != UK_DEFAULT_GATE_CALIBRATION + else None + ), ) @@ -883,6 +913,7 @@ def _assert_stage_parameters(stage: SourceStageSpec) -> None: "fit": "regime_gated_qrf", "landing": UC_REPORTER_LANDING, "seed": UC_REPORTER_REDRAW_SEED, + "gate_calibration": UC_REPORTER_GATE_CALIBRATION, }, } actual = { diff --git a/packages/microcosm-build/src/microcosm/build/uk_runtime/was_wealth.py b/packages/microcosm-build/src/microcosm/build/uk_runtime/was_wealth.py index 3ff054373e..ecc1f490b4 100644 --- a/packages/microcosm-build/src/microcosm/build/uk_runtime/was_wealth.py +++ b/packages/microcosm-build/src/microcosm/build/uk_runtime/was_wealth.py @@ -26,6 +26,12 @@ uk_time_period, validate_uk_national_frame, ) +from microcosm.build.uk_runtime.qrf_gates import ( + UK_DEFAULT_GATE_CALIBRATION, + UK_GATE_OUTCOMES_EVIDENCE, + declared_gate_calibration, + gate_outcomes, +) from microcosm.build.uk_runtime.support_clip import ( UKSupportClipReceipt, UKSupportClipResult, @@ -368,14 +374,19 @@ class UKWASWealthResult: #: construction unless the support clip moved a total) and the rows the #: donor-range cap adjusted. identities: Mapping[str, object] = field(default_factory=dict) + #: Each chain target's gate outcome, when the chain is not in-sample. + gate_outcomes: Mapping[str, str] = field(default_factory=dict) def evidence(self) -> dict[str, object]: - return { + evidence: dict[str, object] = { "stage": UK_WAS_WEALTH_STAGE_NAME, "support_clip": self.support_clip.evidence(), "tenure_coherence": dict(self.tenure_coherence), "identities": dict(self.identities), } + if self.gate_outcomes: + evidence[UK_GATE_OUTCOMES_EVIDENCE] = dict(self.gate_outcomes) + return evidence #: The household-mass receipt this stage records (the manifest's @@ -432,6 +443,9 @@ def __call__(self, frame: Frame) -> Frame: seed=UK_WAS_WEALTH_DECLARED_SEEDS["was_wealth"], n_estimators=_qrf_n_estimators(self.stage), record_ids=frame.table("household")["household_id"].to_numpy(), + gate_calibration=declared_gate_calibration( + self.stage, "fit_weighted_qrf_chain" + ), ) self.last_fit_weight_records = imputation.fit_weight_records capped, capped_rows = cap_derived_totals_to_donor_range(imputation.draws, donor) @@ -485,6 +499,7 @@ def __call__(self, frame: Frame) -> Frame: support_clip=clip_result.receipt, tenure_coherence=tenure_coherence, identities=identities, + gate_outcomes=imputation.gate_outcomes, ) return result @@ -809,6 +824,8 @@ class UKWASWealthImputationResult: fit_weight_records: tuple[FitWeightRecord, ...] #: The per-segment RNG roots derived from the declared stage seed. segment_seeds: tuple[int, ...] = () + #: Each target's gate outcome, when the chain is not in-sample. + gate_outcomes: Mapping[str, str] = field(default_factory=dict) #: The chain's segments, each with its own model and child seed: @@ -854,6 +871,7 @@ def impute_was_wealth( n_estimators: int, record_ids: Sequence[object] | np.ndarray, segments: int = UK_WAS_CHAIN_SEGMENTS, + gate_calibration: str = UK_DEFAULT_GATE_CALIBRATION, ) -> UKWASWealthImputationResult: """Fit segmented checkpointed QRF chains and draw WAS wealth outputs. @@ -874,7 +892,9 @@ def impute_was_wealth( ``segments`` runs only the first *k* chain segments (a test seam: each segment draws from its own child seed, so the earlier segments' draws are - identical whether or not the later ones run). + identical whether or not the later ones run). ``gate_calibration`` is the + chain's declared :class:`~microcosm.fit.GateCalibration`; when it is not + the in-sample gate, the result names each target's gate outcome. """ from microcosm.fit import RegimeGatedQRF @@ -912,11 +932,16 @@ def impute_was_wealth( donor_encoded.loc[~np.isin(donor_category, categories), target] = 0.0 segment_seeds = was_wealth_segment_seeds(seed) segment_models = iter( - RegimeGatedQRF(n_estimators=n_estimators, seed=segment_seed) + RegimeGatedQRF( + n_estimators=n_estimators, + seed=segment_seed, + gate_calibration=gate_calibration, + ) for segment_seed in segment_seeds ) raw = pd.DataFrame(index=recipient_encoded.index) fit_records: list[FitWeightRecord] = [] + outcomes: dict[str, str] = {} def run_segment( base_predictors: Sequence[str], @@ -983,6 +1008,8 @@ def run_segment( f"{UK_WAS_WEALTH_FIT_NAME}:{target}", result.weight_kind ) ) + if gate_calibration != UK_DEFAULT_GATE_CALIBRATION: + outcomes.update(gate_outcomes(UK_WAS_WEALTH_FIT_NAME, result.fitted)) segment_raw[target] = result.raw_draw raw.loc[recipient_rows.index, target] = np.asarray( result.raw_draw, dtype=float @@ -995,7 +1022,7 @@ def derive_total(total: str) -> None: base = encoded_predictors run_segment(base, ("owned_land",)) if segments == 1: - return _partial_result(raw, fit_records, segment_seeds) + return _partial_result(raw, fit_records, segment_seeds, outcomes) recipient_encoded["owned_land"] = raw["owned_land"] run_segment( (*base, "owned_land"), @@ -1003,7 +1030,7 @@ def derive_total(total: str) -> None: stratum=UK_WAS_STRATIFIED_TARGETS["main_residence_value"], ) if segments == 2: - return _partial_result(raw, fit_records, segment_seeds) + return _partial_result(raw, fit_records, segment_seeds, outcomes) recipient_encoded["main_residence_value"] = raw["main_residence_value"] run_segment( (*base, "owned_land", "main_residence_value"), @@ -1015,7 +1042,7 @@ def derive_total(total: str) -> None: ) derive_total("property_wealth") if segments == 3: - return _partial_result(raw, fit_records, segment_seeds) + return _partial_result(raw, fit_records, segment_seeds, outcomes) donor_encoded["corporate_wealth"] = donor_encoded["corporate_wealth"].astype(float) donor_encoded["private_pension_wealth"] = donor_encoded[ "private_pension_wealth" @@ -1034,7 +1061,7 @@ def derive_total(total: str) -> None: ) derive_total("corporate_wealth") if segments == 4: - return _partial_result(raw, fit_records, segment_seeds) + return _partial_result(raw, fit_records, segment_seeds, outcomes) recipient_encoded["private_pension_wealth"] = raw["private_pension_wealth"] recipient_encoded["corporate_wealth"] = raw["corporate_wealth"] # Downstream targets condition on both components, carrying the @@ -1057,7 +1084,7 @@ def derive_total(total: str) -> None: ) derive_total("gross_financial_wealth") if segments == 5: - return _partial_result(raw, fit_records, segment_seeds) + return _partial_result(raw, fit_records, segment_seeds, outcomes) prior_outputs = tuple( column for column in UK_WAS_WEALTH_OUTPUT_COLUMNS @@ -1071,7 +1098,7 @@ def derive_total(total: str) -> None: stratum=UK_WAS_STRATIFIED_TARGETS["main_residence_mortgage"], ) if segments == 6: - return _partial_result(raw, fit_records, segment_seeds) + return _partial_result(raw, fit_records, segment_seeds, outcomes) recipient_encoded["main_residence_mortgage"] = raw["main_residence_mortgage"] # The mortgages on other property are held on every tenure (an outright # owner's or a renter's buy-to-let), so they are drawn without a stratum @@ -1082,12 +1109,12 @@ def derive_total(total: str) -> None: ) derive_total("mortgage_debt") if segments == 7: - return _partial_result(raw, fit_records, segment_seeds) + return _partial_result(raw, fit_records, segment_seeds, outcomes) recipient_encoded["mortgage_debt"] = raw["mortgage_debt"] run_segment((*base, *prior_outputs, "mortgage_debt"), ("consumer_debt",)) raw["net_financial_wealth"] = derived_net_financial_wealth(raw) if segments == 8: - return _partial_result(raw, fit_records, segment_seeds) + return _partial_result(raw, fit_records, segment_seeds, outcomes) # The appended draws (microcosm#1095): each from the holders of its column # only, conditioned on everything the chain drew; nothing before them # reads them. @@ -1106,7 +1133,7 @@ def derive_total(total: str) -> None: holders=UK_WAS_HOLDER_STRATA[UK_WAS_DIRECT_SHARE_FRACTION_COLUMN], ) if segments == 9: - return _partial_result(raw, fit_records, segment_seeds) + return _partial_result(raw, fit_records, segment_seeds, outcomes) debt_predictors = ( *base, *prior_outputs, @@ -1121,7 +1148,7 @@ def derive_total(total: str) -> None: holders=UK_WAS_HOLDER_STRATA[residential], ) if segments == 10: - return _partial_result(raw, fit_records, segment_seeds) + return _partial_result(raw, fit_records, segment_seeds, outcomes) recipient_encoded[residential] = raw[residential] run_segment( (*debt_predictors, residential), @@ -1139,6 +1166,7 @@ def derive_total(total: str) -> None: ], fit_weight_records=tuple(fit_records), segment_seeds=segment_seeds, + gate_outcomes=outcomes, ) @@ -1167,6 +1195,7 @@ def _partial_result( raw: pd.DataFrame, fit_records: list[FitWeightRecord], segment_seeds: tuple[int, ...], + outcomes: Mapping[str, str] | None = None, ) -> UKWASWealthImputationResult: produced = [ column @@ -1181,6 +1210,7 @@ def _partial_result( draws=raw.loc[:, produced], fit_weight_records=tuple(fit_records), segment_seeds=segment_seeds, + gate_outcomes=dict(outcomes or {}), ) diff --git a/packages/microcosm-build/tests/engine/uk/test_uk_spi_income.py b/packages/microcosm-build/tests/engine/uk/test_uk_spi_income.py index e0022e4e40..5b27175153 100644 --- a/packages/microcosm-build/tests/engine/uk/test_uk_spi_income.py +++ b/packages/microcosm-build/tests/engine/uk/test_uk_spi_income.py @@ -321,12 +321,14 @@ def predict(self, predictors): return result class CapturingQRF(_FakeQRF): - def fit(self, frame, predictors, targets, *, weights): + def fit(self, frame, predictors, targets, *, weights, groups=None): if "state_pension_reported" in targets: captured["training"] = frame.table("person")[ "state_pension_receipt" ].to_numpy() - return super().fit(frame, predictors, targets, weights=weights) + return super().fit( + frame, predictors, targets, weights=weights, groups=groups + ) monkeypatch.setattr(_FakeFittedQRF, "predict", predict) monkeypatch.setattr(spi_income, "QRF", CapturingQRF) diff --git a/packages/microcosm-build/tests/engine/uk/test_uk_spi_permitted_work_limit.py b/packages/microcosm-build/tests/engine/uk/test_uk_spi_permitted_work_limit.py index 1522761e22..732bfbac7f 100644 --- a/packages/microcosm-build/tests/engine/uk/test_uk_spi_permitted_work_limit.py +++ b/packages/microcosm-build/tests/engine/uk/test_uk_spi_permitted_work_limit.py @@ -29,6 +29,8 @@ def test_the_jsa_limits_are_the_engines_rates_for_the_year() -> None: assert (limit.jsa_amount_under_25, limit.jsa_amount_from_25) == (71.7, 90.5) assert limit.jsa_earnings_disregard == 5.0 assert limit.jsa_remunerative_hours == 16.0 + # Reg 81's GBP 50 a week, above which pension payments come off JSA. + assert limit.jsa_pension_disregard == 50.0 later = uk_spi_permitted_work_limit(2025) assert (later.jsa_amount_under_25, later.jsa_amount_from_25) == (72.9, 92.05) assert list(limit.jsa_amount([24, 25])) == [71.7, 90.5] diff --git a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py index f68ce04982..0d39e0eb33 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py @@ -23,8 +23,9 @@ def test_semantic_hash_has_golden_vector_and_surface_separation(tmp_path) -> Non # acs_transfer's attested bytes again. # The ACS SSI disability-criteria stage (microcosm#1022) moves # ssi_disability_criteria's attested bytes. + # The opt-in cross-fitted gate calibration moves the fit kernels' bytes. assert first.spec_sha256 == ( - "5892f4b1e6267b840e1f1528191c0f7c8e92e3089060dbcac2c74274d8073b84" + "800eb80fb737f304df33c3f856ea512fa7f8a4bc45a8c456e60a9514c1026e69" ) second_root = _rich_minimal(tmp_path / "xy", note="second", store="local:b") diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_company_cars.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_company_cars.py index 33ebb38e45..2116d76cbb 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_company_cars.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_company_cars.py @@ -972,12 +972,15 @@ def predict_from_uniforms(self, predictors, *, quantiles, sign_uniforms): {salary_sacrifice.SALSAC_OUTPUT: 0.0}, index=predictors.index ) + def gate_outcomes(self) -> dict[str, str]: + return {salary_sacrifice.SALSAC_OUTPUT: "cross_fitted"} + class _NoSacrificeForest: - def __init__(self, *, n_estimators: int, seed: int) -> None: + def __init__(self, *, n_estimators: int, seed: int, gate_calibration: str) -> None: pass - def fit(self, frame, predictors, targets, *, weights): + def fit(self, frame, predictors, targets, *, weights, groups): return _NoSacrifice() diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_etb_services.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_etb_services.py index d62ce38521..21f78b2baf 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_etb_services.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_etb_services.py @@ -89,9 +89,10 @@ def test_household_grain_predictors_match_per_capita_round_trip_identity() -> No def test_etb_services_chain_order_and_records(monkeypatch: pytest.MonkeyPatch) -> None: class _FakeModel: - def __init__(self, *, n_estimators, seed): + def __init__(self, *, n_estimators, seed, gate_calibration): assert n_estimators == 100 assert seed == 0 + assert gate_calibration == "in_sample" self.calls = [] def start_chain(self, donor, predictors, targets, *, weights): diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_graph.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_graph.py index bee9da35f7..40698aa6f6 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_graph.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_graph.py @@ -468,11 +468,12 @@ def test_property_components_reads_cover_the_stage_inputs() -> None: def test_spi_benefit_coherence_reads_cover_its_work_tests() -> None: """The contributory awards' work tests read the copy's earnings and its - twin's hours, and the receipt counts by source household: the node gets - only its declared cells (the 4 November b5j spine failed at the node - before the hours followed).""" + twin's hours, and the receipt reads its pension payments and counts by + source household: the node gets only its declared cells (the 4 November + b5j spine failed at the node before the hours followed).""" from microcosm.build.uk_runtime.graph import _STAGE_CONSUMES from microcosm.build.uk_runtime.spi_benefit_coherence import ( + SPI_PENSION_PAYMENTS_COLUMN, SPI_WITHIN_LIMIT_EARNINGS_COLUMNS, SPI_WITHIN_LIMIT_HOURS_COLUMN, SPI_WITHIN_LIMIT_REPORT_COLUMNS, @@ -486,6 +487,7 @@ def test_spi_benefit_coherence_reads_cover_its_work_tests() -> None: *SPI_WITHIN_LIMIT_REPORT_COLUMNS, *SPI_WITHIN_LIMIT_EARNINGS_COLUMNS, SPI_WITHIN_LIMIT_HOURS_COLUMN, + SPI_PENSION_PAYMENTS_COLUMN, ) } | {("household", "household_source_id")} assert required <= declared, sorted(required - declared) diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_identity_stability_receipts.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_identity_stability_receipts.py index 9b876c8b67..3154344f66 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_identity_stability_receipts.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_identity_stability_receipts.py @@ -177,8 +177,8 @@ def test_nhs_receipt_uses_stage_time_disaggregated_age( self, monkeypatch: pytest.MonkeyPatch ) -> None: class _FakeModel: - def __init__(self, *, n_estimators, seed): - del n_estimators, seed + def __init__(self, *, n_estimators, seed, gate_calibration): + del n_estimators, seed, gate_calibration def start_chain(self, donor, predictors, targets, *, weights): del donor, predictors, weights diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_lcfs_consumption.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_lcfs_consumption.py index a83f2871d3..79da782909 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_lcfs_consumption.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_lcfs_consumption.py @@ -436,6 +436,59 @@ def test_appending_the_excise_shares_moves_no_spend_draw() -> None: assert ((shares >= 0.0) & (shares <= 1.0)).all() +def test_the_chain_fits_the_gate_calibration_it_declares(monkeypatch) -> None: + """The committed chain cross-fits its gates; an undeclared one stays in sample.""" + + import dataclasses + + import microcosm.fit + from microcosm.build.country_spec import load_country_spec + from microcosm.build.uk_runtime.lcfs_consumption import _qrf_gate_calibration + + stage = load_country_spec("uk").sources.stage_map()["lcfs_consumption"] + assert _qrf_gate_calibration(stage) == "cross_fitted" + undeclared = { + key: value + for key, value in next( + operation.parameters + for operation in stage.operations + if operation.kind == "fit_weighted_qrf_chain" + ).items() + if key != "gate_calibration" + } + plain = dataclasses.replace( + stage, + operations=tuple( + dataclasses.replace(operation, parameters=undeclared) + if operation.kind == "fit_weighted_qrf_chain" + else operation + for operation in stage.operations + ), + ) + assert _qrf_gate_calibration(plain) == "in_sample" + + built = [] + real = microcosm.fit.RegimeGatedQRF + + def recording(**kwargs): + built.append(kwargs.get("gate_calibration")) + return real(**kwargs) + + monkeypatch.setattr(microcosm.fit, "RegimeGatedQRF", recording) + person, household = _synthetic_lcfs_donor() + donor = clean_lcfs_consumption_table(person, household) + recipient = donor.iloc[:20].loc[:, list(UK_LCFS_CONSUMPTION_PREDICTORS)] + impute_lcfs_consumption( + donor, + recipient, + seed=0, + n_estimators=2, + record_ids=np.arange(1, 21), + gate_calibration=_qrf_gate_calibration(stage), + ) + assert built == ["cross_fitted"] + + def test_excise_spending_splits_each_drawn_total() -> None: from microcosm.build.uk_runtime.lcfs_consumption import excise_spending @@ -4441,7 +4494,7 @@ def test_stage_tops_up_the_gambling_keys_when_declared(monkeypatch) -> None: "gambling_participation", { "maximum_stratum_shortfall": 0.01, - "amount_scale_bounds": [0.5, 2.5], + "amount_scale_bounds": [0.3, 2.5], "required_support_band": "30+", }, ), diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_nts_bus_travel.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_nts_bus_travel.py index d818493919..a0ceecd333 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_nts_bus_travel.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_nts_bus_travel.py @@ -635,6 +635,21 @@ def test_band_draw_is_identity_keyed_rounded_and_within_the_donor_range() -> Non assert (second.band == first.band[order]).all() +def test_cross_fitted_band_refuses_a_donor_without_households() -> None: + # Row folds would split a household's members between fold gates, so a + # cross-fitted gate refuses a donor it cannot fold by household. + household, individual, trip = _synthetic_nts() + donor = clean_nts_travel_tables(household, individual, trip, columns=_columns()) + with pytest.raises(NTSBusTravelError, match="household_id"): + impute_bus_use_band( + donor.person.drop(columns="household_id"), + pd.DataFrame(), + seed=0, + n_estimators=4, + gate_calibration="cross_fitted", + ) + + def test_recipient_income_band_is_hbai_gross_income() -> None: # microcosm#1164: the NTS band is gross cash income, so the recipient adds # the engine's HBAI deductions back to its HBAI net income; the engine's diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_qrf_gates.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_qrf_gates.py new file mode 100644 index 0000000000..948c7940e9 --- /dev/null +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_qrf_gates.py @@ -0,0 +1,78 @@ +"""The UK stages' declared QRF sign-gate calibration (microcosm#1359).""" + +from __future__ import annotations + +from microcosm.build.country_spec import load_country_spec +from microcosm.build.uk_runtime.qrf_gates import ( + declared_gate_calibration, + gate_outcomes, + pooled_gate_outcomes, +) + +#: Every UK operation whose QRF draws a sign through the gate, as +#: ``(stage, operation kind)``; each declares the cross-fitted gate. +CROSS_FITTED_OPERATIONS = frozenset( + { + ("etb_services", "fit_weighted_qrf_chain"), + ("hmrc_spi_income_spine", "fit_weighted_qrf_stage1"), + ("hmrc_spi_income_spine", "fit_weighted_qrf_stage2"), + ("lcfs_consumption", "fit_weighted_qrf_chain"), + ("lcfs_consumption", "impute_prepayment_meter"), + ("lcfs_consumption", "redraw_zero_road_fuel"), + ("nts_bus_travel", "impute_bus_use_band"), + ("salary_sacrifice", "fit_weighted_qrf"), + ("spi_housing_shell", "impute_spi_housing_shell"), + ("uc_reporter_redraw", "redraw_spi_reported_uc"), + ("was_wealth", "fit_weighted_qrf_chain"), + } +) + + +class _Fitted: + def __init__(self, outcomes: dict[str, str | None]) -> None: + self._outcomes = outcomes + + def gate_outcomes(self) -> dict[str, str | None]: + return dict(self._outcomes) + + +def test_the_gated_uk_fits_declare_the_cross_fitted_gate() -> None: + stages = load_country_spec("uk").sources.stage_map() + declared = { + (stage.stage, operation.kind): operation.parameters["gate_calibration"] + for stage in stages.values() + for operation in stage.operations + if "gate_calibration" in operation.parameters + } + assert set(declared) == CROSS_FITTED_OPERATIONS + assert set(declared.values()) == {"cross_fitted"} + for stage, kind in CROSS_FITTED_OPERATIONS: + assert declared_gate_calibration(stages[stage], kind) == "cross_fitted" + + +def test_an_undeclared_or_unmatched_operation_keeps_the_in_sample_gate() -> None: + stage = load_country_spec("uk").sources.stage_map()["hmrc_spi_income_spine"] + assert declared_gate_calibration(stage, "no_such_operation") == "in_sample" + assert declared_gate_calibration(stage, "fit_weighted_qrf_stage2", seed=43) == ( + "cross_fitted" + ) + assert declared_gate_calibration(stage, "fit_weighted_qrf_stage2", seed=0) == ( + "in_sample" + ) + + +def test_pooled_outcomes_name_one_outcome_or_count_each() -> None: + folds = [ + _Fitted({"a": "cross_fitted", "b": "cross_fitted", "c": None}), + _Fitted({"a": "cross_fitted", "b": "in_sample_thin_class", "c": None}), + _Fitted({"a": "cross_fitted", "b": "cross_fitted", "c": None}), + ] + assert gate_outcomes("fit", folds[1]) == { + "fit:a": "cross_fitted", + "fit:b": "in_sample_thin_class", + } + assert pooled_gate_outcomes("fit", folds) == { + "fit:a": "cross_fitted", + "fit:b": "cross_fitted 2, in_sample_thin_class 1", + } + assert pooled_gate_outcomes("fit", []) == {} diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_salary_sacrifice.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_salary_sacrifice.py index 679e9692c0..fe663bfa86 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_salary_sacrifice.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_salary_sacrifice.py @@ -45,18 +45,24 @@ def predict_from_uniforms( assert uniforms.shape == (len(predictors),) return pd.DataFrame({SALSAC_OUTPUT: self.value}, index=predictors.index) + def gate_outcomes(self) -> dict[str, str]: + return {SALSAC_OUTPUT: "cross_fitted"} + class _FakeQRF: training_frames: list[pd.DataFrame] = [] - def __init__(self, *, n_estimators: int, seed: int) -> None: + def __init__(self, *, n_estimators: int, seed: int, gate_calibration: str) -> None: assert n_estimators == 100 assert seed == 42 + assert gate_calibration == "cross_fitted" - def fit(self, frame, predictors, targets, *, weights): + def fit(self, frame, predictors, targets, *, weights, groups): assert predictors == ["age", "employment_income"] assert targets == [SALSAC_OUTPUT] assert weights == "_fit_weight" + # One household key per training person, for the gate's folds. + assert len(groups) == len(frame) self.training_frames.append(frame.copy()) return _Fitted() @@ -490,8 +496,8 @@ def predict_from_uniforms(self, predictors, *, quantiles, sign_uniforms): return pd.DataFrame({SALSAC_OUTPUT: 0.0}, index=predictors.index) class _KeyedQRF(_FakeQRF): - def fit(self, frame, predictors, targets, *, weights): - super().fit(frame, predictors, targets, weights=weights) + def fit(self, frame, predictors, targets, *, weights, groups): + super().fit(frame, predictors, targets, weights=weights, groups=groups) return _Keyed() monkeypatch.setattr(salary_sacrifice, "QRF", _KeyedQRF) diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_benefit_coherence.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_benefit_coherence.py index 72b4957e2e..965cc8575b 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_benefit_coherence.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_benefit_coherence.py @@ -17,6 +17,7 @@ SPI_WITHIN_LIMIT_REPORT_COLUMNS, SPI_ZEROED_REPORT_COLUMNS, UKSPIPermittedWorkLimit, + _within_limit_receipt, apply_spi_benefit_coherence, assert_spi_benefit_coherence_stage_parameters, ) @@ -52,8 +53,8 @@ adult_age=18, state_pension_age=66, instant="2024-01-01", source="test" ) #: The 2024-25 limits: ESA's permitted work (GBP 183.50 a week, GBP 9,542 a -#: year, under 16 hours) and JSA's age-related amounts, GBP 5 disregard and -#: 16-hour remunerative work. +#: year, under 16 hours) and JSA's age-related amounts, GBP 5 disregard, +#: 16-hour remunerative work and GBP 50 pension disregard. LIMIT = UKSPIPermittedWorkLimit( esa_weekly_limit=183.5, esa_hours_limit=16.0, @@ -61,6 +62,7 @@ jsa_amount_from_25=90.5, jsa_earnings_disregard=5.0, jsa_remunerative_hours=16.0, + jsa_pension_disregard=50.0, year=2024, source="test", ) @@ -99,7 +101,12 @@ def _person( support_source_id_column("person"): source_id, } row.update(dict.fromkeys(REPORT_COLUMNS, 0.0)) - row.update(employment_income=0.0, self_employment_income=0.0, hours_worked=0.0) + row.update( + employment_income=0.0, + self_employment_income=0.0, + hours_worked=0.0, + private_pension_income=0.0, + ) row.update(reports) return row @@ -418,6 +425,124 @@ def test_the_within_limit_receipt_gives_figures_on_three_households() -> None: assert receipt["weighted_amount_before"] == 0.0 +def test_the_receipt_gives_the_awards_resting_on_pension_payments() -> None: + # Each copy carries GBP 300 a week of pension, above both thresholds: ESA + # Regs 2008 reg 74 would take half the GBP 215 above GBP 85 off each + # copy's ESA, but the awards stand, and the receipt gives how much rests + # on them (Vahid's review of microcosm#1426). + pensions = { + copy: {"private_pension_income": 300.0 * 52} for copy in ("105", "106", "107") + } + frame = _with( + _frame(), + **{ + "11": {"esa_contrib_reported": 100.0}, + "21": {"esa_contrib_reported": 200.0}, + "31": { + "esa_contrib_reported": 300.0, + "receives_benefits_in_own_right": True, + }, + }, + **pensions, + ) + result = _apply(frame) + person = result.frame.table("person").set_index("person_id") + + assert person.loc[[105, 106, 107], "esa_contrib_reported"].tolist() == [ + 100.0, + 200.0, + 300.0, + ] + receipt = result.restored_within_earnings_limit["esa_contrib_reported"] + # Each copy's weight is its household's: 1, 2 and 3. + assert receipt["pension_payments_above_threshold"] == { + "source_households": "3-9", + "weighted_amount_after": pytest.approx(1_400.0), + "weighted_reporters_after": pytest.approx(6.0), + } + assert result.permitted_work_limit["jsa_pension_disregard"] == 50.0 + assert result.permitted_work_limit["esa_pension_payments_threshold"] == 85.0 + + +@pytest.mark.parametrize( + "column,weekly_pension,above", + [ + # JSA Regs 1996 reg 81 takes off the pension payments above GBP 50 a + # week and ESA Regs 2008 reg 74 half of those above GBP 85: at the + # threshold itself nothing would come off. + ("jsa_contrib_reported", 50.0, False), + ("jsa_contrib_reported", 50.01, True), + ("esa_contrib_reported", 85.0, False), + ("esa_contrib_reported", 85.01, True), + ], +) +def test_the_pension_thresholds_are_reg_81s_and_reg_74s( + column, weekly_pension, above +) -> None: + frame = _with( + _frame(), + **{ + "21": {column: 700.0}, + "106": {"private_pension_income": weekly_pension * 52}, + }, + ) + result = _apply(frame) + person = result.frame.table("person").set_index("person_id") + + # Neither award is reduced for pension payments. + assert person.loc[106, column] == 700.0 + block = result.restored_within_earnings_limit[column][ + "pension_payments_above_threshold" + ] + # The one copy above the threshold rests on one source household. + assert block["source_households"] == ("<3" if above else 0) + + +def _pension_block(above, sources) -> dict[str, object]: + """The pension block of a receipt on six copies each taking GBP 100.""" + + taking = np.ones(6, dtype=bool) + return _within_limit_receipt( + old=np.zeros(6), + new=np.full(6, 100.0), + spi=taking, + twin_reports=taking, + outside=~taking, + reduced=~taking, + pension_above=np.asarray(above, dtype=bool), + weights=np.arange(1.0, 7.0), + sources=np.asarray(sources), + )["pension_payments_above_threshold"] + + +@pytest.mark.parametrize( + "above,sources,expected", + [ + # All six copies above the threshold, on six source households of + # weights 1 to 6. + ([1] * 6, range(6), ("3-9", 2_100.0, 21.0)), + # Three above beside three below. + ([1, 1, 1, 0, 0, 0], range(6), ("3-9", 600.0, 6.0)), + # Four above beside two: the four's figures beside the six's would + # give back the two's. + ([1, 1, 1, 1, 0, 0], range(6), ("3-9", "<3", "<3")), + ([1, 1, 0, 0, 0, 0], range(6), ("<3", "<3", "<3")), + ([0] * 6, range(6), (0, 0.0, 0.0)), + # Six copies of two source households count as two. + ([1] * 6, [0, 0, 0, 1, 1, 1], ("<3", "<3", "<3")), + ], +) +def test_the_pension_figures_withhold_what_rests_on_one_or_two_households( + above, sources, expected +) -> None: + support, amount, reporters = expected + assert _pension_block(above, list(sources)) == { + "source_households": support, + "weighted_amount_after": amount, + "weighted_reporters_after": reporters, + } + + def test_spi_rows_take_injury_service_and_bereavement_reports_from_their_twin() -> None: result = _apply(_frame()) person = result.frame.table("person").set_index("person_id") diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_income.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_income.py index ea0fdfa488..75c92c59c4 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_income.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_income.py @@ -1360,3 +1360,57 @@ def test_floored_rows_keep_the_tape_pay_as_their_year_of_pay() -> None: spi_income._keep_floored_rows_year_of_pay( person.copy(), uplift=pd.Series([20_000.0], index=[10]) ) + + +def test_each_spi_fit_takes_its_operations_gate_calibration( + monkeypatch, tmp_path +) -> None: + """The tape forest and the FRS reference forests take stage 1's declared + gate, stage 2 its own (microcosm#1359): the reference gate places a twin's + observed sign where the tape gate reads it, so they are calibrated alike. + The FRS fits fold by household; the tape's records stand alone.""" + + support = _dead_support() + donor_path = tmp_path / SPI_DONOR_FILENAME + _write_donor(donor_path) + monkeypatch.setattr(spi_income, "QRF", _FakeQRF) + monkeypatch.setattr(_FakeQRF, "fit_gates", []) + _bypass_reviewed_donor_identity(monkeypatch) + real_cross_fit = spi_income.cross_fit_transport + monkeypatch.setattr( + spi_income, + "cross_fit_transport", + lambda *args, **kwargs: real_cross_fit( + *args, **{**kwargs, "allow_in_sample": True} + ), + ) + try: + result = impute_uk_spi_income_support( + support, + donor_path, + seed=9, + n_estimators=3, + donor_sample_size=None, + state_pension_age=66, + allow_in_sample_reference=True, + stage1_gate_calibration="cross_fitted", + ) + except ImportError: + result = None + (tape_kind, tape_gate, tape_groups), *frs_fits = _FakeQRF.fit_gates + assert (tape_kind, tape_gate, tape_groups) == ("design", "cross_fitted", None) + *reference_fits, stage2_fit = frs_fits + assert reference_fits + assert {gate for _, gate, _ in reference_fits} == {"cross_fitted"} + assert stage2_fit[1] == "in_sample" + households = set(support.person["person_household_id"]) + for kind, _, groups in frs_fits: + assert kind == "importance" + assert groups is not None and set(groups) <= households + if result is not None: + assert result.gate_outcomes + assert {key.split(":", 1)[0] for key in result.gate_outcomes} == { + spi_income.SPI_DONOR_FIT_NAME, + spi_income.SPI_TRANSPORT_FIT_NAME, + } + assert set(result.gate_outcomes.values()) == {"cross_fitted"} diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_spine.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_spine.py index 53e439b256..26b0a7e8b5 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_spine.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_spi_spine.py @@ -321,12 +321,15 @@ def test_preclone_support_gate_passes_at_limit_and_fails_above() -> None: class _FakeQRF: events: list[tuple[str, tuple[str, ...], list[float]]] = [] - def __init__(self, n_estimators: int, seed: int) -> None: + def __init__( + self, n_estimators: int, seed: int, gate_calibration: str = "in_sample" + ) -> None: self.seed = seed + self.gate_calibration = gate_calibration self.targets: tuple[str, ...] = () self.weight_kind = "unknown" - def fit(self, frame, predictors, targets, weights): + def fit(self, frame, predictors, targets, weights, groups=None): self.targets = tuple(targets) self.weight_kind = weights label = ( @@ -347,6 +350,10 @@ def fit(self, frame, predictors, targets, weights): def regimes(self): return dict.fromkeys(self.targets, "zero_inflated_positive") + def gate_outcomes(self): + outcome = None if self.gate_calibration == "in_sample" else "cross_fitted" + return dict.fromkeys(self.targets, outcome) + def sign_classes(self, target): return (0, 1) diff --git a/packages/microcosm-build/tests/engine_free/uk/test_uk_was_wealth.py b/packages/microcosm-build/tests/engine_free/uk/test_uk_was_wealth.py index e6599aeace..b436e2e945 100644 --- a/packages/microcosm-build/tests/engine_free/uk/test_uk_was_wealth.py +++ b/packages/microcosm-build/tests/engine_free/uk/test_uk_was_wealth.py @@ -691,8 +691,9 @@ def test_was_imputer_uses_checkpointed_chain_segments( seeds = [] class FakeQRF: - def __init__(self, *, n_estimators, seed): + def __init__(self, *, n_estimators, seed, gate_calibration): assert n_estimators == 7 + assert gate_calibration == "in_sample" seeds.append(seed) def start_chain(self, donor, predictors, targets, *, weights): diff --git a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py index 0a4a47f834..6cda02ee77 100644 --- a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py @@ -350,7 +350,8 @@ def capture_equality(expected: object, actual: object) -> None: # microcosm#1251's passive partnership/S-corp leaf in puf_support moves it. # microcosm#1259's recipient-share bound in puf_support moves it again. # microcosm#1261's entity split of line 32 moves it too. - "spec_sha256": 'fe3901b59a02c22978cc57a296afddfca91732f952c8ebc0ed9d44f3bfe6bf16', + # The opt-in cross-fitted gate calibration in microcosm.fit.qrf moves it. + "spec_sha256": 'a6bb8fc46541352972195992cdc1b2401637322d353992d6321f204d5c74245a', }, } diff --git a/packages/microcosm-data/src/microcosm/data/contract.py b/packages/microcosm-data/src/microcosm/data/contract.py index 3fd2deb90f..e794b3006c 100644 --- a/packages/microcosm-data/src/microcosm/data/contract.py +++ b/packages/microcosm-data/src/microcosm/data/contract.py @@ -475,13 +475,13 @@ def _is_hierarchy_diagnostics_version(value: object) -> bool: # fingerprint derives from the manifest digest. Editing the spec moves all # three here in the same reviewed change. _UK_GATE_BATTERY_POLICY_SHA256 = ( - "6a215516d677a2cd071ebeaa144ff1a2b8eda8daf555930ece1e77be2492464c" + "7c20944f06349bca285eb3f8e8e696cfef99c356b7685d990e36f9e53c019753" ) _UK_GATE_BATTERY_GATES_MANIFEST_SHA256 = ( - "8beb438e98a93b4a638bfd6e559c550bffb7815dc50056db1b6cda0c256b5d46" + "d57afaa831f0599d53b23b653119f4508eecf9ceb97aa7f1d16197a93824cd3c" ) _UK_GATE_BATTERY_SPEC_FINGERPRINT = ( - "7b47b996571fce291619893c1aa4c709a3b2ff27499a5dbf7328402155b43a05" + "6b9c4d1cfb177629672c7ee9daa659422261b2e0c15b8715ca184b3d3bdc4ff6" ) #: Spec entry id -> the legacy gate name whose observable detail checks #: apply unchanged (the battery re-keys the report by entry id; the gate @@ -1006,10 +1006,10 @@ def _uk_line_cut_tag_re(release_id: str) -> re.Pattern[str] | None: _UK_CERTIFICATION_PART_DIGESTS: Mapping[str, Mapping[str, str]] = { "spine": { "gates_manifest_sha256": ( - "680c75be586f52cfbc65ef2cbd65e07ca56e75af55bd16e006a1fcb5457091b1" + "970974c07b1102a208c9ee12962d42d540adc1966789219cb5ea18718000a16e" ), "policy_sha256": ( - "e09d8f90dc643caa77c597670c2a738576a0a44c5119999c3c1d66dfe3fd66d1" + "6416dda130412d6ceaeac2450a70befa694cbf582dee609ca34329a56849762b" ), }, "calibration_seam": { diff --git a/packages/microcosm-data/tests/engine_free/shared/test_contract.py b/packages/microcosm-data/tests/engine_free/shared/test_contract.py index 6c1736bbfa..fb30959394 100644 --- a/packages/microcosm-data/tests/engine_free/shared/test_contract.py +++ b/packages/microcosm-data/tests/engine_free/shared/test_contract.py @@ -224,13 +224,13 @@ def _trusted_terminal_gate_signing_key(monkeypatch) -> None: UK_GATE_BATTERY_PRODUCER = "microcosm.build.gate_battery" UK_GATE_BATTERY_SIGNING_KEY_ENV = "MICROCOSM_UK_TERMINAL_GATE_SIGNING_KEY" UK_GATE_BATTERY_POLICY_SHA256 = ( - "6a215516d677a2cd071ebeaa144ff1a2b8eda8daf555930ece1e77be2492464c" + "7c20944f06349bca285eb3f8e8e696cfef99c356b7685d990e36f9e53c019753" ) UK_GATE_BATTERY_GATES_MANIFEST_SHA256 = ( - "8beb438e98a93b4a638bfd6e559c550bffb7815dc50056db1b6cda0c256b5d46" + "d57afaa831f0599d53b23b653119f4508eecf9ceb97aa7f1d16197a93824cd3c" ) UK_GATE_BATTERY_SPEC_FINGERPRINT = ( - "7b47b996571fce291619893c1aa4c709a3b2ff27499a5dbf7328402155b43a05" + "6b9c4d1cfb177629672c7ee9daa659422261b2e0c15b8715ca184b3d3bdc4ff6" ) UK_GATE_BATTERY_DEGENERATE_EVIDENCE_SHA256 = ( "f246388de42654dd68dbbb40c42282001b5b0a8bf48976162bcb1199085cb1d3" diff --git a/packages/microcosm-fit/src/microcosm/fit/__init__.py b/packages/microcosm-fit/src/microcosm/fit/__init__.py index 63521225da..334678386f 100644 --- a/packages/microcosm-fit/src/microcosm/fit/__init__.py +++ b/packages/microcosm-fit/src/microcosm/fit/__init__.py @@ -87,6 +87,8 @@ def _assert_frame_compatible(version: str, required: tuple[int, int]) -> None: DEFAULT_ZERO_ATOL, ConditionalUniforms, FittedRegimeGatedQRF, + GateCalibration, + GateOutcome, QRFChainState, QRFChainStepResult, Regime, @@ -105,6 +107,7 @@ def fit( targets: list[str], *, weights: WeightSpec = DESIGN_WEIGHTS, + groups=None, **model_kwargs, ) -> FittedModel: """Fit the canonical conditional model over ``frame_or_df``. @@ -123,14 +126,16 @@ def fit( defaults to the owning entity's ``"design"`` weights. On a DataFrame: required — a weight column name or a weight vector. ``"none"`` fits unweighted — the only way to do so. + groups: Fold grouping for a cross-fitted gate (a column or a vector, + one entry per row); see :meth:`RegimeGatedQRF.fit`. **model_kwargs: Forwarded to :class:`RegimeGatedQRF` (e.g. - ``n_estimators``, ``zero_atol``, ``seed``). + ``n_estimators``, ``zero_atol``, ``seed``, ``gate_calibration``). Returns: A :class:`~microcosm.fit.model.FittedModel`. """ return RegimeGatedQRF(**model_kwargs).fit( - frame_or_df, predictors, targets, weights=weights + frame_or_df, predictors, targets, weights=weights, groups=groups ) @@ -149,6 +154,8 @@ def fit( "QRFChainState", "QRFChainStepResult", "Regime", + "GateCalibration", + "GateOutcome", "QRFCacheKey", "cache_path", "load_fitted_qrf_cache", diff --git a/packages/microcosm-fit/src/microcosm/fit/kernels.py b/packages/microcosm-fit/src/microcosm/fit/kernels.py index 8ec4940090..a385a2a222 100644 --- a/packages/microcosm-fit/src/microcosm/fit/kernels.py +++ b/packages/microcosm-fit/src/microcosm/fit/kernels.py @@ -17,7 +17,7 @@ import microcosm.fit.model as fit_model_module import microcosm.fit.qrf as qrf_module from microcosm.fit import fit as fit_qrf -from microcosm.fit.qrf import DEFAULT_N_ESTIMATORS, DEFAULT_ZERO_ATOL +from microcosm.fit.qrf import DEFAULT_N_ESTIMATORS, DEFAULT_ZERO_ATOL, GateCalibration from microcosm.graph import ( ROWS_ALL, Capabilities, @@ -66,6 +66,7 @@ _PARAMS = frozenset( { "donor_target", + "gate_calibration", "max_samples_leaf", "min_samples_leaf", "n_estimators", @@ -88,6 +89,7 @@ class _QRFRunSpec: zero_atol: float max_samples_leaf: int | float | None seed: int + gate_calibration: str = GateCalibration.IN_SAMPLE class QRFKernel(KernelBase): @@ -181,6 +183,7 @@ def run(self, context: KernelContext) -> KernelResult: zero_atol=spec.zero_atol, max_samples_leaf=spec.max_samples_leaf, seed=spec.seed, + gate_calibration=spec.gate_calibration, ) # Serialize before predict so the artifact can reproduce this first draw. model_bytes = pickle.dumps(fitted, protocol=pickle.HIGHEST_PROTOCOL) @@ -221,6 +224,11 @@ def run(self, context: KernelContext) -> KernelResult: np.average(target_values, weights=donor_weights) ), } + if spec.gate_calibration != GateCalibration.IN_SAMPLE: + # Named only when asked for, so an in-sample node's receipt is the + # same as before the option existed. + receipt["gate_calibration"] = spec.gate_calibration + receipt["gate_outcome"] = fitted.gate_outcomes()[spec.target] return KernelResult( columns={(spec.entity, spec.target): output}, artifacts={"model": model_bytes}, @@ -298,6 +306,18 @@ def _run_spec(self, context: KernelContext) -> _QRFRunSpec: "fit.qrf@1 max_samples_leaf must be an int, float, or None." ) + gate_calibration = context.params.get( + "gate_calibration", GateCalibration.IN_SAMPLE + ) + if gate_calibration not in ( + GateCalibration.IN_SAMPLE, + GateCalibration.CROSS_FITTED, + ): + raise ValueError( + f"fit.qrf@1 gate_calibration {gate_calibration!r} is not " + f"{GateCalibration.IN_SAMPLE!r} or {GateCalibration.CROSS_FITTED!r}." + ) + seed = self._seed(context) return _QRFRunSpec( entity=input_slice.entity, @@ -309,6 +329,7 @@ def _run_spec(self, context: KernelContext) -> _QRFRunSpec: zero_atol=float(zero_atol), max_samples_leaf=max_samples_leaf, seed=seed, + gate_calibration=gate_calibration, ) def _seed(self, context: KernelContext) -> int: diff --git a/packages/microcosm-fit/src/microcosm/fit/qrf.py b/packages/microcosm-fit/src/microcosm/fit/qrf.py index 01446085e6..1841677c72 100644 --- a/packages/microcosm-fit/src/microcosm/fit/qrf.py +++ b/packages/microcosm-fit/src/microcosm/fit/qrf.py @@ -27,6 +27,13 @@ resample would delete a vanishingly rare sign class outright (a positive row at weight 1 among thousands of zeros at weight 50 is drawn with probability ~4e-5), collapsing the gate to a single class that can never draw the missing sign. +A gate is calibrated on its own training rows only, unless the model is built +with ``gate_calibration="cross_fitted"`` (:class:`GateCalibration`): then it is +a gate per fold, mapped by a calibration fitted on their out-of-fold scores, so +a rare class is drawn at its rate on rows the gate was not fitted to. The rate +balance is exact on the pooled out-of-fold donor scores, not on any recipient +set, and in a chain a sign that changes moves later targets' amounts through +their predictors although the forests and the draw uniforms are the same. **Chaining.** Targets are imputed sequentially; each conditions on the predictors plus the targets already drawn, so the joint structure across @@ -77,6 +84,8 @@ "QRFChainState", "QRFChainStepResult", "Regime", + "GateCalibration", + "GateOutcome", "DEFAULT_N_ESTIMATORS", "DEFAULT_ZERO_ATOL", ] @@ -90,6 +99,73 @@ DEFAULT_ZERO_ATOL = 1e-6 +class GateCalibration: + """How a sign gate's class probabilities are calibrated. + + A row's sign class is drawn by placing its uniform on the gate's class + probabilities, so the share of rows drawn into a class is the gate's mean + probability of that class over those rows. Exposed as constants, like + :class:`Regime`, so a caller names its choice. + """ + + #: The gate as fitted: one boosted classifier, calibrated only on its own + #: training rows. Unregularised boosting memorises a rare class's training + #: rows, so on rows it was not fitted to (every recipient) its mean + #: probability of the rare class falls short of the class's weighted rate. + IN_SAMPLE = "in_sample" + #: Calibrated out of fold: the training rows are cut into folds stratified + #: by class, and a gate fitted the same way on all but one fold scores the + #: fold it left out. One weighted fit of a slope and a per-class offset on + #: those out-of-fold scores (Platt scaling, for two classes) maps every fold + #: gate's log-probabilities, and a row's probability is the mean of the + #: mapped fold gates. Each fold gate is mapped where it is calibrated, on + #: rows it was not fitted to, and the mapped out-of-fold probabilities' + #: weighted mean equals each class's weighted rate on those donor rows. + #: With ``groups``, whole groups (households) are dealt across the folds. + #: A target that cannot be cross-fitted keeps the in-sample gate, and + #: :meth:`FittedRegimeGatedQRF.gate_outcomes` says which (:class:`GateOutcome`). + CROSS_FITTED = "cross_fitted" + + +_GATE_CALIBRATIONS = frozenset( + {GateCalibration.IN_SAMPLE, GateCalibration.CROSS_FITTED} +) + + +class GateOutcome: + """The calibration a fitted sign gate actually has. + + :meth:`FittedRegimeGatedQRF.gate_outcomes` names one per gated target, so a + stage can record where a cross-fitted request could not be met. + """ + + #: The model asked for the in-sample gate. + IN_SAMPLE = "in_sample" + #: Cross-fitted and calibrated out of fold. + CROSS_FITTED = "cross_fitted" + #: Asked cross-fitted, but a class has fewer rows (or groups) than folds, + #: so it cannot be in every fold: the in-sample gate. + THIN_CLASS = "in_sample_thin_class" + #: Asked cross-fitted, but a fold's training rows carry no weight for a + #: class, so its fold gate could not learn it: the in-sample gate. + WEIGHTLESS_FOLD = "in_sample_weightless_fold" + #: Cross-fitted, but the calibration's rate balance could not be met (or the + #: out-of-fold ranking was worse than none): every row gets the weighted + #: class rates. + CLASS_RATES = "cross_fitted_class_rates" + + +#: Largest gap, in probability, between a calibrated class's weighted +#: out-of-fold mean and its weighted rate that the balance check accepts. +_GATE_BALANCE_TOLERANCE = 1e-6 + +#: Folds of a cross-fitted gate calibration. +_GATE_CROSS_FIT_FOLDS = 5 + +#: The smallest positive float, so a class probability of zero has a finite log. +_TINY = np.finfo(np.float64).tiny + + class Regime: """Sign-support regime labels for a numeric target. @@ -229,6 +305,283 @@ def _make_gate(seed: int) -> HistGradientBoostingClassifier: return HistGradientBoostingClassifier(random_state=seed) +def _log_proba(proba: np.ndarray) -> np.ndarray: + """Log class probabilities, a zero probability held at the smallest float.""" + return np.log(np.maximum(proba, _TINY)) + + +def _calibrated_proba( + log_proba: np.ndarray, slope: float, offsets: np.ndarray +) -> np.ndarray: + """Class probabilities proportional to ``exp(slope * log_proba + offsets)``.""" + logits = slope * log_proba + offsets + logits -= logits.max(axis=1, keepdims=True) + scaled = np.exp(logits) + return scaled / scaled.sum(axis=1, keepdims=True) + + +class _CrossFittedGate: + """Fold gates mapped by one out-of-fold calibration, their probabilities averaged. + + Exposes the two members the draws read from a gate, ``classes_`` and + ``predict_proba``, so every draw path takes it in place of the classifier. + """ + + def __init__( + self, + folds: Sequence[HistGradientBoostingClassifier], + slope: float, + offsets: np.ndarray, + ) -> None: + self.folds = tuple(folds) + self.slope = float(slope) + self.offsets = np.asarray(offsets, dtype=np.float64) + + @property + def classes_(self) -> np.ndarray: + return self.folds[0].classes_ + + def predict_proba(self, x: np.ndarray) -> np.ndarray: + total = np.zeros((len(x), len(self.offsets))) + for gate in self.folds: + total += _calibrated_proba( + _log_proba(gate.predict_proba(x)), self.slope, self.offsets + ) + return total / len(self.folds) + + +def _stratified_folds( + labels: np.ndarray, + folds: int, + rng: np.random.Generator, + groups: np.ndarray | None = None, +) -> np.ndarray: + """A fold per row: each class's rows, in random order, dealt round the folds. + + With ``groups`` (integer codes, one per row) whole groups are dealt instead, + so rows that share a group never sit on both sides of a fold. Each group is + dealt with the rarest class it contains, counted in groups, so a rare class + spreads across the folds as its rows would. + """ + assignment = np.empty(len(labels), dtype=np.int64) + if groups is None: + for value in np.unique(labels): + rows = rng.permutation(np.flatnonzero(labels == value)) + assignment[rows] = np.arange(len(rows)) % folds + return assignment + classes = np.unique(labels) + present = np.zeros((int(groups.max()) + 1, len(classes)), dtype=bool) + present[groups, np.searchsorted(classes, labels)] = True + rarity = present.sum(axis=0) + # Each group's stratum: the rarest of its classes (ties to the first). + stratum = np.where(present, rarity[None, :], np.iinfo(np.int64).max).argmin(axis=1) + group_fold = np.empty(len(present), dtype=np.int64) + for index in range(len(classes)): + members = rng.permutation(np.flatnonzero(stratum == index)) + group_fold[members] = np.arange(len(members)) % folds + assignment[:] = group_fold[groups] + return assignment + + +def _fit_gate_calibration( + log_proba: np.ndarray, label_index: np.ndarray, weights: np.ndarray +) -> tuple[float, np.ndarray, str]: + """Fit ``p_c ∝ exp(slope * log_proba_c + offset_c)`` by weighted likelihood. + + One slope shared by the classes and an offset per class (the first fixed + at zero): Platt scaling of the gate's logit for two classes. At the + optimum each offset's score equation makes the weighted mean of the + calibrated probabilities equal its class's weighted rate. Newton steps, + halved until the loss does not rise; the likelihood is concave, so they + converge from the identity map. + + The balance is checked at exit (:data:`_GATE_BALANCE_TOLERANCE`). Where + Newton's steps stall, as on saturated or constant scores, along which the + slope and the offsets are not identified, damped (Levenberg-Marquardt) + steps take over. If the balance still fails, or the slope is negative (an + out-of-fold ranking worse than none), every row gets the class rates. + + Args: + log_proba: Out-of-fold log class probabilities, one column per class. + label_index: Each row's class, as a column index of ``log_proba``. + weights: Per-row weights, with positive weight on every class. + + Returns: + ``(slope, offsets, outcome)`` with ``offsets[0] == 0`` and ``outcome`` + :attr:`GateOutcome.CROSS_FITTED` or :attr:`GateOutcome.CLASS_RATES`. + """ + n, k = log_proba.shape + w = np.asarray(weights, dtype=np.float64) / float(np.mean(weights)) + onehot = np.zeros((n, k)) + onehot[np.arange(n), label_index] = 1.0 + rows = np.arange(n) + rate = w @ onehot / w.sum() + + def unpack(theta: np.ndarray) -> tuple[float, np.ndarray]: + return float(theta[0]), np.concatenate([[0.0], theta[1:]]) + + def loss(theta: np.ndarray) -> float: + slope, offsets = unpack(theta) + logits = slope * log_proba + offsets + top = logits.max(axis=1) + log_total = top + np.log(np.exp(logits - top[:, None]).sum(axis=1)) + return float(w @ (log_total - logits[rows, label_index])) + + def derivatives(theta: np.ndarray) -> tuple[np.ndarray, np.ndarray]: + slope, offsets = unpack(theta) + proba = _calibrated_proba(log_proba, slope, offsets) + residual = proba - onehot + centred = log_proba - (proba * log_proba).sum(axis=1, keepdims=True) + gradient = np.concatenate( + [[w @ (residual * log_proba).sum(axis=1)], (w @ residual)[1:]] + ) + hessian = np.empty((k, k)) + hessian[0, 0] = w @ (proba * centred**2).sum(axis=1) + for c in range(1, k): + hessian[0, c] = hessian[c, 0] = w @ (proba[:, c] * centred[:, c]) + for d in range(1, k): + hessian[c, d] = w @ (proba[:, c] * (float(c == d) - proba[:, d])) + return gradient, hessian + + def balanced(theta: np.ndarray) -> bool: + slope, offsets = unpack(theta) + proba = _calibrated_proba(log_proba, slope, offsets) + gap = np.abs(w @ proba / w.sum() - rate) + return bool(np.all(np.isfinite(gap)) and gap.max() <= _GATE_BALANCE_TOLERANCE) + + theta = np.zeros(k) + theta[0] = 1.0 + current = loss(theta) + for _ in range(100): + gradient, hessian = derivatives(theta) + step = np.linalg.solve(hessian + 1e-12 * np.eye(k), gradient) + scale = 1.0 + trial_theta = theta - step + trial = loss(trial_theta) + while trial > current and scale > 1e-10: + scale /= 2.0 + trial_theta = theta - scale * step + trial = loss(trial_theta) + if trial > current: + break + theta, previous, current = trial_theta, current, trial + if previous - current <= 1e-13 * max(1.0, abs(current)): + break + if not balanced(theta): + # Damped steps: a ridge that grows while a step would raise the loss + # and shrinks after each accepted one, so a direction the scores do + # not identify cannot stall the fit. + damping = 1e-6 + for _ in range(500): + gradient, hessian = derivatives(theta) + scale = max(float(np.abs(np.diag(hessian)).max()), 1e-12) + while damping <= 1e12: + trial_theta = theta - np.linalg.solve( + hessian + damping * scale * np.eye(k), gradient + ) + trial = loss(trial_theta) + if np.isfinite(trial) and trial <= current: + break + damping *= 10.0 + else: + break + theta, current = trial_theta, trial + damping = max(damping / 10.0, 1e-12) + if balanced(theta): + break + slope, offsets = unpack(theta) + if slope < 0.0 or not balanced(theta): + floor = np.maximum(rate, _TINY) + return 0.0, np.log(floor) - np.log(floor[0]), GateOutcome.CLASS_RATES + return slope, offsets, GateOutcome.CROSS_FITTED + + +def _can_cross_fit(labels: np.ndarray, groups: np.ndarray | None = None) -> bool: + """Whether every class can have a row in every fold of a cross-fitted gate. + + A class needs at least one row (one group, with ``groups``) per fold. + """ + if groups is None: + counts = np.unique(labels, return_counts=True)[1] + else: + pairs = np.unique(np.column_stack([labels, groups]), axis=0) + counts = np.unique(pairs[:, 0], return_counts=True)[1] + return int(counts.min()) >= _GATE_CROSS_FIT_FOLDS + + +def _folds_carry_every_class( + folds: np.ndarray, labels: np.ndarray, weights: np.ndarray | None +) -> bool: + """Whether every fold's training rows carry weight for every class.""" + classes = np.unique(labels) + for fold in range(_GATE_CROSS_FIT_FOLDS): + training = folds != fold + for value in classes: + members = training & (labels == value) + carried = members.sum() if weights is None else weights[members].sum() + if not carried > 0: + return False + return True + + +def _cross_fit_gate( + features: np.ndarray, + labels: np.ndarray, + weights: np.ndarray | None, + seed: int, + groups: np.ndarray | None = None, +) -> tuple[_CrossFittedGate | None, str]: + """Fit a gate per fold and calibrate them on their out-of-fold probabilities. + + Each of :data:`_GATE_CROSS_FIT_FOLDS` folds (stratified by class, and dealt + by whole group with ``groups``) is scored by a gate fitted the same way on + the other folds, and the calibration fitted on those scores maps every fold + gate. The fold assignment and the fold gates' seeds derive from ``seed``, + the one the in-sample gate would take, so nothing else in the fit's RNG + stream moves. Every class must have a row in every fold + (:func:`_can_cross_fit`). + + Returns: + ``(gate, outcome)``. ``gate`` is ``None``, with outcome + :attr:`GateOutcome.WEIGHTLESS_FOLD`, when some fold's training rows + carry no weight for a class, which no row count rules out once rows + can weigh zero; the caller then fits the in-sample gate. + """ + classes = np.unique(labels) + fold_stream, gate_stream = np.random.SeedSequence(seed).spawn(2) + folds = _stratified_folds( + labels, _GATE_CROSS_FIT_FOLDS, np.random.default_rng(fold_stream), groups + ) + if not _folds_carry_every_class(folds, labels, weights): + return None, GateOutcome.WEIGHTLESS_FOLD + gate_seeds = np.random.default_rng(gate_stream).integers( + 0, 2**31 - 1, size=_GATE_CROSS_FIT_FOLDS + ) + log_proba = np.empty((len(labels), len(classes))) + gates = [] + for fold in range(_GATE_CROSS_FIT_FOLDS): + held = folds == fold + gate = _make_gate(int(gate_seeds[fold])) + gate.fit( + features[~held], + labels[~held], + sample_weight=None if weights is None else weights[~held], + ) + if not np.array_equal(np.asarray(gate.classes_), classes): + raise ValueError( + "A cross-fitted fold gate lost a sign class although every " + "class has a row in every fold; refusing an inconsistent gate." + ) + log_proba[held] = _log_proba(gate.predict_proba(features[held])) + gates.append(gate) + slope, offsets, outcome = _fit_gate_calibration( + log_proba, + np.searchsorted(classes, labels), + np.ones(len(labels)) if weights is None else weights, + ) + return _CrossFittedGate(gates, slope, offsets), outcome + + def _interp_rows( quantiles: np.ndarray, grid: np.ndarray, predictions: np.ndarray ) -> np.ndarray: @@ -698,16 +1051,21 @@ class _TargetModel: regime: The detected :class:`Regime` label. columns: The predictor columns this target was fit on (predictors plus the targets chained before it). - gate: The sign-gate classifier, or ``None`` for ungated regimes. + gate: The sign-gate classifier (cross-fitted when the model's + :class:`GateCalibration` asks for it), or ``None`` for ungated + regimes. positive: The positive-magnitude forest, or ``None``. negative: The negative-magnitude forest, or ``None``. + gate_outcome: The calibration the gate actually has + (:class:`GateOutcome`), or ``None`` for ungated regimes. """ regime: str columns: tuple[str, ...] - gate: HistGradientBoostingClassifier | None + gate: HistGradientBoostingClassifier | _CrossFittedGate | None positive: _Forest | None negative: _Forest | None + gate_outcome: str | None = None _CHAIN_STATE_SCHEMA_VERSION = 1 @@ -778,6 +1136,37 @@ def _index_identity(index: pd.Index) -> _IndexIdentity: ) +def _resolve_groups(table: pd.DataFrame, groups: object) -> np.ndarray | None: + """Fold-grouping codes, one per donor row: ``None``, a column name or a vector. + + Rows with the same code are dealt to the same fold of a cross-fitted gate, + so a household's members never train a fold gate that scores one of them. + """ + if groups is None: + return None + if isinstance(groups, str): + if groups not in table.columns: + raise ValueError(f"groups column {groups!r} is not in the fit input.") + values = table[groups] + else: + values = pd.Series(np.asarray(groups)) + if len(values) != len(table): + raise ValueError( + f"groups has {len(values)} values for {len(table)} fit rows." + ) + if values.isna().any(): + raise ValueError("groups must name a group for every fit row.") + codes, _ = pd.factorize(values, sort=True) + return codes.astype(np.int64) + + +def _groups_identity(groups: np.ndarray | None) -> str | None: + """Fingerprint the fold grouping for safe resume checks.""" + if groups is None: + return None + return hashlib.sha256(np.ascontiguousarray(groups).tobytes(order="C")).hexdigest() + + def _weight_identity(weights: np.ndarray | None) -> str: """Fingerprint the exact resolved fit weights for safe resume checks.""" if weights is None: @@ -831,6 +1220,12 @@ class QRFChainState: targets from the donor input. Recipient priors are likewise external and must be supplied to :meth:`RegimeGatedQRF.fit_draw_next` as the exact raw draw prefix, allowing a build to checkpoint them losslessly. + + The gate calibration is written into the model configuration only when it + is not :attr:`GateCalibration.IN_SAMPLE`, and the fold grouping's + fingerprint only when the chain was started with ``groups``, so the state + of an in-sample, ungrouped chain, and any state written before either + existed, reads the same. """ predictors: tuple[str, ...] @@ -850,6 +1245,8 @@ class QRFChainState: fit_rng_state_json: str draw_rng_state_json: str schema_version: int = _CHAIN_STATE_SCHEMA_VERSION + gate_calibration: str = GateCalibration.IN_SAMPLE + groups_sha256: str | None = None def __post_init__(self) -> None: """Reject malformed or internally inconsistent checkpoint state.""" @@ -889,6 +1286,16 @@ def __post_init__(self) -> None: "QRF chain max_samples_leaf kind/value mismatch: " f"{self.max_samples_leaf_kind!r} vs {self.max_samples_leaf!r}." ) + if self.gate_calibration not in _GATE_CALIBRATIONS: + raise ValueError( + f"QRF chain gate_calibration {self.gate_calibration!r} is not one " + f"of {sorted(_GATE_CALIBRATIONS)}." + ) + if self.groups_sha256 is not None and ( + len(self.groups_sha256) != 64 + or any(c not in "0123456789abcdef" for c in self.groups_sha256) + ): + raise ValueError("QRF chain groups_sha256 is malformed.") _rng_from_state_json(self.fit_rng_state_json, stream="fit") _rng_from_state_json(self.draw_rng_state_json, stream="draw") @@ -906,6 +1313,19 @@ def is_complete(self) -> bool: def to_dict(self) -> dict[str, object]: """Return a JSON-roundtrippable checkpoint mapping.""" + model_config: dict[str, object] = { + "n_estimators": self.n_estimators, + "zero_atol": self.zero_atol, + "max_samples_leaf": self.max_samples_leaf, + "max_samples_leaf_kind": self.max_samples_leaf_kind, + "seed": self.seed, + "fit_n_jobs": self.fit_n_jobs, + } + if self.gate_calibration != GateCalibration.IN_SAMPLE: + model_config["gate_calibration"] = self.gate_calibration + grouping = ( + {} if self.groups_sha256 is None else {"groups_sha256": self.groups_sha256} + ) return { "schema_version": self.schema_version, "predictors": list(self.predictors), @@ -914,14 +1334,8 @@ def to_dict(self) -> dict[str, object]: "entity": self.entity, "weight_kind": self.weight_kind, "weight_sha256": self.weight_sha256, - "model_config": { - "n_estimators": self.n_estimators, - "zero_atol": self.zero_atol, - "max_samples_leaf": self.max_samples_leaf, - "max_samples_leaf_kind": self.max_samples_leaf_kind, - "seed": self.seed, - "fit_n_jobs": self.fit_n_jobs, - }, + **grouping, + "model_config": model_config, "donor_index": self.donor_index.to_dict(), "recipient_index": ( None if self.recipient_index is None else self.recipient_index.to_dict() @@ -947,11 +1361,15 @@ def from_dict(cls, value: Mapping[str, object]) -> QRFChainState: "fit_rng_state", "draw_rng_state", } - if set(value) != expected: + if set(value) not in (expected, expected | {"groups_sha256"}): raise ValueError( "QRF chain state keys must be exactly " - f"{sorted(expected)}, got {sorted(value)}." + f"{sorted(expected)}, optionally with 'groups_sha256', " + f"got {sorted(value)}." ) + groups_sha256 = value.get("groups_sha256") + if groups_sha256 is not None and not isinstance(groups_sha256, str): + raise ValueError("QRF chain groups_sha256 must be a string.") def names(key: str) -> tuple[str, ...]: raw = value[key] @@ -970,11 +1388,15 @@ def names(key: str) -> tuple[str, ...]: "seed", "fit_n_jobs", } - if set(config) != config_keys: + if set(config) not in (config_keys, config_keys | {"gate_calibration"}): raise ValueError( "QRF chain model_config keys must be exactly " - f"{sorted(config_keys)}, got {sorted(config)}." + f"{sorted(config_keys)}, optionally with 'gate_calibration', " + f"got {sorted(config)}." ) + gate_calibration = config.get("gate_calibration", GateCalibration.IN_SAMPLE) + if not isinstance(gate_calibration, str): + raise ValueError("QRF chain gate_calibration must be a string.") donor_index = value["donor_index"] recipient_index = value["recipient_index"] if not isinstance(donor_index, Mapping): @@ -1047,6 +1469,8 @@ def names(key: str) -> tuple[str, ...]: ), fit_rng_state_json=fit_rng_state, draw_rng_state_json=draw_rng_state, + gate_calibration=gate_calibration, + groups_sha256=groups_sha256, ) @@ -1151,7 +1575,7 @@ def _validate_uniform_mapping( def _gate_draw_with_rng( - gate: HistGradientBoostingClassifier, + gate: HistGradientBoostingClassifier | _CrossFittedGate, features: pd.DataFrame, columns: tuple[str, ...], rng: np.random.Generator, @@ -1296,6 +1720,16 @@ class RegimeGatedQRF: seed: Base random seed. Controls the weighted-bootstrap resample, the forest randomness, and the per-row draw quantiles, so a fixed seed makes a freshly fitted model's first draw reproducible. + gate_calibration: How each sign gate's probabilities are calibrated, a + :class:`GateCalibration` name. ``"in_sample"`` (the default) is + the gate as fitted; ``"cross_fitted"`` fits a gate per fold and + maps them by a calibration fitted on their out-of-fold scores, so a + rare class is drawn at its rate on rows the gate was not fitted to. + The forests and every draw uniform are the same either way; only + the gates' probabilities move. + + Raises: + ValueError: If ``gate_calibration`` names no :class:`GateCalibration`. """ def __init__( @@ -1305,11 +1739,18 @@ def __init__( zero_atol: float = DEFAULT_ZERO_ATOL, max_samples_leaf: int | float | None = None, seed: int = 0, + gate_calibration: str = GateCalibration.IN_SAMPLE, ) -> None: + if gate_calibration not in _GATE_CALIBRATIONS: + raise ValueError( + f"gate_calibration {gate_calibration!r} is not one of " + f"{sorted(_GATE_CALIBRATIONS)}." + ) self.n_estimators = int(n_estimators) self.zero_atol = float(zero_atol) self.max_samples_leaf = max_samples_leaf self.seed = int(seed) + self.gate_calibration = gate_calibration def fit( self, @@ -1318,6 +1759,7 @@ def fit( targets: list[str], *, weights: WeightSpec = DESIGN_WEIGHTS, + groups: str | Sequence[object] | np.ndarray | None = None, ) -> FittedRegimeGatedQRF: """Fit the conditional model. See :meth:`~microcosm.fit.model.ConditionalModel.fit`. @@ -1331,16 +1773,21 @@ def fit( target's regime structurally and grows the gated, weighted-bootstrap forests in chain order. + ``groups`` (a column of the fit input or a vector, one entry per row) + deals whole groups, such as a household's members, to the same fold of + a cross-fitted gate; it is unused by the in-sample gate. + Raises: ValueError: If predictors/targets are empty, span more than one entity (Frame) or are missing from the columns, request a - weight spec the input cannot resolve, or a target column - contains non-finite (NaN/inf) values. Messages name the - culprits. + weight spec the input cannot resolve, a target column + contains non-finite (NaN/inf) values, or ``groups`` does not + name a group for every row. Messages name the culprits. """ predictors = list(predictors) targets = list(targets) resolved = _resolve_qrf_fit_input(frame_or_df, predictors, targets, weights) + group_codes = _resolve_groups(resolved.table, groups) # Split the model seed into two independent streams: one drives the # fit (bootstrap resample, forest randomness, gate random_state), the @@ -1363,6 +1810,7 @@ def fit( columns=chained, weights=resolved.weights, rng=rng, + groups=group_codes, ) return FittedRegimeGatedQRF( @@ -1382,18 +1830,21 @@ def start_chain( targets: list[str], *, weights: WeightSpec = DESIGN_WEIGHTS, + groups: str | Sequence[object] | np.ndarray | None = None, ) -> QRFChainState: """Initialize a safe target-at-a-time chain checkpoint. This performs the same entity, column, target-finiteness, and weight resolution as :meth:`fit`, then locks the donor row order, resolved - weights, exact model configuration, target order, and independent fit - and draw RNG streams into immutable JSON-roundtrippable state. No model - is fit until :meth:`fit_draw_next`. + weights, fold grouping (``groups``, as in :meth:`fit`), exact model + configuration, target order, and independent fit and draw RNG streams + into immutable JSON-roundtrippable state. No model is fit until + :meth:`fit_draw_next`. """ predictors = list(predictors) targets = list(targets) resolved = _resolve_qrf_fit_input(frame_or_df, predictors, targets, weights) + group_codes = _resolve_groups(resolved.table, groups) fit_seed, draw_seed = np.random.SeedSequence(self.seed).spawn(2) fit_rng = np.random.default_rng(fit_seed) draw_rng = np.random.default_rng(draw_seed) @@ -1414,6 +1865,8 @@ def start_chain( recipient_index=None, fit_rng_state_json=_rng_state_json(fit_rng), draw_rng_state_json=_rng_state_json(draw_rng), + gate_calibration=self.gate_calibration, + groups_sha256=_groups_identity(group_codes), ) def fit_draw_next( @@ -1426,6 +1879,7 @@ def fit_draw_next( weights: WeightSpec = DESIGN_WEIGHTS, quantiles: np.ndarray | None = None, sign_uniforms: np.ndarray | None = None, + groups: str | Sequence[object] | np.ndarray | None = None, ) -> QRFChainStepResult: """Fit and draw exactly the next target in a checkpointed chain. @@ -1436,7 +1890,9 @@ def fit_draw_next( Every call re-runs the ordinary input/weight resolution and refuses model-config drift, target-prefix drift, donor/recipient row reordering, - weight drift, an entity/front-door change, or non-float64 raw priors. + weight or fold-grouping drift (``groups`` must be what + :meth:`start_chain` took), an entity/front-door change, or non-float64 + raw priors. ``quantiles`` and ``sign_uniforms`` (both or neither) are caller-owned uniforms, one in ``[0, 1)`` per recipient row. With them the step draws @@ -1460,6 +1916,12 @@ def fit_draw_next( targets = list(state.targets) resolved = _resolve_qrf_fit_input(frame_or_df, predictors, targets, weights) self._validate_chain_donor(state, resolved) + group_codes = _resolve_groups(resolved.table, groups) + if _groups_identity(group_codes) != state.groups_sha256: + raise ValueError( + "QRF chain fold grouping changed since start_chain: pass the same " + "groups to every step." + ) recipient = self._chain_recipient_table(recipient_predictors, state) recipient_identity = _index_identity(recipient.index) if state.recipient_index is not None and ( @@ -1481,6 +1943,7 @@ def fit_draw_next( columns=chained, weights=resolved.weights, rng=fit_rng, + groups=group_codes, ) augmented = recipient.loc[:, list(state.predictors)].copy() @@ -1548,6 +2011,7 @@ def _validate_chain_config(self, state: QRFChainState) -> None: _max_samples_leaf_kind(self.max_samples_leaf), self.seed, _fit_n_jobs(), + self.gate_calibration, ) expected = ( state.n_estimators, @@ -1556,6 +2020,7 @@ def _validate_chain_config(self, state: QRFChainState) -> None: state.max_samples_leaf_kind, state.seed, state.fit_n_jobs, + state.gate_calibration, ) if actual != expected or actual[3] != expected[3]: raise ValueError( @@ -1647,6 +2112,7 @@ def _fit_target( columns: tuple[str, ...], weights: np.ndarray | None, rng: np.random.Generator, + groups: np.ndarray | None = None, ) -> _TargetModel: """Fit the gate and per-sign forests for one numeric target.""" regime = detect_regime(y, zero_atol=self.zero_atol) @@ -1681,12 +2147,12 @@ def forest(mask: np.ndarray) -> _Forest: # sample_weight (not by bootstrap), so every sign class survives even # when one is vanishingly rare under the weights. labels = self._sign_labels(y) - gate = self._fit_gate(features, labels, weights, rng) + gate, outcome = self._fit_gate(features, labels, weights, rng, groups) pos_mask = y > self.zero_atol neg_mask = y < -self.zero_atol positive = forest(pos_mask) if pos_mask.any() else None negative = forest(neg_mask) if neg_mask.any() else None - return _TargetModel(regime, columns, gate, positive, negative) + return _TargetModel(regime, columns, gate, positive, negative, outcome) def _sign_labels(self, y: np.ndarray) -> np.ndarray: """Per-row sign code: ``-1`` negative, ``0`` zero, ``1`` positive.""" @@ -1701,7 +2167,8 @@ def _fit_gate( labels: np.ndarray, weights: np.ndarray | None, rng: np.random.Generator, - ) -> HistGradientBoostingClassifier: + groups: np.ndarray | None = None, + ) -> tuple[HistGradientBoostingClassifier | _CrossFittedGate, str]: """Fit the sign-gate classifier, weighting it directly by sample_weight. Unlike the forests, the gate is *not* weighted by bootstrap. @@ -1720,22 +2187,42 @@ def _fit_gate( ``classes_``. If sklearn ever dropped a class, drawing it at probability zero would silently lose that sign, so we raise instead. + Under :attr:`GateCalibration.CROSS_FITTED` the gate is instead a gate + per fold, calibrated on their out-of-fold probabilities + (:func:`_cross_fit_gate`, with whole ``groups`` dealt to folds), unless + a class is too thin to have a row in every fold or a fold's training + rows carry no weight for a class; then it is the in-sample gate, and + the returned outcome says why. The fold gates' seeds derive from the + one seed drawn here, so the fit RNG advances by that single draw either + way and every forest after the gate is unchanged. + Args: features: The chained predictor matrix for this target's rows. labels: Per-row sign codes (``-1`` / ``0`` / ``1``). weights: Per-row weights, or ``None`` for an unweighted gate. rng: Seeded generator supplying the gate's ``random_state`` (kept for fit reproducibility even though no resample is drawn). + groups: Fold-grouping codes, one per row, or ``None``. Returns: - The fitted sign-gate classifier. + ``(gate, outcome)``: the fitted sign-gate classifier, cross-fitted + when configured and possible, and its :class:`GateOutcome`. Raises: ValueError: If a sign class present in ``labels`` is absent from the fitted gate's ``classes_`` (internal inconsistency). """ - gate = _make_gate(int(rng.integers(0, 2**31 - 1))) - gate.fit(features, labels, sample_weight=weights) + seed = int(rng.integers(0, 2**31 - 1)) + gate: HistGradientBoostingClassifier | _CrossFittedGate | None = None + outcome = GateOutcome.IN_SAMPLE + if self.gate_calibration == GateCalibration.CROSS_FITTED: + if _can_cross_fit(labels, groups): + gate, outcome = _cross_fit_gate(features, labels, weights, seed, groups) + else: + outcome = GateOutcome.THIN_CLASS + if gate is None: + gate = _make_gate(seed) + gate.fit(features, labels, sample_weight=weights) training_classes = set(np.unique(labels).tolist()) fitted_classes = set(np.asarray(gate.classes_).tolist()) missing = sorted(training_classes - fitted_classes) @@ -1748,7 +2235,7 @@ def _fit_gate( "probability zero would silently lose that sign; refusing to " "fit an inconsistent gate." ) - return gate + return gate, outcome @dataclass(frozen=True) @@ -1814,6 +2301,11 @@ def __init__( self._zero_atol = zero_atol self._rng = np.random.default_rng(draw_seed) self._weight_kind = weight_kind + # Read now: ``predict(release_models=True)`` drops the target models. + self._gate_outcomes = { + name: getattr(model, "gate_outcome", None) + for name, model in target_models.items() + } @property def weight_kind(self) -> str: @@ -1824,6 +2316,15 @@ def regimes(self) -> dict[str, str]: """The detected :class:`Regime` label per target.""" return {name: model.regime for name, model in self._target_models.items()} + def gate_outcomes(self) -> dict[str, str | None]: + """The calibration each target's sign gate actually has. + + A :class:`GateOutcome` per gated target and ``None`` for an ungated + one, so a caller can record where a cross-fitted request kept the + in-sample gate or fell back to the class rates. + """ + return dict(self._gate_outcomes) + def sign_classes(self, target: str) -> tuple[int, ...]: """The sign classes of ``target``, ascending. @@ -2145,7 +2646,7 @@ def _draw_target(self, features: pd.DataFrame, model: _TargetModel) -> np.ndarra def _gate_draw( self, - gate: HistGradientBoostingClassifier, + gate: HistGradientBoostingClassifier | _CrossFittedGate, features: pd.DataFrame, columns: tuple[str, ...], ) -> np.ndarray: diff --git a/packages/microcosm-fit/tests/engine_free/shared/test_kernels.py b/packages/microcosm-fit/tests/engine_free/shared/test_kernels.py index 36d9e3efb5..d5c2600b4c 100644 --- a/packages/microcosm-fit/tests/engine_free/shared/test_kernels.py +++ b/packages/microcosm-fit/tests/engine_free/shared/test_kernels.py @@ -280,8 +280,18 @@ def test_the_graph_kernel_does_not_claim_the_new_keyed_seed_source() -> None: lambda params: params.update(min_samples_leaf=2), "supports only.*1", ), + ( + QRFKernel(SeedSource.PARAM), + lambda params: params.update(gate_calibration="platt"), + "gate_calibration 'platt'", + ), + ], + ids=[ + "param-needs-seed", + "executor-forbids-seed", + "leaf-default-only", + "known-gate-calibration", ], - ids=["param-needs-seed", "executor-forbids-seed", "leaf-default-only"], ) def test_parameter_contract_rejects_mismatches( kernel: QRFKernel, mutate_params, match: str @@ -292,6 +302,27 @@ def test_parameter_contract_rejects_mismatches( kernel.run(_context(params=params)) +def test_the_kernel_passes_a_cross_fitted_gate_calibration_through() -> None: + """``gate_calibration`` reaches the fit; only a cross-fitted node names it.""" + table, _ = _fixture() + donors = np.flatnonzero(table["is_donor"].to_numpy(dtype=bool)) + observed = table["observed_y"].to_numpy(copy=True) + observed[donors[::2]] = 0.0 # a zero-inflated donor target has a gate + table = table.assign(observed_y=observed) + + plain = QRF_PARAM_KERNEL.run(_context(table=table)) + assert "gate_calibration" not in plain.receipt + assert "gate_outcome" not in plain.receipt + + crossed = QRF_PARAM_KERNEL.run( + _context(table=table, params={**PARAMS, "gate_calibration": "cross_fitted"}) + ) + assert crossed.receipt["gate_calibration"] == "cross_fitted" + model = pickle.loads(crossed.artifacts["model"]) # noqa: S301 - trusted + assert model.gate_outcomes() == {"y": crossed.receipt["gate_outcome"]} + assert crossed.receipt["gate_outcome"] != "in_sample" + + def test_masks_must_be_boolean_non_null_complements() -> None: table, _ = _fixture() not_complement = table.copy() diff --git a/packages/microcosm-fit/tests/engine_free/shared/test_qrf_gate_calibration.py b/packages/microcosm-fit/tests/engine_free/shared/test_qrf_gate_calibration.py new file mode 100644 index 0000000000..1f7a1f3fd9 --- /dev/null +++ b/packages/microcosm-fit/tests/engine_free/shared/test_qrf_gate_calibration.py @@ -0,0 +1,524 @@ +"""Cross-fitted sign gates: a rare class drawn at its rate off the training rows. + +The in-sample gate is one boosted classifier calibrated only on its own rows. +On rows it was not fitted to, its mean probability of a rare class falls short +of the class's rate, so recipients draw the class too rarely. These tests pin +the opt-in :attr:`GateCalibration.CROSS_FITTED`: it restores the rate off +sample, leaves the forests and every draw uniform where they were, keeps a +class too thin to cross-fit (or a fold with no weight for a class) on the +in-sample gate and says so, balances the rates even on saturated scores, +deals whole groups to folds, calibrates three-sign gates, and checkpoints its +choice only when it is made. The default path stays the in-sample classifier. +""" + +from __future__ import annotations + +import copy +import json + +import numpy as np +import pandas as pd +import pytest +from hypothesis import HealthCheck, given, settings +from hypothesis import strategies as st +from sklearn.ensemble import HistGradientBoostingClassifier + +from microcosm.fit import ( + GateCalibration, + GateOutcome, + QRFChainState, + Regime, + RegimeGatedQRF, + fit, +) +from microcosm.fit.qrf import ( + _GATE_BALANCE_TOLERANCE, + _fit_gate_calibration, + _make_gate, + _stratified_folds, +) + +#: Small, reproducible property runs: every example fits gates and forests. +PROPERTY = settings( + max_examples=20, + deadline=None, + derandomize=True, + suppress_health_check=[HealthCheck.too_slow], +) + +IN_SAMPLE = GateCalibration.IN_SAMPLE +CROSS_FITTED = GateCalibration.CROSS_FITTED + + +def _rare_positive_table( + seed: int = 3, n: int = 4000 +) -> tuple[pd.DataFrame, list[str]]: + """A positive class on about 7% of the weight: a weak signal among noise.""" + rng = np.random.default_rng(seed) + x = rng.normal(size=(n, 12)) + logit = -3.0 + 0.9 * x[:, 0] + 0.5 * x[:, 1] + positive = rng.random(n) < 1.0 / (1.0 + np.exp(-logit)) + columns = [f"x{i}" for i in range(12)] + table = pd.DataFrame(x, columns=columns) + table["target"] = np.where(positive, rng.lognormal(3.0, 0.5, n), 0.0) + table["second"] = np.where(positive, 2.0 * table["target"], 0.0) + np.where( + rng.random(n) < 0.3, rng.lognormal(1.0, 0.5, n), 0.0 + ) + table["weight"] = rng.uniform(1.0, 9.0, n) + return table, columns + + +def _fit(table, columns, calibration, targets=("target",)): + model = RegimeGatedQRF(n_estimators=4, seed=5, gate_calibration=calibration) + return model.fit(table, columns, list(targets), weights="weight") + + +def _positive_probability(fitted, table, columns) -> np.ndarray: + gate = fitted._target_models["target"].gate + proba = gate.predict_proba(table.loc[:, columns].to_numpy(dtype=np.float64)) + return proba[:, list(gate.classes_).index(1)] + + +def _softmax(logits: np.ndarray) -> np.ndarray: + scaled = np.exp(logits - logits.max(axis=1, keepdims=True)) + return scaled / scaled.sum(axis=1, keepdims=True) + + +def test_in_sample_is_the_default_gate() -> None: + table, columns = _rare_positive_table(n=600) + default = RegimeGatedQRF(n_estimators=4, seed=5).fit( + table, columns, ["target"], weights="weight" + ) + named = _fit(table, columns, IN_SAMPLE) + assert isinstance( + default._target_models["target"].gate, HistGradientBoostingClassifier + ) + uniforms = { + "quantiles": {"target": np.linspace(0.0, 0.99, len(table))}, + "sign_uniforms": {"target": np.random.default_rng(1).random(len(table))}, + } + pd.testing.assert_frame_equal( + default.predict_from_uniforms(table, **uniforms), + named.predict_from_uniforms(table, **uniforms), + ) + + +def test_an_unknown_gate_calibration_is_refused() -> None: + with pytest.raises(ValueError, match="gate_calibration 'platt' is not one of"): + RegimeGatedQRF(gate_calibration="platt") + + +def test_cross_fitted_gate_draws_a_rare_class_at_its_held_out_rate() -> None: + """Off the training rows the in-sample gate under-predicts; cross-fitting does not.""" + table, columns = _rare_positive_table() + train, held_out = table.iloc[:2000], table.iloc[2000:] + weights = held_out["weight"].to_numpy() + rate = float(weights @ (held_out["target"] > 0) / weights.sum()) + means = { + calibration: float( + weights + @ _positive_probability( + _fit(train, columns, calibration), held_out, columns + ) + / weights.sum() + ) + for calibration in (IN_SAMPLE, CROSS_FITTED) + } + assert means[IN_SAMPLE] < 0.6 * rate + assert means[CROSS_FITTED] == pytest.approx(rate, rel=0.25) + + +def test_cross_fitting_moves_only_the_gate() -> None: + """The forests and the uniforms are the same; only who is positive moves.""" + table, columns = _rare_positive_table(n=1200) + fits = { + calibration: _fit(table, columns, calibration) + for calibration in (IN_SAMPLE, CROSS_FITTED) + } + quantiles = {"target": np.linspace(0.0, 0.99, len(table))} + pd.testing.assert_frame_equal( + fits[IN_SAMPLE].predict_positive_from_uniforms(table, quantiles=quantiles), + fits[CROSS_FITTED].predict_positive_from_uniforms(table, quantiles=quantiles), + ) + signs = {"target": np.random.default_rng(2).random(len(table))} + drawn = { + calibration: fitted.predict_from_uniforms( + table, quantiles=quantiles, sign_uniforms=signs + )["target"].to_numpy() + for calibration, fitted in fits.items() + } + both = (drawn[IN_SAMPLE] > 0) & (drawn[CROSS_FITTED] > 0) + assert both.any() + np.testing.assert_array_equal(drawn[IN_SAMPLE][both], drawn[CROSS_FITTED][both]) + + +def test_calibration_matches_each_class_weighted_rate() -> None: + """The fitted map's weighted mean is each class's rate; two classes are Platt.""" + rng = np.random.default_rng(0) + n = 3000 + logits = np.column_stack( + [ + np.zeros(n), + 0.8 * rng.normal(size=n) - 1.5, + 0.5 * rng.normal(size=n) + 0.3, + ] + ) + labels = (rng.random(n)[:, None] > np.cumsum(_softmax(logits), axis=1)).sum(axis=1) + weights = rng.uniform(500.0, 9000.0, n) + overconfident = np.log(_softmax(2.0 * logits)) + slope, offsets, outcome = _fit_gate_calibration(overconfident, labels, weights) + assert outcome == GateOutcome.CROSS_FITTED + calibrated = _softmax(slope * overconfident + offsets) + onehot = np.eye(3)[labels] + np.testing.assert_allclose( + weights @ calibrated / weights.sum(), + weights @ onehot / weights.sum(), + rtol=1e-9, + ) + assert offsets[0] == 0.0 + assert 0.3 < slope < 0.7 + + # Two classes: a logistic regression of the label on the gate's logit, so + # at the optimum both of Platt's score equations hold. + positive = (labels == 2).astype(int) + two = np.log(_softmax(np.column_stack([np.zeros(n), 2.0 * logits[:, 2]]))) + slope, offsets, _ = _fit_gate_calibration(two, positive, weights) + score = two[:, 1] - two[:, 0] + residual = 1.0 / (1.0 + np.exp(-(slope * score + offsets[1]))) - positive + assert abs(weights @ residual) / weights.sum() < 1e-9 + assert abs(weights @ (residual * score)) / weights.sum() < 1e-9 + assert 0.3 < slope < 0.7 + + +def test_a_class_too_thin_to_cross_fit_keeps_the_in_sample_gate( + rare_positive_frame, +) -> None: + frame, _, _ = rare_positive_frame(seed=0, n=1000, n_positive=4) + gates = {} + for calibration in (IN_SAMPLE, CROSS_FITTED): + fitted = fit( + frame, + ["signal", "noise"], + ["target"], + n_estimators=4, + seed=0, + gate_calibration=calibration, + ) + gates[calibration] = fitted._target_models["target"].gate + assert isinstance(gates[CROSS_FITTED], HistGradientBoostingClassifier) + x = frame.table("person").loc[:, ["signal", "noise"]].to_numpy(dtype=np.float64) + np.testing.assert_array_equal( + gates[IN_SAMPLE].predict_proba(x), gates[CROSS_FITTED].predict_proba(x) + ) + + +def test_three_sign_gate_cross_fits_every_class(zero_inflated_frame) -> None: + frame, _ = zero_inflated_frame(seed=0, n=1500) + fitted = fit( + frame, ["x"], ["target"], n_estimators=4, seed=0, gate_calibration=CROSS_FITTED + ) + assert fitted.regimes()["target"] == Regime.THREE_SIGN + assert fitted.sign_classes("target") == (-1, 0, 1) + gate = fitted._target_models["target"].gate + assert not isinstance(gate, HistGradientBoostingClassifier) + proba = gate.predict_proba(frame.table("person").loc[:, ["x"]].to_numpy()) + np.testing.assert_allclose(proba.sum(axis=1), 1.0) + draws = fitted.predict(frame)["target"].to_numpy() + assert (draws > 0).any() and (draws < 0).any() and (draws == 0).any() + + +def test_conditional_uniforms_round_trip_under_a_cross_fitted_gate() -> None: + """Locating observed targets and drawing at those uniforms gives them back.""" + x = np.tile(np.arange(30, dtype=float), 6) + observed = pd.DataFrame( + { + "x": x, + "mixed": np.tile([-2.0, 0.0, 3.0], len(x) // 3), + "inflated": np.tile([0.0, 4.0], len(x) // 2), + } + ) + fitted = fit( + observed, + ["x"], + ["mixed", "inflated"], + weights="none", + n_estimators=4, + seed=7, + gate_calibration=CROSS_FITTED, + ) + rng = np.random.default_rng(1) + before = copy.deepcopy(fitted._rng.bit_generator.state) + located = fitted.conditional_uniforms( + observed, + sign_placement={t: rng.random(len(x)) for t in fitted.targets}, + quantile_placement={t: rng.random(len(x)) for t in fitted.targets}, + ) + assert fitted._rng.bit_generator.state == before + drawn = fitted.predict_from_uniforms( + observed[["x"]], + quantiles=located.quantiles, + sign_uniforms=located.sign_uniforms, + ) + pd.testing.assert_frame_equal( + drawn, observed[fitted.targets], check_exact=False, rtol=1e-9 + ) + + +def test_targetwise_cross_fitted_chain_is_bit_identical_to_the_monolith( + monkeypatch, +) -> None: + monkeypatch.setenv("POPULACE_FIT_N_JOBS", "1") + monkeypatch.setenv("POPULACE_FIT_PREDICT_WORKERS", "1") + table, columns = _rare_positive_table(n=800) + recipient = table.iloc[::2].loc[:, columns].copy() + model = RegimeGatedQRF(n_estimators=4, seed=5, gate_calibration=CROSS_FITTED) + targets = ["target", "second"] + uniforms = { + "quantiles": {t: np.linspace(0.0, 0.99, len(recipient)) for t in targets}, + "sign_uniforms": { + t: np.random.default_rng(i).random(len(recipient)) + for i, t in enumerate(targets) + }, + } + monolith = model.fit( + table, columns, targets, weights="weight" + ).predict_from_uniforms(recipient, **uniforms) + state = model.start_chain(table, columns, targets, weights="weight") + raw = pd.DataFrame(index=recipient.index) + for target in targets: + state = QRFChainState.from_dict(json.loads(json.dumps(state.to_dict()))) + step = model.fit_draw_next( + table, + recipient, + raw, + state=state, + weights="weight", + quantiles=uniforms["quantiles"][target], + sign_uniforms=uniforms["sign_uniforms"][target], + ) + np.testing.assert_array_equal(step.raw_draw, monolith[target].to_numpy()) + raw[target] = step.raw_draw + state = step.state + + +def test_chain_state_names_the_calibration_only_when_cross_fitted( + correlated_targets_frame, +) -> None: + frame, _ = correlated_targets_frame(seed=4, n=120) + states = { + calibration: RegimeGatedQRF( + n_estimators=4, seed=23, gate_calibration=calibration + ).start_chain(frame, ["x"], ["first", "second"]) + for calibration in (IN_SAMPLE, CROSS_FITTED) + } + assert "gate_calibration" not in states[IN_SAMPLE].to_dict()["model_config"] + assert states[CROSS_FITTED].to_dict()["model_config"]["gate_calibration"] == ( + CROSS_FITTED + ) + for state in states.values(): + assert QRFChainState.from_dict(json.loads(json.dumps(state.to_dict()))) == state + + recipient = frame.table("person").iloc[:50].loc[:, ["x"]].copy() + with pytest.raises(ValueError, match="model configuration changed"): + RegimeGatedQRF(n_estimators=4, seed=23).fit_draw_next( + frame, + recipient, + pd.DataFrame(index=recipient.index), + state=states[CROSS_FITTED], + ) + payload = states[CROSS_FITTED].to_dict() + payload["model_config"]["gate_calibration"] = "platt" + with pytest.raises(ValueError, match="gate_calibration 'platt'"): + QRFChainState.from_dict(payload) + + +def _two_class_table(n: int, seed: int, weight: np.ndarray | None = None): + rng = np.random.default_rng(seed) + target = np.zeros(n) + target[: n // 2] = np.exp(rng.normal(size=n // 2)) + # x carries the sign, through noise; z carries nothing. + x = (target > 0) + rng.normal(0.0, 0.7, n) + table = pd.DataFrame({"x": x, "z": rng.normal(size=n), "target": target}) + table["weight"] = rng.uniform(1.0, 3.0, n) if weight is None else weight + return table + + +def test_a_weightless_fold_keeps_the_in_sample_gate() -> None: + """Max's reproducer: ten donors, five a class, eight weighing nothing. + + One row a class carries weight, so the fold that holds it out has none of + that class to train on. The cross-fitted request keeps the in-sample gate + and says why, instead of raising inside sklearn. + """ + weight = np.zeros(10) + weight[[0, 9]] = 1.0 + table = _two_class_table(10, seed=1, weight=weight) + fits = { + calibration: RegimeGatedQRF( + n_estimators=2, seed=3, gate_calibration=calibration + ).fit(table, ["x", "z"], ["target"], weights="weight") + for calibration in (IN_SAMPLE, CROSS_FITTED) + } + assert fits[CROSS_FITTED].gate_outcomes() == {"target": GateOutcome.WEIGHTLESS_FOLD} + x = table.loc[:, ["x", "z"]].to_numpy() + np.testing.assert_array_equal( + fits[IN_SAMPLE]._target_models["target"].gate.predict_proba(x), + fits[CROSS_FITTED]._target_models["target"].gate.predict_proba(x), + ) + + +@PROPERTY +@given( + seed=st.integers(0, 2**31 - 2), + weightless=st.integers(0, 9), + n=st.integers(10, 40), +) +def test_sparse_weights_never_break_a_cross_fitted_fit(seed, weightless, n) -> None: + """Any seed, any number of weightless rows: a gate, and an honest outcome.""" + rng = np.random.default_rng(seed) + weight = rng.uniform(0.5, 2.0, n) + weight[rng.permutation(n)[: min(weightless, n - 2)]] = 0.0 + # Keep weight on both classes, as every real fit has. + weight[0] = weight[n - 1] = 1.0 + table = _two_class_table(n, seed=seed % 1000, weight=weight) + fitted = RegimeGatedQRF( + n_estimators=2, seed=seed, gate_calibration=CROSS_FITTED + ).fit(table, ["x", "z"], ["target"], weights="weight") + outcome = fitted.gate_outcomes()["target"] + assert outcome in { + GateOutcome.CROSS_FITTED, + GateOutcome.THIN_CLASS, + GateOutcome.WEIGHTLESS_FOLD, + GateOutcome.CLASS_RATES, + } + proba = fitted._target_models["target"].gate.predict_proba( + table.loc[:, ["x", "z"]].to_numpy() + ) + assert np.isfinite(proba).all() + np.testing.assert_allclose(proba.sum(axis=1), 1.0) + + +def test_saturated_scores_still_balance_the_rates() -> None: + """Max's reproducer: every out-of-fold logit at 29, half the rows positive.""" + logits = np.column_stack([np.zeros(10), np.full(10, 29.0)]) + log_proba = np.log(_softmax(logits)) + labels = np.array([0, 1] * 5) + slope, offsets, outcome = _fit_gate_calibration(log_proba, labels, np.ones(10)) + calibrated = _softmax(slope * log_proba + offsets) + assert calibrated[:, 1].mean() == pytest.approx(0.5, abs=_GATE_BALANCE_TOLERANCE) + assert outcome in {GateOutcome.CROSS_FITTED, GateOutcome.CLASS_RATES} + + +@PROPERTY +@given( + seed=st.integers(0, 2**31 - 2), + classes=st.sampled_from([2, 3]), + scale=st.sampled_from([0.0, 0.5, 3.0, 40.0]), + n=st.integers(12, 120), +) +def test_the_calibration_balances_every_class(seed, classes, scale, n) -> None: + """Saturated, constant or ordinary scores: the weighted rates always balance.""" + rng = np.random.default_rng(seed) + labels = np.concatenate([np.arange(classes), rng.integers(0, classes, n)]) + logits = scale * rng.normal(size=(len(labels), classes)) + if scale == 0.0: + logits[:] = rng.normal(size=classes) # every row the same scores + log_proba = np.log(np.maximum(_softmax(logits), np.finfo(float).tiny)) + weights = rng.uniform(0.1, 10.0, len(labels)) + slope, offsets, outcome = _fit_gate_calibration(log_proba, labels, weights) + calibrated = _softmax(slope * log_proba + offsets) + rate = weights @ np.eye(classes)[labels] / weights.sum() + np.testing.assert_allclose( + weights @ calibrated / weights.sum(), rate, atol=_GATE_BALANCE_TOLERANCE + ) + if outcome == GateOutcome.CLASS_RATES: + assert slope == 0.0 + + +@PROPERTY +@given(seed=st.integers(0, 2**31 - 2), n=st.integers(30, 90)) +def test_the_default_gate_is_the_in_sample_classifier(seed, n) -> None: + """The default path fits exactly the classifier it always did, groups unused.""" + table = _two_class_table(n, seed=seed % 1000) + x = table.loc[:, ["x", "z"]].to_numpy() + labels = (table["target"].to_numpy() > 0).astype(int) + default = RegimeGatedQRF(n_estimators=2, seed=seed).fit( + table, ["x", "z"], ["target"], weights="weight" + ) + gate = default._target_models["target"].gate + assert type(gate) is HistGradientBoostingClassifier + fresh = _make_gate(gate.random_state).fit( + x, labels, sample_weight=table["weight"].to_numpy() + ) + np.testing.assert_array_equal(gate.predict_proba(x), fresh.predict_proba(x)) + assert default.gate_outcomes() == {"target": GateOutcome.IN_SAMPLE} + grouped = RegimeGatedQRF(n_estimators=2, seed=seed).fit( + table, + ["x", "z"], + ["target"], + weights="weight", + groups=np.arange(n) // 3, + ) + uniforms = { + "quantiles": {"target": np.linspace(0.0, 0.99, n)}, + "sign_uniforms": {"target": np.random.default_rng(seed).random(n)}, + } + pd.testing.assert_frame_equal( + default.predict_from_uniforms(table, **uniforms), + grouped.predict_from_uniforms(table, **uniforms), + ) + + +@PROPERTY +@given( + seed=st.integers(0, 2**31 - 2), + groups=st.integers(5, 60), + classes=st.sampled_from([2, 3]), +) +def test_grouped_folds_never_split_a_group(seed, groups, classes) -> None: + rng = np.random.default_rng(seed) + codes = np.sort(rng.integers(0, groups, 4 * groups)) + codes = np.unique(codes, return_inverse=True)[1] + labels = rng.integers(0, classes, len(codes)) + folds = _stratified_folds(labels, 5, rng, codes) + per_group = pd.Series(folds).groupby(codes).nunique() + assert (per_group == 1).all() + + +def test_a_grouped_chain_locks_its_grouping() -> None: + table = _two_class_table(60, seed=4) + table["household"] = np.arange(60) // 3 + model = RegimeGatedQRF(n_estimators=2, seed=9, gate_calibration=CROSS_FITTED) + ungrouped = model.start_chain(table, ["x", "z"], ["target"], weights="weight") + assert "groups_sha256" not in ungrouped.to_dict() + state = model.start_chain( + table, ["x", "z"], ["target"], weights="weight", groups="household" + ) + wire = json.loads(json.dumps(state.to_dict())) + assert len(wire["groups_sha256"]) == 64 + assert QRFChainState.from_dict(wire) == state + recipient = table.loc[:, ["x", "z"]] + empty = pd.DataFrame(index=recipient.index) + with pytest.raises(ValueError, match="fold grouping changed"): + model.fit_draw_next( + table, recipient, empty, state=state, weights="weight", groups=None + ) + step = model.fit_draw_next( + table, recipient, empty, state=state, weights="weight", groups="household" + ) + assert step.fitted.gate_outcomes()["target"] == GateOutcome.CROSS_FITTED + + +def test_gate_outcomes_name_what_each_target_got(rare_positive_frame) -> None: + table = _two_class_table(200, seed=6) + table["thin"] = 0.0 + table.loc[:3, "thin"] = 1.0 # four positive rows: fewer than five folds + table["always"] = 1.0 + table["x"].abs() + fitted = RegimeGatedQRF(n_estimators=2, seed=1, gate_calibration=CROSS_FITTED).fit( + table, ["x", "z"], ["target", "thin", "always"], weights="weight" + ) + assert fitted.gate_outcomes() == { + "target": GateOutcome.CROSS_FITTED, + "thin": GateOutcome.THIN_CLASS, + "always": None, + } diff --git a/packages/microcosm-graph/tests/fixtures/parity/kernels/fit.qrf/pins.json b/packages/microcosm-graph/tests/fixtures/parity/kernels/fit.qrf/pins.json index 43f777a08a..858773a49e 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/kernels/fit.qrf/pins.json +++ b/packages/microcosm-graph/tests/fixtures/parity/kernels/fit.qrf/pins.json @@ -1 +1 @@ -{"dependencies":{"numpy":"2.4.6","pandas":"3.0.3","quantile-forest":"1.4.2","scikit-learn":"1.8.0"},"implementation_hash":"5eb07d7c48a24c7b11426d67879b6dcca0af8e4de2835228a4eab9b5f9ba2f72","kernel":"fit.qrf@1","node":"fit_qrf","node_key":"e5383f06ebd1ee0573233c4573ab4fd463030b012674e6ddc8b46bc759b5df00","numeric":"platform_bitwise","platform":"arm64/darwin/py3.14","platforms":{"arm64/darwin/py3.14":{"direct":"direct.csv","node_key":"e5383f06ebd1ee0573233c4573ab4fd463030b012674e6ddc8b46bc759b5df00"},"x86_64/linux/py3.13":{"direct":"platforms/x86_64-linux-py3_13/direct.csv","node_key":"c56ada7dc523c155af5ae3cbc8b9619a79356b27632ab0d338e07023877c771f"},"x86_64/linux/py3.14":{"direct":"platforms/x86_64-linux-py3_14/direct.csv","node_key":"2c78582881c8a45d9112cc72899c41d7d1254a46e834f4f1edc2a67c8e1d086f"}},"seed":947} +{"dependencies":{"numpy":"2.4.6","pandas":"3.0.3","quantile-forest":"1.4.2","scikit-learn":"1.8.0"},"implementation_hash":"8d4dfdf3de30ae9c65ed088ea3549bfe57221ec541bcedc1f23e9cfa915dd307","kernel":"fit.qrf@1","node":"fit_qrf","node_key":"9c6faf71d3c5d1669250800feec91d7eb3f8051ce39e33d4757a23ff66a680be","numeric":"platform_bitwise","platform":"arm64/darwin/py3.14","platforms":{"arm64/darwin/py3.14":{"direct":"direct.csv","node_key":"9c6faf71d3c5d1669250800feec91d7eb3f8051ce39e33d4757a23ff66a680be"},"x86_64/linux/py3.13":{"direct":"platforms/x86_64-linux-py3_13/direct.csv","node_key":"a74f0e59e0c611f1ed04a5cf35339ce7a857e2a3f450bbbde94675b9d2a13726"},"x86_64/linux/py3.14":{"direct":"platforms/x86_64-linux-py3_14/direct.csv","node_key":"a86ca61c472aec7f509bc88239eba33e59ab6204cbf1878426eb9a43d637dcf3"}},"seed":947} diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/cgt_asset_type_facts.json b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/cgt_asset_type_facts.json index e2e93890da..5ecb2cc164 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/cgt_asset_type_facts.json +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/cgt_asset_type_facts.json @@ -2,70 +2,70 @@ "resource": "synthetic-cgt-asset-type.json", "resource_sha256": "synthetic", "source_commit": "synthetic", - "table4_all_gains": 6432140.442900506, + "table4_all_gains": 6528692.788527055, "table4_all_tax": 0.0, - "table4_all_taxpayers": 15.620692070399844, + "table4_all_taxpayers": 15.62069207039984, "table4_bands": [ { - "gains": 5904.4347908435375, + "gains": 3759.25674264217, "lower_bound": 0, "tax": null, - "taxpayers": 1.3744469955188574, + "taxpayers": 0.9544743161010291, "upper_bound": 10000 }, { - "gains": 32034.75504552742, + "gains": 35998.223459746056, "lower_bound": 10000, "tax": null, - "taxpayers": 1.9314676701362754, + "taxpayers": 2.3043377283650828, "upper_bound": 25000 }, { - "gains": 54864.57734075372, + "gains": 83551.22727403582, "lower_bound": 25000, "tax": null, - "taxpayers": 1.5032132743952833, + "taxpayers": 2.336147032236463, "upper_bound": 50000 }, { - "gains": 152528.4560198875, + "gains": 84016.32859646651, "lower_bound": 50000, "tax": null, - "taxpayers": 2.202207105013423, + "taxpayers": 1.2291492727385187, "upper_bound": 100000 }, { - "gains": 243549.7014216287, + "gains": 202202.56567286063, "lower_bound": 100000, "tax": null, - "taxpayers": 1.441606580784334, + "taxpayers": 1.244114974273492, "upper_bound": 250000 }, { - "gains": 452970.1208343457, + "gains": 522753.2866662315, "lower_bound": 250000, "tax": null, - "taxpayers": 1.3231397337347075, + "taxpayers": 1.3683947425890515, "upper_bound": 500000 }, { - "gains": 822724.5070800455, + "gains": 1556811.2025645028, "lower_bound": 500000, "tax": null, - "taxpayers": 1.1770468204494895, + "taxpayers": 2.1444733065456347, "upper_bound": 1000000 }, { - "gains": 4667563.8903674735, + "gains": 4039600.697550569, "lower_bound": 1000000, "tax": null, - "taxpayers": 4.667563890367473, + "taxpayers": 4.039600697550569, "upper_bound": null } ], - "table4_individuals_gains": 6432140.442900506, + "table4_individuals_gains": 6528692.788527055, "table4_individuals_tax": 0.0, - "table4_individuals_taxpayers": 15.620692070399844, + "table4_individuals_taxpayers": 15.62069207039984, "table4_trusts_gains": 0.0, "table4_trusts_tax": 0.0, "table7_total_disposals": 2743095.2380952383, @@ -115,11 +115,11 @@ } ], "table8a_disposals_total": 29.456162189896844, - "table8a_gains_total": 46158292.702458374, - "table8a_tax_total": 9231658.540491676, + "table8a_gains_total": 41189552.9002446, + "table8a_tax_total": 8237910.580048921, "table8a_taxpayers_total": 26.778329263542584, - "table8b_all_gains": 46158292.702458374, + "table8b_all_gains": 41189552.9002446, "table8b_all_taxpayers": 26.778329263542584, - "table8b_individuals_gains": 46158292.702458374, + "table8b_individuals_gains": 41189552.9002446, "table8b_individuals_taxpayers": 26.778329263542584 } diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json index 0bf8bdfb4b..e733870f98 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/fixture.json @@ -894,7 +894,7 @@ "nhs_admitted_patient_spending", "nhs_outpatient_spending" ], - "notes": "Ports ETB public-services QRF at household grain, uprates the FYE-2024 donor to the FRS 2024-25 base year by the declared uprate_donor_columns step (education by the engine's CPI index, rail support by ORR table 7270's own FY2024-25 over FY2023-24 outturn, bus support by DfT BUS05bi England net support, a factor the pricing overrides outside Wales and Northern Ireland and which therefore only positions the donor before the QRF), prices bus support from the frame's journeys (microcosm#930; the #890 rake to the published net support retired on Mar\u00eda's ruling of 2026-09-23): per household, the published concessionary travel reimbursement per concessionary boarding times its eligible persons' boardings plus the rest of the published net support per boarding times every boarding, boardings being the nts_bus_travel trips times the fare pricing's boardings per resident trip, for London and England outside London (DfT BUS05bi and BUS01; outside London the concessionary boardings are BUS01c's older and disabled journeys, the travel the reimbursement pays for, microcosm#1385) and Scotland (Scottish Transport Statistics components and journeys); Wales (no published boardings) and Northern Ireland (the NITHC accounts carry bus and rail jointly) keep the chain's raw draw, clipped to donor support; the published totals stay bound as calibration targets and now measure the priced quantity, computes rail_usage from the 2024 fare index, and allocates NHS visits/spending to persons using the signed half-open age bands with the donor table's native 85-89, 90-94 and 95+ top bands (the former 85+ fold-in was retired once age_tail moved ahead of this stage and recipients could populate those bands). The year-max donor filter resolves to 2023 on the pinned tab (the file labels financial year ending 2024 as year 2023), so the services training year coincides with the VAT training year and the fare-index year - the incumbent's apparent three-way year mismatch is vacuous on this vintage. The recipient is_adult and is_child counts are the household's FRS claimants and partners and its other members (is_uc_claimant), as the donor's adults and childs count adults and dependent children, not the engine's age-18 split (uk-data#486, microcosm#1095).", + "notes": "Ports ETB public-services QRF at household grain, uprates the FYE-2024 donor to the FRS 2024-25 base year by the declared uprate_donor_columns step (education by the engine's CPI index, rail support by ORR table 7270's own FY2024-25 over FY2023-24 outturn, bus support by DfT BUS05bi England net support, a factor the pricing overrides outside Wales and Northern Ireland and which therefore only positions the donor before the QRF), prices bus support from the frame's journeys (microcosm#930; the #890 rake to the published net support retired on Mar\u00eda's ruling of 2026-09-23): per household, the published concessionary travel reimbursement per concessionary boarding times its eligible persons' boardings plus the rest of the published net support per boarding times every boarding, boardings being the nts_bus_travel trips times the fare pricing's boardings per resident trip, for London and England outside London (DfT BUS05bi and BUS01; outside London the concessionary boardings are BUS01c's older and disabled journeys, the travel the reimbursement pays for, microcosm#1385) and Scotland (Scottish Transport Statistics components and journeys); Wales (no published boardings) and Northern Ireland (the NITHC accounts carry bus and rail jointly) keep the chain's raw draw, clipped to donor support; the published totals stay bound as calibration targets and now measure the priced quantity, computes rail_usage from the 2024 fare index, and allocates NHS visits/spending to persons using the signed half-open age bands with the donor table's native 85-89, 90-94 and 95+ top bands (the former 85+ fold-in was retired once age_tail moved ahead of this stage and recipients could populate those bands). Its QRF sign gates are cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: each is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on households the gates were not fitted to. The year-max donor filter resolves to 2023 on the pinned tab (the file labels financial year ending 2024 as year 2023), so the services training year coincides with the VAT training year and the fare-index year - the incumbent's apparent three-way year mismatch is vacuous on this vintage. The recipient is_adult and is_child counts are the household's FRS claimants and partners and its other members (is_uc_claimant), as the donor's adults and childs count adults and dependent children, not the engine's age-18 split (uk-data#486, microcosm#1095).", "operations": [ { "annualization_weeks": 52, @@ -946,6 +946,7 @@ ] }, { + "gate_calibration": "cross_fitted", "kind": "fit_weighted_qrf_chain", "n_estimators": 100, "predictors": [ @@ -3289,7 +3290,7 @@ "hmrc_spi_total_investment_income", "hmrc_spi_assessable_income" ], - "notes": "Runs the SPI-trained income QRFs on the raw-spine support channel, drawing for its claimants and partners aged 16 and over so dependants aged 16 to 19 keep their FRS twin's values (uk-data#504, microcosm#1095), initializes FRS charity columns to zero, trains FRS-only stage 2 on the FRS rows' reported values, flags the rows it drew (person_is_spi_income_recipient) so later stages tell tape-concept rows from FRS-concept ones without re-deriving the recipient rule (microcosm#840), leaves every FRS-channel income as reported (no base-channel redraw of dividends; uk-data#498, microcosm#1095), and emits a sidecar-only 208-fact replay report for the spine path. Stage 2 also draws trading_loss, the year's trading loss the tape does not carry, from the FRS rows (uk-data#528), and a drawn row whose self_employment_income is positive keeps no loss, so profit and loss never both hold an amount, as on the FRS rows (microcosm#1095). The chain draws self_employment_income net of the tape's losses brought forward (LOSSBF), as the tape holds profits, and last of all, so no earlier draw moves, the year's profit before them and the losses. After the FRS-only fill and the HMRC aggregates the stage moves the losses out of the profit into loss_relief and ni_class_4_losses_brought_forward, the inputs policyengine-uk relieves them against (income tax under ITA 2007 s.83, Class 4 under SSCBA 1992 Sch 2 para 3), so Universal Credit, HBAI and market income read the year's profit; where the drawn net profit is positive the losses are its gap to the year's profit and where it is zero they are at least that profit, so the profit after the relief is the drawn net profit on every row, which the HMRC aggregates and the HMRC self-employment rows read (uk-data#528, microcosm#1095). The engine carries both losses into each projected year at their nominal value while the profit grows with its index. Stage 2 draws the six owner-manager inputs last, the five flags as 0 or 1 and then the income share, so each follows the drawn incomes; the root stage's rules then hold on the drawn rows (an owner works in the company, its other inputs need an owner, and a company carries on a trade or a property business, never both), since the tape carries no director answers (microcosm#1095). A drawn row's annual income descriptors follow its drawn incomes. The tape records the tax year's income, so its pay, profit and private pension shares are 1, and its contributory benefits, stage-2 draws on the current concept with no spell of their own, take share 1 too. It keeps its twin's other-spell pay only where it drew no pay, and its twin's ceased self-employment only where it drew no profit, since the bridge draws a record without pay for a twin who left a job in the year. An undrawn copy keeps its twin's descriptors with its twin's incomes. A drawn row's annuity and trust descriptor is zero, since the tape's private pension excludes those payments and books them as other income (microcosm#1428).", + "notes": "Runs the SPI-trained income QRFs on the raw-spine support channel, drawing for its claimants and partners aged 16 and over so dependants aged 16 to 19 keep their FRS twin's values (uk-data#504, microcosm#1095), initializes FRS charity columns to zero, trains FRS-only stage 2 on the FRS rows' reported values, flags the rows it drew (person_is_spi_income_recipient) so later stages tell tape-concept rows from FRS-concept ones without re-deriving the recipient rule (microcosm#840), leaves every FRS-channel income as reported (no base-channel redraw of dividends; uk-data#498, microcosm#1095), and emits a sidecar-only 208-fact replay report for the spine path. The sign gates of both stages, and of the FRS reference forests the transport locates twins on, are cross-fitted (gate_calibration: cross_fitted on both operations; microcosm#1359), each calibrated on the donors its fold gates left out, with each FRS household's members in one fold. The reference forests take stage 1's declaration, so the gate that places a twin's observed sign and the tape gate that reads it are calibrated alike. Stage 2 also draws trading_loss, the year's trading loss the tape does not carry, from the FRS rows (uk-data#528), and a drawn row whose self_employment_income is positive keeps no loss, so profit and loss never both hold an amount, as on the FRS rows (microcosm#1095). The chain draws self_employment_income net of the tape's losses brought forward (LOSSBF), as the tape holds profits, and last of all, so no earlier draw moves, the year's profit before them and the losses. After the FRS-only fill and the HMRC aggregates the stage moves the losses out of the profit into loss_relief and ni_class_4_losses_brought_forward, the inputs policyengine-uk relieves them against (income tax under ITA 2007 s.83, Class 4 under SSCBA 1992 Sch 2 para 3), so Universal Credit, HBAI and market income read the year's profit; where the drawn net profit is positive the losses are its gap to the year's profit and where it is zero they are at least that profit, so the profit after the relief is the drawn net profit on every row, which the HMRC aggregates and the HMRC self-employment rows read (uk-data#528, microcosm#1095). The engine carries both losses into each projected year at their nominal value while the profit grows with its index. Stage 2 draws the six owner-manager inputs last, the five flags as 0 or 1 and then the income share, so each follows the drawn incomes; the root stage's rules then hold on the drawn rows (an owner works in the company, its other inputs need an owner, and a company carries on a trade or a property business, never both), since the tape carries no director answers (microcosm#1095). A drawn row's annual income descriptors follow its drawn incomes. The tape records the tax year's income, so its pay, profit and private pension shares are 1, and its contributory benefits, stage-2 draws on the current concept with no spell of their own, take share 1 too. It keeps its twin's other-spell pay only where it drew no pay, and its twin's ceased self-employment only where it drew no profit, since the bridge draws a record without pay for a twin who left a job in the year. An undrawn copy keeps its twin's descriptors with its twin's incomes. A drawn row's annuity and trust descriptor is zero, since the tape's private pension excludes those payments and books them as other income (microcosm#1428).", "operations": [ { "artifact_roles": [ @@ -3401,6 +3402,7 @@ "draw": "twin_conditional_quantiles", "employment_income_source_semantics": "PolicyEngine input = PAY + EPB + TAXTERM, matching the pinned enhanced-FRS pipeline; it is not the Table 3.6 measure", "fit_weight_kind": "design", + "gate_calibration": "cross_fitted", "hmrc_employed_income_source_semantics": "Derived after each draw as max(0, PAY + EPB - EXPS) + INCPBEN + OSSBEN + TAXTERM + UBISJA + MOTHINC, using normalized leaves identically on FRS and SPI channels", "identity_uniforms": { "key": "person_source_id", @@ -3670,6 +3672,7 @@ "gender", "region" ], + "gate_calibration": "cross_fitted", "joint_draw": true, "kind": "fit_weighted_qrf_stage2", "n_estimators": 4, @@ -4472,7 +4475,7 @@ "car_co2_emissions", "car_engine_size" ], - "notes": "Ports the incumbent LCFS consumption QRF, including NEED energy raking, with adjudicated weighted fits and an identity-keyed seed-0 fuel flag. The vehicle count is a numeric QRF predictor on both sides (LCFS a124 on the donor, the was_wealth draw of WAS vcarnr8 on the recipient, both clipped to 0-5), which retires the incumbent's WAS-to-LCFS has-fuel bridge (microcosm#890 A). The recipient fuel flag draws each of a household's vehicles as zero-emission at the battery-electric and fuel-cell share of the vendored DfT VEH1103 licensed-car stock (2024, Great Britain; plug-in hybrids count as fuel buyers), replacing the hand-copied NTS share (microcosm#890 E2): a household with vehicles buys fuel unless every one of them is zero-emission, so it is flagged at one minus that share raised to its vehicle count, and a one-vehicle household keeps the draw it had when the whole household was drawn at once (microcosm#1278; before, a household with several vehicles was all one or the other). The frame holds no fuel type, so the draw, keyed on the household identity, is what makes a vehicle-owning household a fuel buyer. Since microcosm#1095 B3 (J2) the per-car zero-emission share follows the household's income fifth: the national share times the fifth's relative risk among the cars NTS households keep (UK Data Service SN 5340, survey years 2022-2024, at the interview weight W3; zero-emission in the DVLA-linked 0 g/km CO2 band, the about three in ten cars without a linked band left out, as missing at random within their fifth), normalised over the frame's cars so the national share is the licensed-car one. The NTS ranks England's households by total gross income, McClements-equivalised, so the frame ranks household_gross_income over the engine's before-housing-costs equivalence scale, in household-weighted fifths; a fifth on fewer than 10 zero-emission NTS cars would pool with its neighbour (a statistical floor, not the disclosure floor of 3). The uniforms are the same, so only the threshold moves. With the redraw of microcosm#1113 every flagged household buys fuel, so this flag alone sets fuel incidence; within an income fifth, who holds the zero-emission cars stays random. The household input uses_energy_prepayment_meter, which policyengine-uk reads for the July 2023 to March 2024 Energy Price Guarantee prepayment discount (PolicyEngine/policyengine-uk#2098, from 2.123.3), is drawn by the declared impute_prepayment_meter step (microcosm#1110): the donor prepays when it last put money on an electricity, gas or combined key or meter (b1751, b1701, b233, which the LCF asks only of prepayment-meter households) or its diary records a slot-meter payment (c45114, c45214), so electricity-only prepayment counts and a household with no meter payment, including one that did not answer, does not; a weighted regime-gated QRF on the chain's predictors fits that flag and each recipient draws it at uniforms keyed on its household id, which moves no other draw. The release exports it: policyengine-uk reads it from 2.123.3 and an older engine, Microcosm's locked one among them, ignores a column it does not know; the incumbent does not carry it until uk-data#539, so it is a reviewed extra column of the export surface. The frame flags about 3.0 million Great Britain households (10.5 %) at prior weights, against the around three million prepayment households the government counted when the discount began in July 2023 (a different reference period, households in both). Energy support clipping is exempt because NEED raking governs those columns. Bus fares are clipped to donor support before the pricing step (Mar\u00eda's rulings 2026-09-15 and 2026-09-17), which bounds the region no area prices (Wales keeps the chain's raw draw) while the priced regions move beyond donor support afterwards; for that reason the column carries no committed support bound for the terminal gate. Domestic energy is raked in kWh to the NEED 2024 shape at the DESNZ level and priced at the average prices paid (microcosm#890 F, chronicle#270), where both NEED rakes take their mean-kWh margins from the vendored NEED 2024 tables (England and Wales by income band, tenure, property type and region; Scotland by income band, tenure and property type with the all-dwellings mean as its region margin; Northern Ireland untouched), the declared price_domestic_energy step converts spend to kWh and back at each household's QEP price region through the committed crosswalk using the calendar-2024 average variable unit cost and fixed cost across payment methods, standard metering, including VAT (Northern Ireland gas at the UK average because QEP publishes no Northern Ireland gas row), a gas fixed cost only for connected households, the gas connection imposed on the recipient frame at the published share of each region (DESNZ subnational gas meters over electricity meters, 2024) by disconnecting gas-positive households in an identity-keyed uniform order, skipping a household whose weight would overshoot the published share (Northern Ireland has no subnational row and keeps the positive-gas rule), and, where the draw leaves a region below its share, by the declared connect_rule (microcosm#1164): two weighted fits on the chain's predictors give each zero-gas household the probability that a donor like it pays for gas (a gradient-boosted classifier of the donor's gas payers) and the gas such a donor pays (a regime-gated QRF of the payers' gas spend, at quantiles keyed on the household id), and the region's zero-gas households are connected in an identity-keyed order drawn in proportion to that probability, by the same weight-fitting walk, until the share is met. The labelled energy split leaves about 80 % of donors paying for gas against the about 85 % of homes DESNZ counts gas meters for (the derivation it replaced gave gas to 98 %), so without the connect leg nine of the eleven Great Britain regions fell short of their share, and after the four-margin NEED rake one factor per fuel scales the kWh so the prior-weighted frame total equals the fuel's declared level for calendar 2024: for gas the DESNZ Energy Trends domestic consumption at actual temperature summed over the four quarters, and for electricity, the one fuel in spend_level_fuels (microcosm#1418), the kWh the ONS Consumer Trends 04.5.1 household spending buys at QEP's United Kingdom average prices once the standing charges of every UK domestic meter DESNZ counts come off (gas stays on Energy Trends while ONS 04.5.2 counts bottled gas, microcosm#1095); NEED gas means are per gas-metered household, so the gas kWh margins are raked over connected households only while electricity is raked over every household, and the energy_rake gate recomputes every NEED mean, the DESNZ level and the connection shares from the vendored rows. After the level, no household is left above the domestic meter definitions behind the DESNZ total (NEED Annex B: gas meters under 73,200 kWh a year, electricity meters under 50,000 kWh on profile classes 1 and 2; Mar\u00eda's ruling of 2026-10-12 on microcosm#1207's extreme energy values): the declared household_kwh_ceiling caps a household there, the households below it in the capped households' own NEED cells are re-raked to those cells' levelled means, and a proportional step restores the DESNZ total (microcosm#1164); the receipt counts the households capped and the share of the total they gave up, and the energy_rake gate checks both. Mobile homes have no NEED property-type row, so the rake takes them to the all-dwellings mean, the incumbent's translation; where every mobile home of a NEED geography draws a spend at or below the standing charge, that cell has no kWh for the rake to scale, and the declared zero_kwh_cells_at_need_mean starts it at its NEED mean before the first sweep (microcosm#1240). The receipt lists the cells it started, and the energy_rake gate fails on a started cell the stage does not declare and on any other cell with a zero mean. Both rakes band households on gross income, NEED's concept: the donor on LCFS p344p, cash income before tax, National Insurance, council tax and pension contributions, and the recipient on the same concept, its HBAI net income with the deductions policyengine-uk takes to reach it added back (council tax and domestic rates, income tax, National Insurance, student loan repayments, employee and personal pension contributions, maintenance and child payments, LVT), which the stage materializes for that band alone (microcosm#1164). Before it the recipient fell back to its HBAI net income, which put households in too low a band; the engine's household_gross_income would put them in too high a one, since it adds capital gains and the in-kind NHS, education and transport spending to cash income. The disconnection walk's seed-0 uniform order makes every group of households (dwelling type, income band, support channel) lose the same expected share of its drawn connected mass, so only the level of the drawn connection moves; the smallest-drawn-gas-first order it replaces piled the disconnections onto low-draw flats once the SPI support households drew gas from their own incomes, and NEED's Scottish property-type means then implied a level 2.6 % above the Scottish all-dwellings mean, a margin conflict the rake could not close. Bus fares are priced from journeys (microcosm#930), where the nts_bus_travel stage imputes each person's annual bus-in-London and other-local-bus trips and their concessionary eligibility, and the declared price_bus_journeys step sets bus_fare_spending as the sum over the household's non-eligible persons of trips times boardings per resident trip (the published BUS01 journeys over the published NTS0705a trips per resident times the ONS population) times the yield per fare-paying boarding (BUS05ai receipts over journeys less concessionary journeys; in England outside London only the older and disabled ones of BUS01c, as policyengine-uk prices it from 2.158.3), per area; bus-in-London trips take the London area's price for every resident, other-local-bus trips the price of the residence area (England outside London; Scotland and Northern Ireland from their own receipts and journeys with England's trip rate as the declared proxy); Wales is unpriced and keeps the raw draw. The chain still draws bus_fare_spending so later targets condition on the same raw draw; the emitted column is the priced value. The receipt records every factor, the frame-implied boardings beside the published ones and the frame's eligible trip share beside the publisher's concessionary boarding share, so the prior-weight fit of the bound receipts targets is read as a composition check, never a level the stage set; the #890 incidence draw and fare rake are retired. The 2024-25 diary (UKDS SN 9603, 2nd edition, whose household tab carries the annual weight as cal_weight_annual, the name weighta had; microcosm#1164) is moved to the base year by the declared uprate_donor_columns step (microcosm#890). Consumption columns and bus fares take the engine's CPI index from the April-to-March diary year, placed on the calendar-year index at three quarters of 2024 and one of 2025, back a quarter to calendar 2024 (microcosm#1113; the diary sits a quarter past it, so the factor is below one; the fare factor survives only where no fare cell levels the column, i.e. Wales). Income predictors take a factor of one: the diary year is the FRS 2024-25 year they are matched against. Petrol and diesel take the DESNZ pump-price times HMRC litres per head outturn from the vendored road_fuel_anchors.json, which sets only their donor distribution because the level step follows; the energy columns are exempt because the NEED 2024 shape at the DESNZ level and the QEP average prices paid set their level. The household adult and child counts (LCFS G018 and G019, the survey's age-18 split) predict on both sides; the recipient counts its members by age, not through the engine's is_adult and is_child flags, which policyengine-uk#1896 deprecates (uk-data#486, microcosm#1095). Road fuel incidence and level are set by two declared steps (microcosm#1113). The two-week diary leaves about a third of car-owning donors with no fuel purchase, which the chain reproduces among the households the fuel flag marks as fuel buyers, so the redraw_zero_road_fuel step redraws a flagged household that drew zero from the donor's distribution among households with positive road fuel, on the chain's predictors: a weighted regime-gated QRF draws the total, positive by construction, then the petrol share of it, at quantiles keyed on the household id; positive draws are kept. Then the level_road_fuel step, after the fuel flag has zeroed the households without a fuel car, scales petrol and diesel so their prior-weighted total equals ONS Consumer Trends household spending on COICOP 07.2.2 for calendar 2024 (the year of the DESNZ pump prices the donor uprating uses) less the donor's own other-fuels share of 07.2.2 (c72213). Since microcosm#1095 B3 (K) each fuel is levelled to that total times its share of household-paid spend, so the total stays and each household's spend within a fuel keeps its relative size, but the diary's petrol/diesel mix gives way to the household one: HMRC's FY2024-25 litres of the fuel times DESNZ's cars share of its road use (the litres audit's benchmark), times the NTS household-paid share of car miles, at the 2024 pump prices. A kept car's private and commuting miles are household-paid, its business miles and every company-car mile are not, and England stands for the UK. The diary's 07.2.2 has three lines (c72211 petrol, c72212 diesel and c72213, the other motor fuels and lubricants) and none for vehicle electricity. The LCFS diary records about a quarter less road fuel than ONS, and binding the OBR cars receipts had closed that gap by moving weight onto fuel-buying households; petrol and diesel therefore carry no committed support bound, like the other levelled columns. The totals that contain levelled columns are written back around them by the declared recompose_from_remainder step (microcosm#1113): each keeps its own chain draw less the chain's draws of the parts the stage re-levels, kept before any step touches them and floored at zero where the parts outgrow the total, and adds the levelled parts back, so housing_water_and_electricity_consumption is its draw less the drawn electricity and gas plus the levelled electricity and gas, and transport_consumption its draw less the drawn petrol, diesel and bus fares plus the levelled petrol and diesel and the priced bus fares. The chain draws each part after, and conditional on, its total, so the remainder is the chain's own split; a remainder drawn as a chain target of its own over-drew the vehicle-purchase tail of transport, 10 to 13 percent above the donor in-sample. The chain's domestic-energy target is the electricity and gas the stage derives from the diary's fuel, light and power (p537) by its labelled parts, from the LCF User Guide's derived-variable labels and P537 definition (microcosm#1164): each fuel's last account payment less its rebate (b489 electricity, b490 gas, read as the tab carries them; the stage refuses a donor where b489 equals b175 less b178, or b490 equals b170 less b173, to the penny for under 95 percent of that fuel's account payers, which pins the labels and the rebate's sign), its prepayment key or meter payment (b1751, b1701), its component of a combined utilities bill (b227 electricity, b226 gas) and of a combined key or meter payment (b2332, b2331), and the diary's second-dwelling account and slot-meter lines (c45112 and c45114, c45212 and c45214); what a combined payment leaves unsplit (the combined bill b231 less its rebate b174, and the combined key or meter payment b233, each less its parts) goes by the household's own electricity share where it pays for both fuels, and otherwise by the donor's mean share of the households that do, since a combined payment means the household pays for both; a donor with no such household fails. The diary's other fuels (central-heating oil b017 and c45312, bottled gas b018 and c45222, coal and coke c45411, wood and peat c45412, hot water, steam and ice c45511) are neither, and the donor_energy_split receipt records the split against p537: what reading refunds as zero adds, what the unclipped parts differ from p537 by, the weighted share of donors whose unclipped parts differ from their p537, and the account identity shares. The derivation it replaces read b226 as electricity by direct debit and b489 and b490 as prepayment payments, where the labels make them the gas component of a combined bill and the electricity and gas account payments less rebates. The liquid fuels (central-heating oil and paraffin with bottled gas, LPG with liquid) and the solid fuels (coal, coke, wood and peat) are drawn as liquid_fuel_consumption and solid_fuel_consumption, the inputs policyengine-uk 2.149.0 reads (pe-uk#2572; Mar\u00eda's ruling of 2026-10-22), after the eighteen spend targets so that every earlier draw is the chain's own, uprated to calendar-2024 prices as every diary spend column is; the housing total nets their draws and adds them back unchanged, so it always holds them, and hot water, steam and ice stays in its remainder. The receipt records the published ONS 04.5.3 and 04.5.4 spend beside each fuel's donor total at diary prices and the frame's draw (published_fuels). Before the hold, each COICOP division's drawn spend per household (a recomposed total's remainder, any other division's whole draw) is set against the donor's mean of the same spend (for housing and transport, the donor's total less the same parts, since the levelled parts keep their published levels and are no over-draw); a division above the divisions' shared ratio, measured once before any levelling, comes down to it (Mar\u00eda's rulings of 2026-10-23 and 2026-10-24, microcosm#1278; Vahid's review of microcosm#1383, item 9); the receipt records each division's ratio and factor and the shared ratio (division_levelling) and each recomposed total's levelling_factor. Each total is then held to the donor's realised maximum of that total (maximum_total: donor_support, the support every drawn column is clipped to; microcosm#1164), never below its parts, the excess coming out of its remainder: a remainder near the top of the diary's range plus levelled parts larger than the drawn ones would otherwise leave it. The two totals keep their committed support bounds, which the terminal support gate applies to the emitted frame; the recomposed_totals gate checks the declaration and the receipt, whose rows held at the maximum and weighted mass taken enter its identities. Every household spend column is at calendar-2024 prices as households paid them, the H5's year that policyengine-uk projects from and the calibration uprates to the calendar-2025 window (microcosm#1113): the diary columns by the CPI uprating to 2024, road fuel at ONS 07.2.2 for 2024, energy at DESNZ volume and QEP prices for 2024, and bus fares at each area's fiscal-year yield re-priced to 2024 by its fares index (the DfT local bus fares index by quarter for London and England outside London, Scotland's calendar-year index; Northern Ireland, which publishes no fares index, from its own yields of the two fiscal years 2024 overlaps, weighted three months and nine (microcosm#1207), in place of England's index, which carries the January 2025 rise in the English fare cap Northern Ireland did not have); the consumption_basis gate holds every level-setting step to that year. policyengine-uk applies the fiscal 2024-25 rules to model year 2024 (it samples each parameter at 30 April), so every levelled column sits about a quarter before the midpoint of the policy year it is taxed in; the calibration binds calendar-year facts as published and fiscal-year facts at the calendar window (Mar\u00eda's rule of 2026-09-22). The stage receipt also reports, for each of the twelve COICOP divisions, the prior-weighted frame total against ONS Consumer Trends for the same calendar year less the classes a household diary does not record (02.3 narcotics, 04.2 owner-occupiers' imputed rent and 12.6.1 FISIM), on ONS's domestic concept, and the twelve together against the national concept as well; it is report-only (microcosm#1113). The report-only litres audit compares each fuel's frame litres with HMRC's clearances of that fuel scaled by the cars share of its road use, from the vendored DESNZ sub-national road transport fuel consumption by vehicle type and fuel (PolicyEngine/chronicle#322); the OBR cars share of fuel duty receipts, uniform across fuels, stays beside the total. The liquid fuels hold bottled gas (b018, c45222), which COICOP puts under 04.5.2 (gas) and ONS's 04.5.3 leaves out, so the receipt also gives the donor's liquid fuels without it; neither heating-fuel column is levelled to ONS: the donor's diary totals are about twice ONS's, and the frame's draws reach neither those nor ONS's, so a costing on either needs levelling to ONS first (Vahid's review of microcosm#1383, item 8). After its spend targets and the two fuels the chain draws five shares the derive step computes on the donor from the diary lines (microcosm#1359): tobacco's share of the off-trade alcohol and tobacco that make up P602 (c22111, c22121 and c22131 over those three and the seven lines of alcohol brought home, c21111 to c21311; P602 also sums narcotics, c23111, which the end-user tab does not carry), on-trade alcohol's share of restaurants and hotels (the eight lines of drinks away from home, cb111c to cb111j, over P611, clipped at one because the tab stores P611 to one decimal place), gambling stakes' share of recreation (the seven games-of-chance stake lines P609 sums, c94311 to c94316 and c94319: pools, bingo, lotteries, bookmaker and tote betting with gaming machines, and the National Lottery; the winnings lines beside them sit in no total), the National Lottery's share of those stakes (scratchcards and draws, c94316 and c94319, over the seven) and the betting and gaming share of the rest (football pools, bingo, and bookmaker and tote betting with gaming machines, c94311, c94312 and c94314, over the other five; society lotteries, c94313, and the Irish Lottery, c94315, pay no UK gambling duty). A household's tobacco, off-trade alcohol, on-trade alcohol and gambling stakes are its shares of the totals it carries, and its National Lottery and betting and gaming stakes its shares of its stakes, so the parts sum to the totals and no total, the VAT base included, moves; appended after the twenty targets, the shares move none of their draws. The shares and the spending they give are scratch, on no table; the report-only excise_shares receipt records each share on the frame beside the donor. The declared level_excise_quantities step turns that spending into policyengine-uk's excise inputs (microcosm#1359), so alcohol, tobacco and gambling duty stop scoring zero. Each national quantity is a published FY2024-25 figure from the vendored excise_facts.json, and the step gives each household its part in proportion to the spending that buys it, at prior weights (one factor per input, the level_road_fuel scaling), so the frame's weighted total of each input is the published one; a household that buys one product of a kind buys all of that kind in the national mix. Alcohol: each product's litres are HMRC's clearances of beer, cider, wine, spirits and other fermented products (the Alcohol Bulletin, in litres of pure alcohol) over the engine's own strength for the product, which policyengine-uk multiplies back, shared by off- and on-trade alcohol spending together; beer and cider take their draught shares from the clearances under draught relief, alone or with small producer relief, over all of their clearances, and the other products, whose draught clearances HMRC does not publish, keep the engine's zero, as does sparkling cider, which the bulletin counts within cider. A pound buys the same volume in a pub as in a shop under this rule, which leans the volume, and so the duty, towards on-trade drinkers: against a published on-trade volume share of about 27 percent, a pound spent in a pub is given about 1.6 times the volume it buys and a pound spent in a shop about 0.78 times, and about 11 percent of the volume sits with other households on the 2024-25 diary. No on-trade volume share can be archived (MESAS is a NielsenIQ and Circana dashboard with no fixed file), so the spending rule stands, its lean documented (Mar\u00eda's ruling of 2026-10-23). Tobacco: cigarettes a week and grams a week of hand-rolling tobacco, cigars and other tobacco are HMRC's clearances (the Tobacco Bulletin) over the engine's 52 weeks, shared by tobacco spending; heated tobacco sits within other tobacco in the bulletin, so it is charged at the other-tobacco rate and its own input keeps the engine's zero. Gambling: each input is its duty's dutiable base, HMRC's cash receipts for the duty (the Betting and Gaming bulletin) or Machine Games Duty's declared liabilities for the band, over the engine's FY2024-25 rate (Gaming Duty over the engine's effective-rate proxy for it), so the engine charges back the published receipts. General Betting Duty's base, its receipts over the fixed-odds rate, is split over the land-based fixed-odds, remote horse-racing, remote other, exchange and horse-and-dog pool inputs by the Gambling Commission's gross gambling yield for Great Britain, remote fixed-odds betting by the horse-racing share of all remote betting yield, since the Commission publishes no betting activity by event; its horse racing is not only UK racing, so the remote UK horse-racing input is overstated and, from April 2027, when the engine charges other remote betting at 25 percent, too much of the base stays at 15 percent and the rise is understated; and its pool betting can hold pools on other events, such as football pools, which pay Pool Betting Duty. Spread betting, which the Commission does not regulate, has no published base and keeps the engine's zero. Lottery Duty's base is shared by the National Lottery stakes and every other gambling base by the betting and gaming stakes, since the diary cannot tell remote from land-based play or one betting product from another; the society and Irish lotteries carry none. Both keys are first brought to published participation by the declared top_up_gambling_participation step (microcosm#1359; Mar\u00eda's ruling of 2026-10-25). The diary records a stake for about a fifth of the households the Gambling Commission's Gambling Survey for Great Britain 2025 implies (PolicyEngine/chronicle#391), and under any steady rate of play a two-week diary sees at least half of the four-week players, so the gap is play the diary misses, not its window. Each adult's chance of playing in four weeks and in twelve months is GSGB's published rate for its sex and age band (tables B.1 and B.3), as the union of a key's activities (table B.9: the National Lottery's draws, scratchcards and online instant-win games; betting, bingo, casino games, fruit and slots, football pools, other online instant-win games and other gambling), taken as independent within the population that plays any of them (all gamblers, or those who play more than lottery draws). A household plays when any adult does, combined at theta: 1 - (1 - p_max) x prod(1 - p_other)^theta, where 0 is one player per household and 1 adults who play independently. Theta is fitted on the donor so that GSGB's rates, applied to the donors' own adults, give the diary's ratio of the two-adult to the one-adult household rate, in which under-recording cancels if it is the same for both: 0.9 for the National Lottery, whose couples mostly buy their own tickets, and 0.08 for betting and gaming, mostly one adult's. Within nine strata (one, two, or three or more adults, by the youngest adult's age band: 18 to 34, 35 to 54, 55 and over), households without a stake are added by the gas connection walk's weight-fitting rule, in an identity-keyed order drawn in proportion to a regularised donor propensity (on the chain's predictors and spend draws, with recreation net of its gambling stakes, so that a recorded stake does not predict itself) times the household's published chance, first to the stratum's four-week share (regular players) and then on to its twelve-month share (occasional players); households the diary saw keep their stakes and count as regular. An added household's stake is a draw from the donor's positive stakes at a quantile keyed on its id, scaled so the added regular players' mean is the mean of the households the diary saw, and an occasional player's is a tenth of that. Both are assumptions: a two-week diary is more likely to catch frequent players, so the households it saw are probably the heavier players and equal means spread the base more evenly than play probably is; the tenth stands until GSGB publishes how often people play. The keys only re-share the bases: the stored spending stays the drawn one, so an added household's stakes are not in its recorded recreation spending. The gambling_participation gate recomputes the rates from the vendored rows, checks every stratum's shares, and holds each key's stake scale within 0.5 to 2, so a broken stake draw that the scaling would hide fails it. Known biases: the quantities are levelled to the published figures while spending and the diary's incidence stay at survey level (Mar\u00eda's ruling of 2026-10-23), so a household's alcohol or tobacco duty is one multiple of its own spending, the same for every household that carries it: at prior weights alcohol duty is about 0.41 times alcohol spending and tobacco duty about 2.2 times tobacco spending, since the diary records a fraction of what is bought; VAT on the same goods stays on the survey base. Tobacco duty also sits on fewer households than smoke: 8.2 percent of households carry it, against 11.9 percent of UK adults who smoked cigarettes in 2023 (ONS), while the share of households with a smoker is above the adult rate; the duty per carrying household is higher by the same factor. Part of the gap is the frame's: the chain's share draws come out zero more often than the donors' (10.3 percent of donors carry tobacco), mostly within households that carry the parent total. The gambling duties sit on the households the top-up brings to participation: 62.7 percent of households carry Lottery Duty and 29.8 percent the other gambling duties, against 10.7 and 2.0 percent on the diary's draws alone, and 47 percent of adults in Great Britain who gambled in the past four weeks of 2025 (27 percent once lottery-draw-only players are left out). The top-up's own biases: GSGB is taken as the level, though the Gambling Commission's guidance on its statistics reports that an invitation that mentions gambling raised participation estimates, and that its experiment could not conclude which estimates are the more accurate; under-recording is taken as even across households, so the donor propensity carries the diary's gradient by income, tenure, region and spending; the activity unions take activities as independent within their population, which GSGB's table B.13 rules out among players (45 percent of four-week gamblers took part in one activity, against 26 percent under independence), but a model in which each adult's activities share an intensity, which comes within 2.5 points of that share in every age band, moves neither key's union by more than 9 percent in any age band, nor the share of households carrying either key by more than 0.1 points; theta is one per key, fits households of three or more adults less well, and takes the share carrying betting and gaming from 28.5 percent at 0 to 41.2 percent at 1; the stake assumptions above; and GSGB covers adults in Great Britain in calendar 2025, so Northern Ireland's adults take its rates, against the FY2024-25 bases. On the real spine at prior weights, the share of households carrying the National Lottery rises from 51.5 percent in the bottom equivalised-income decile to 67.3 percent in the top, and betting and gaming from 26.8 to 34.8 percent, whose top decile holds 25.3 percent of the base; on the diary's draws alone betting and gaming is almost flat (1.9 to 2.1 percent, 18.9 percent of the base in the top decile). Ordered by the published chance alone, betting and gaming would run from 29.2 to 29.8 percent and the Lottery from 57.0 to 67.9 percent with GSGB's age mix, but neither key's regional pattern would follow GSGB's. With the propensity, the Lottery's does (a correlation of 0.67 across Great Britain's eleven regions, London lowest, as in GSGB), and betting and gaming's barely (0.11). Other tobacco (c22131) includes e-cigarette refills, so the tobacco inputs also follow vaping spending and a household that only vapes carries tobacco duty; Vaping Products Duty, from 1 October 2026, needs a key of its own. The draught shares are national constants, so a household that buys alcohol only in shops takes the same draught relief as one that drinks in pubs. The quantities are FY2024-25's, the excise year policyengine-uk charges in model year 2024 (its excise year runs from 6 April), and the engine holds them flat after it (PolicyEngine/policyengine-uk#2596). The step moves no spending column; the excise_quantities gate recomputes every level from the vendored rows. Since microcosm#1095 B3 the declared assign_car_attributes_from_nts step writes policyengine-uk's vehicle excise duty inputs, which no stage wrote, so every household's duty was zero: a household's vehicles less its members' company cars (an employer pays their duty) go one to each other adult, oldest first, a car beyond the adults left out (policyengine-uk holds one car a person); a household the fuel flag leaves without road fuel keeps zero-emission cars only, and one that buys fuel holds a petrol, diesel or other car first and further cars at its own per-car zero-emission share; each car is a kept NTS car of its class in the household's income fifth, drawn at its interview weight scaled to its fifth and age band's kept cars (fewer of the newest and oldest cars carry the registration record its CO2 bands come from), giving car_fuel_type (a diesel registered from 2021 meets RDE2), car_co2_emissions (its band's midpoint on the scale its duty regime reads), car_engine_size (none for a zero-emission car), car_first_registration_date (the reference date of 1 October 2025 less its age, drawn uniformly within its NTS band, so each car keeps its age; the open band of over 18 years closes at 25) and car_is_ved_exempt (DLA's higher-rate or PIP's enhanced mobility component exempts the member's own car, or the oldest car-holder's in their benefit unit). The list price keeps the engine's default, so no car pays the expensive-car supplement. Vehicle excise duty is measured, never bound: no target carries it.", + "notes": "Ports the incumbent LCFS consumption QRF, including NEED energy raking, with adjudicated weighted fits and an identity-keyed seed-0 fuel flag. The chain's sign gates are cross-fitted (gate_calibration: cross_fitted): each is the mean of five gates, each fitted on four of five folds of the donors stratified by sign, mapped by one weighted Platt calibration fitted on the folds they left out, so a rare spending is drawn at its donor rate on households the gates were not fitted to. A gate fitted and calibrated on the same donors memorises a rare spending's donors and draws it too rarely everywhere else: on held-out donors it drew solid fuels about a tenth as often as they occur and education under half as often. The vehicle count is a numeric QRF predictor on both sides (LCFS a124 on the donor, the was_wealth draw of WAS vcarnr8 on the recipient, both clipped to 0-5), which retires the incumbent's WAS-to-LCFS has-fuel bridge (microcosm#890 A). The recipient fuel flag draws each of a household's vehicles as zero-emission at the battery-electric and fuel-cell share of the vendored DfT VEH1103 licensed-car stock (2024, Great Britain; plug-in hybrids count as fuel buyers), replacing the hand-copied NTS share (microcosm#890 E2): a household with vehicles buys fuel unless every one of them is zero-emission, so it is flagged at one minus that share raised to its vehicle count, and a one-vehicle household keeps the draw it had when the whole household was drawn at once (microcosm#1278; before, a household with several vehicles was all one or the other). The frame holds no fuel type, so the draw, keyed on the household identity, is what makes a vehicle-owning household a fuel buyer. Since microcosm#1095 B3 (J2) the per-car zero-emission share follows the household's income fifth: the national share times the fifth's relative risk among the cars NTS households keep (UK Data Service SN 5340, survey years 2022-2024, at the interview weight W3; zero-emission in the DVLA-linked 0 g/km CO2 band, the about three in ten cars without a linked band left out, as missing at random within their fifth), normalised over the frame's cars so the national share is the licensed-car one. The NTS ranks England's households by total gross income, McClements-equivalised, so the frame ranks household_gross_income over the engine's before-housing-costs equivalence scale, in household-weighted fifths; a fifth on fewer than 10 zero-emission NTS cars would pool with its neighbour (a statistical floor, not the disclosure floor of 3). The uniforms are the same, so only the threshold moves. With the redraw of microcosm#1113 every flagged household buys fuel, so this flag alone sets fuel incidence; within an income fifth, who holds the zero-emission cars stays random. The household input uses_energy_prepayment_meter, which policyengine-uk reads for the July 2023 to March 2024 Energy Price Guarantee prepayment discount (PolicyEngine/policyengine-uk#2098, from 2.123.3), is drawn by the declared impute_prepayment_meter step (microcosm#1110): the donor prepays when it last put money on an electricity, gas or combined key or meter (b1751, b1701, b233, which the LCF asks only of prepayment-meter households) or its diary records a slot-meter payment (c45114, c45214), so electricity-only prepayment counts and a household with no meter payment, including one that did not answer, does not; a weighted regime-gated QRF on the chain's predictors fits that flag and each recipient draws it at uniforms keyed on its household id, which moves no other draw. The release exports it: policyengine-uk reads it from 2.123.3 and an older engine, Microcosm's locked one among them, ignores a column it does not know; the incumbent does not carry it until uk-data#539, so it is a reviewed extra column of the export surface. The frame flags about 3.0 million Great Britain households (10.5 %) at prior weights, against the around three million prepayment households the government counted when the discount began in July 2023 (a different reference period, households in both). Energy support clipping is exempt because NEED raking governs those columns. Bus fares are clipped to donor support before the pricing step (Mar\u00eda's rulings 2026-09-15 and 2026-09-17), which bounds the region no area prices (Wales keeps the chain's raw draw) while the priced regions move beyond donor support afterwards; for that reason the column carries no committed support bound for the terminal gate. Domestic energy is raked in kWh to the NEED 2024 shape at the DESNZ level and priced at the average prices paid (microcosm#890 F, chronicle#270), where both NEED rakes take their mean-kWh margins from the vendored NEED 2024 tables (England and Wales by income band, tenure, property type and region; Scotland by income band, tenure and property type with the all-dwellings mean as its region margin; Northern Ireland untouched), the declared price_domestic_energy step converts spend to kWh and back at each household's QEP price region through the committed crosswalk using the calendar-2024 average variable unit cost and fixed cost across payment methods, standard metering, including VAT (Northern Ireland gas at the UK average because QEP publishes no Northern Ireland gas row), a gas fixed cost only for connected households, the gas connection imposed on the recipient frame at the published share of each region (DESNZ subnational gas meters over electricity meters, 2024) by disconnecting gas-positive households in an identity-keyed uniform order, skipping a household whose weight would overshoot the published share (Northern Ireland has no subnational row and keeps the positive-gas rule), and, where the draw leaves a region below its share, by the declared connect_rule (microcosm#1164): two weighted fits on the chain's predictors give each zero-gas household the probability that a donor like it pays for gas (a gradient-boosted classifier of the donor's gas payers) and the gas such a donor pays (a regime-gated QRF of the payers' gas spend, at quantiles keyed on the household id), and the region's zero-gas households are connected in an identity-keyed order drawn in proportion to that probability, by the same weight-fitting walk, until the share is met. The labelled energy split leaves about 80 % of donors paying for gas against the about 85 % of homes DESNZ counts gas meters for (the derivation it replaced gave gas to 98 %), so without the connect leg nine of the eleven Great Britain regions fell short of their share, and after the four-margin NEED rake one factor per fuel scales the kWh so the prior-weighted frame total equals the fuel's declared level for calendar 2024: for gas the DESNZ Energy Trends domestic consumption at actual temperature summed over the four quarters, and for electricity, the one fuel in spend_level_fuels (microcosm#1418), the kWh the ONS Consumer Trends 04.5.1 household spending buys at QEP's United Kingdom average prices once the standing charges of every UK domestic meter DESNZ counts come off (gas stays on Energy Trends while ONS 04.5.2 counts bottled gas, microcosm#1095); NEED gas means are per gas-metered household, so the gas kWh margins are raked over connected households only while electricity is raked over every household, and the energy_rake gate recomputes every NEED mean, the DESNZ level and the connection shares from the vendored rows. After the level, no household is left above the domestic meter definitions behind the DESNZ total (NEED Annex B: gas meters under 73,200 kWh a year, electricity meters under 50,000 kWh on profile classes 1 and 2; Mar\u00eda's ruling of 2026-10-12 on microcosm#1207's extreme energy values): the declared household_kwh_ceiling caps a household there, the households below it in the capped households' own NEED cells are re-raked to those cells' levelled means, and a proportional step restores the DESNZ total (microcosm#1164); the receipt counts the households capped and the share of the total they gave up, and the energy_rake gate checks both. Mobile homes have no NEED property-type row, so the rake takes them to the all-dwellings mean, the incumbent's translation; where every mobile home of a NEED geography draws a spend at or below the standing charge, that cell has no kWh for the rake to scale, and the declared zero_kwh_cells_at_need_mean starts it at its NEED mean before the first sweep (microcosm#1240). The receipt lists the cells it started, and the energy_rake gate fails on a started cell the stage does not declare and on any other cell with a zero mean. Both rakes band households on gross income, NEED's concept: the donor on LCFS p344p, cash income before tax, National Insurance, council tax and pension contributions, and the recipient on the same concept, its HBAI net income with the deductions policyengine-uk takes to reach it added back (council tax and domestic rates, income tax, National Insurance, student loan repayments, employee and personal pension contributions, maintenance and child payments, LVT), which the stage materializes for that band alone (microcosm#1164). Before it the recipient fell back to its HBAI net income, which put households in too low a band; the engine's household_gross_income would put them in too high a one, since it adds capital gains and the in-kind NHS, education and transport spending to cash income. The disconnection walk's seed-0 uniform order makes every group of households (dwelling type, income band, support channel) lose the same expected share of its drawn connected mass, so only the level of the drawn connection moves; the smallest-drawn-gas-first order it replaces piled the disconnections onto low-draw flats once the SPI support households drew gas from their own incomes, and NEED's Scottish property-type means then implied a level 2.6 % above the Scottish all-dwellings mean, a margin conflict the rake could not close. Bus fares are priced from journeys (microcosm#930), where the nts_bus_travel stage imputes each person's annual bus-in-London and other-local-bus trips and their concessionary eligibility, and the declared price_bus_journeys step sets bus_fare_spending as the sum over the household's non-eligible persons of trips times boardings per resident trip (the published BUS01 journeys over the published NTS0705a trips per resident times the ONS population) times the yield per fare-paying boarding (BUS05ai receipts over journeys less concessionary journeys; in England outside London only the older and disabled ones of BUS01c, as policyengine-uk prices it from 2.158.3), per area; bus-in-London trips take the London area's price for every resident, other-local-bus trips the price of the residence area (England outside London; Scotland and Northern Ireland from their own receipts and journeys with England's trip rate as the declared proxy); Wales is unpriced and keeps the raw draw. The chain still draws bus_fare_spending so later targets condition on the same raw draw; the emitted column is the priced value. The receipt records every factor, the frame-implied boardings beside the published ones and the frame's eligible trip share beside the publisher's concessionary boarding share, so the prior-weight fit of the bound receipts targets is read as a composition check, never a level the stage set; the #890 incidence draw and fare rake are retired. The 2024-25 diary (UKDS SN 9603, 2nd edition, whose household tab carries the annual weight as cal_weight_annual, the name weighta had; microcosm#1164) is moved to the base year by the declared uprate_donor_columns step (microcosm#890). Consumption columns and bus fares take the engine's CPI index from the April-to-March diary year, placed on the calendar-year index at three quarters of 2024 and one of 2025, back a quarter to calendar 2024 (microcosm#1113; the diary sits a quarter past it, so the factor is below one; the fare factor survives only where no fare cell levels the column, i.e. Wales). Income predictors take a factor of one: the diary year is the FRS 2024-25 year they are matched against. Petrol and diesel take the DESNZ pump-price times HMRC litres per head outturn from the vendored road_fuel_anchors.json, which sets only their donor distribution because the level step follows; the energy columns are exempt because the NEED 2024 shape at the DESNZ level and the QEP average prices paid set their level. The household adult and child counts (LCFS G018 and G019, the survey's age-18 split) predict on both sides; the recipient counts its members by age, not through the engine's is_adult and is_child flags, which policyengine-uk#1896 deprecates (uk-data#486, microcosm#1095). Road fuel incidence and level are set by two declared steps (microcosm#1113). The two-week diary leaves about a third of car-owning donors with no fuel purchase, which the chain reproduces among the households the fuel flag marks as fuel buyers, so the redraw_zero_road_fuel step redraws a flagged household that drew zero from the donor's distribution among households with positive road fuel, on the chain's predictors: a weighted regime-gated QRF draws the total, positive by construction, then the petrol share of it, at quantiles keyed on the household id; positive draws are kept. Then the level_road_fuel step, after the fuel flag has zeroed the households without a fuel car, scales petrol and diesel so their prior-weighted total equals ONS Consumer Trends household spending on COICOP 07.2.2 for calendar 2024 (the year of the DESNZ pump prices the donor uprating uses) less the donor's own other-fuels share of 07.2.2 (c72213). Since microcosm#1095 B3 (K) each fuel is levelled to that total times its share of household-paid spend, so the total stays and each household's spend within a fuel keeps its relative size, but the diary's petrol/diesel mix gives way to the household one: HMRC's FY2024-25 litres of the fuel times DESNZ's cars share of its road use (the litres audit's benchmark), times the NTS household-paid share of car miles, at the 2024 pump prices. A kept car's private and commuting miles are household-paid, its business miles and every company-car mile are not, and England stands for the UK. The diary's 07.2.2 has three lines (c72211 petrol, c72212 diesel and c72213, the other motor fuels and lubricants) and none for vehicle electricity. The LCFS diary records about a quarter less road fuel than ONS, and binding the OBR cars receipts had closed that gap by moving weight onto fuel-buying households; petrol and diesel therefore carry no committed support bound, like the other levelled columns. The totals that contain levelled columns are written back around them by the declared recompose_from_remainder step (microcosm#1113): each keeps its own chain draw less the chain's draws of the parts the stage re-levels, kept before any step touches them and floored at zero where the parts outgrow the total, and adds the levelled parts back, so housing_water_and_electricity_consumption is its draw less the drawn electricity and gas plus the levelled electricity and gas, and transport_consumption its draw less the drawn petrol, diesel and bus fares plus the levelled petrol and diesel and the priced bus fares. The chain draws each part after, and conditional on, its total, so the remainder is the chain's own split; a remainder drawn as a chain target of its own over-drew the vehicle-purchase tail of transport, 10 to 13 percent above the donor in-sample. The chain's domestic-energy target is the electricity and gas the stage derives from the diary's fuel, light and power (p537) by its labelled parts, from the LCF User Guide's derived-variable labels and P537 definition (microcosm#1164): each fuel's last account payment less its rebate (b489 electricity, b490 gas, read as the tab carries them; the stage refuses a donor where b489 equals b175 less b178, or b490 equals b170 less b173, to the penny for under 95 percent of that fuel's account payers, which pins the labels and the rebate's sign), its prepayment key or meter payment (b1751, b1701), its component of a combined utilities bill (b227 electricity, b226 gas) and of a combined key or meter payment (b2332, b2331), and the diary's second-dwelling account and slot-meter lines (c45112 and c45114, c45212 and c45214); what a combined payment leaves unsplit (the combined bill b231 less its rebate b174, and the combined key or meter payment b233, each less its parts) goes by the household's own electricity share where it pays for both fuels, and otherwise by the donor's mean share of the households that do, since a combined payment means the household pays for both; a donor with no such household fails. The diary's other fuels (central-heating oil b017 and c45312, bottled gas b018 and c45222, coal and coke c45411, wood and peat c45412, hot water, steam and ice c45511) are neither, and the donor_energy_split receipt records the split against p537: what reading refunds as zero adds, what the unclipped parts differ from p537 by, the weighted share of donors whose unclipped parts differ from their p537, and the account identity shares. The derivation it replaces read b226 as electricity by direct debit and b489 and b490 as prepayment payments, where the labels make them the gas component of a combined bill and the electricity and gas account payments less rebates. The liquid fuels (central-heating oil and paraffin with bottled gas, LPG with liquid) and the solid fuels (coal, coke, wood and peat) are drawn as liquid_fuel_consumption and solid_fuel_consumption, the inputs policyengine-uk 2.149.0 reads (pe-uk#2572; Mar\u00eda's ruling of 2026-10-22), after the eighteen spend targets so that every earlier draw is the chain's own, uprated to calendar-2024 prices as every diary spend column is; the housing total nets their draws and adds them back unchanged, so it always holds them, and hot water, steam and ice stays in its remainder. The receipt records the published ONS 04.5.3 and 04.5.4 spend beside each fuel's donor total at diary prices and the frame's draw (published_fuels). Before the hold, each COICOP division's drawn spend per household (a recomposed total's remainder, any other division's whole draw) is set against the donor's mean of the same spend (for housing and transport, the donor's total less the same parts, since the levelled parts keep their published levels and are no over-draw); a division above the divisions' shared ratio, measured once before any levelling, comes down to it (Mar\u00eda's rulings of 2026-10-23 and 2026-10-24, microcosm#1278; Vahid's review of microcosm#1383, item 9); the receipt records each division's ratio and factor and the shared ratio (division_levelling) and each recomposed total's levelling_factor. Each total is then held to the donor's realised maximum of that total (maximum_total: donor_support, the support every drawn column is clipped to; microcosm#1164), never below its parts, the excess coming out of its remainder: a remainder near the top of the diary's range plus levelled parts larger than the drawn ones would otherwise leave it. The two totals keep their committed support bounds, which the terminal support gate applies to the emitted frame; the recomposed_totals gate checks the declaration and the receipt, whose rows held at the maximum and weighted mass taken enter its identities. Every household spend column is at calendar-2024 prices as households paid them, the H5's year that policyengine-uk projects from and the calibration uprates to the calendar-2025 window (microcosm#1113): the diary columns by the CPI uprating to 2024, road fuel at ONS 07.2.2 for 2024, energy at DESNZ volume and QEP prices for 2024, and bus fares at each area's fiscal-year yield re-priced to 2024 by its fares index (the DfT local bus fares index by quarter for London and England outside London, Scotland's calendar-year index; Northern Ireland, which publishes no fares index, from its own yields of the two fiscal years 2024 overlaps, weighted three months and nine (microcosm#1207), in place of England's index, which carries the January 2025 rise in the English fare cap Northern Ireland did not have); the consumption_basis gate holds every level-setting step to that year. policyengine-uk applies the fiscal 2024-25 rules to model year 2024 (it samples each parameter at 30 April), so every levelled column sits about a quarter before the midpoint of the policy year it is taxed in; the calibration binds calendar-year facts as published and fiscal-year facts at the calendar window (Mar\u00eda's rule of 2026-09-22). The stage receipt also reports, for each of the twelve COICOP divisions, the prior-weighted frame total against ONS Consumer Trends for the same calendar year less the classes a household diary does not record (02.3 narcotics, 04.2 owner-occupiers' imputed rent and 12.6.1 FISIM), on ONS's domestic concept, and the twelve together against the national concept as well; it is report-only (microcosm#1113). The report-only litres audit compares each fuel's frame litres with HMRC's clearances of that fuel scaled by the cars share of its road use, from the vendored DESNZ sub-national road transport fuel consumption by vehicle type and fuel (PolicyEngine/chronicle#322); the OBR cars share of fuel duty receipts, uniform across fuels, stays beside the total. The liquid fuels hold bottled gas (b018, c45222), which COICOP puts under 04.5.2 (gas) and ONS's 04.5.3 leaves out, so the receipt also gives the donor's liquid fuels without it; neither heating-fuel column is levelled to ONS: the donor's diary totals are about twice ONS's, and the frame's draws reach neither those nor ONS's, so a costing on either needs levelling to ONS first (Vahid's review of microcosm#1383, item 8). After its spend targets and the two fuels the chain draws five shares the derive step computes on the donor from the diary lines (microcosm#1359): tobacco's share of the off-trade alcohol and tobacco that make up P602 (c22111, c22121 and c22131 over those three and the seven lines of alcohol brought home, c21111 to c21311; P602 also sums narcotics, c23111, which the end-user tab does not carry), on-trade alcohol's share of restaurants and hotels (the eight lines of drinks away from home, cb111c to cb111j, over P611, clipped at one because the tab stores P611 to one decimal place), gambling stakes' share of recreation (the seven games-of-chance stake lines P609 sums, c94311 to c94316 and c94319: pools, bingo, lotteries, bookmaker and tote betting with gaming machines, and the National Lottery; the winnings lines beside them sit in no total), the National Lottery's share of those stakes (scratchcards and draws, c94316 and c94319, over the seven) and the betting and gaming share of the rest (football pools, bingo, and bookmaker and tote betting with gaming machines, c94311, c94312 and c94314, over the other five; society lotteries, c94313, and the Irish Lottery, c94315, pay no UK gambling duty). A household's tobacco, off-trade alcohol, on-trade alcohol and gambling stakes are its shares of the totals it carries, and its National Lottery and betting and gaming stakes its shares of its stakes, so the parts sum to the totals and no total, the VAT base included, moves; appended after the twenty targets, the shares move none of their draws. The shares and the spending they give are scratch, on no table; the report-only excise_shares receipt records each share on the frame beside the donor. The declared level_excise_quantities step turns that spending into policyengine-uk's excise inputs (microcosm#1359), so alcohol, tobacco and gambling duty stop scoring zero. Each national quantity is a published FY2024-25 figure from the vendored excise_facts.json, and the step gives each household its part in proportion to the spending that buys it, at prior weights (one factor per input, the level_road_fuel scaling), so the frame's weighted total of each input is the published one; a household that buys one product of a kind buys all of that kind in the national mix. Alcohol: each product's litres are HMRC's clearances of beer, cider, wine, spirits and other fermented products (the Alcohol Bulletin, in litres of pure alcohol) over the engine's own strength for the product, which policyengine-uk multiplies back, shared by off- and on-trade alcohol spending together; beer and cider take their draught shares from the clearances under draught relief, alone or with small producer relief, over all of their clearances, and the other products, whose draught clearances HMRC does not publish, keep the engine's zero, as does sparkling cider, which the bulletin counts within cider. A pound buys the same volume in a pub as in a shop under this rule, which leans the volume, and so the duty, towards on-trade drinkers: against a published on-trade volume share of about 27 percent, a pound spent in a pub is given about 1.6 times the volume it buys and a pound spent in a shop about 0.78 times, and about 11 percent of the volume sits with other households on the 2024-25 diary. No on-trade volume share can be archived (MESAS is a NielsenIQ and Circana dashboard with no fixed file), so the spending rule stands, its lean documented (Mar\u00eda's ruling of 2026-10-23). Tobacco: cigarettes a week and grams a week of hand-rolling tobacco, cigars and other tobacco are HMRC's clearances (the Tobacco Bulletin) over the engine's 52 weeks, shared by tobacco spending; heated tobacco sits within other tobacco in the bulletin, so it is charged at the other-tobacco rate and its own input keeps the engine's zero. Gambling: each input is its duty's dutiable base, HMRC's cash receipts for the duty (the Betting and Gaming bulletin) or Machine Games Duty's declared liabilities for the band, over the engine's FY2024-25 rate (Gaming Duty over the engine's effective-rate proxy for it), so the engine charges back the published receipts. General Betting Duty's base, its receipts over the fixed-odds rate, is split over the land-based fixed-odds, remote horse-racing, remote other, exchange and horse-and-dog pool inputs by the Gambling Commission's gross gambling yield for Great Britain, remote fixed-odds betting by the horse-racing share of all remote betting yield, since the Commission publishes no betting activity by event; its horse racing is not only UK racing, so the remote UK horse-racing input is overstated and, from April 2027, when the engine charges other remote betting at 25 percent, too much of the base stays at 15 percent and the rise is understated; and its pool betting can hold pools on other events, such as football pools, which pay Pool Betting Duty. Spread betting, which the Commission does not regulate, has no published base and keeps the engine's zero. Lottery Duty's base is shared by the National Lottery stakes and every other gambling base by the betting and gaming stakes, since the diary cannot tell remote from land-based play or one betting product from another; the society and Irish lotteries carry none. Both keys are first brought to published participation by the declared top_up_gambling_participation step (microcosm#1359; Mar\u00eda's ruling of 2026-10-25). The diary records a stake for about a fifth of the households the Gambling Commission's Gambling Survey for Great Britain 2025 implies (PolicyEngine/chronicle#391), and under any steady rate of play a two-week diary sees at least half of the four-week players, so the gap is play the diary misses, not its window. Each adult's chance of playing in four weeks and in twelve months is GSGB's published rate for its sex and age band (tables B.1 and B.3), as the union of a key's activities (table B.9: the National Lottery's draws, scratchcards and online instant-win games; betting, bingo, casino games, fruit and slots, football pools, other online instant-win games and other gambling), taken as independent within the population that plays any of them (all gamblers, or those who play more than lottery draws). A household plays when any adult does, combined at theta: 1 - (1 - p_max) x prod(1 - p_other)^theta, where 0 is one player per household and 1 adults who play independently. Theta is fitted on the donor so that GSGB's rates, applied to the donors' own adults, give the diary's ratio of the two-adult to the one-adult household rate, in which under-recording cancels if it is the same for both: 0.9 for the National Lottery, whose couples mostly buy their own tickets, and 0.08 for betting and gaming, mostly one adult's. Within nine strata (one, two, or three or more adults, by the youngest adult's age band: 18 to 34, 35 to 54, 55 and over), households without a stake are added by the gas connection walk's weight-fitting rule, in an identity-keyed order drawn in proportion to a regularised donor propensity (on the chain's predictors and spend draws, with recreation net of its gambling stakes, so that a recorded stake does not predict itself) times the household's published chance, first to the stratum's four-week share (regular players) and then on to its twelve-month share (occasional players); households the diary saw keep their stakes and count as regular. An added household's stake is a draw from the donor's positive stakes at a quantile keyed on its id, scaled so the added regular players' mean is the mean of the households the diary saw, and an occasional player's is a tenth of that. Both are assumptions: a two-week diary is more likely to catch frequent players, so the households it saw are probably the heavier players and equal means spread the base more evenly than play probably is; the tenth stands until GSGB publishes how often people play. The keys only re-share the bases: the stored spending stays the drawn one, so an added household's stakes are not in its recorded recreation spending. The gambling_participation gate recomputes the rates from the vendored rows, checks every stratum's shares, and holds each key's stake scale within 0.5 to 2, so a broken stake draw that the scaling would hide fails it. Known biases: the quantities are levelled to the published figures while spending and the diary's incidence stay at survey level (Mar\u00eda's ruling of 2026-10-23), so a household's alcohol or tobacco duty is one multiple of its own spending, the same for every household that carries it: at prior weights alcohol duty is about 0.44 times alcohol spending and tobacco duty about 1.8 times tobacco spending, since the diary records a fraction of what is bought; VAT on the same goods stays on the survey base. Tobacco duty also sits on fewer households than smoke: 8.2 percent of households carry it, against 11.9 percent of UK adults who smoked cigarettes in 2023 (ONS), while the share of households with a smoker is above the adult rate; the duty per carrying household is higher by the same factor. Part of the gap is the frame's: the chain's share draws come out zero more often than the donors' (10.3 percent of donors carry tobacco), mostly within households that carry the parent total. The gambling duties sit on the households the top-up brings to participation: 62.7 percent of households carry Lottery Duty and 29.8 percent the other gambling duties, against 10.7 and 2.0 percent on the diary's draws alone, and 47 percent of adults in Great Britain who gambled in the past four weeks of 2025 (27 percent once lottery-draw-only players are left out). The top-up's own biases: GSGB is taken as the level, though the Gambling Commission's guidance on its statistics reports that an invitation that mentions gambling raised participation estimates, and that its experiment could not conclude which estimates are the more accurate; under-recording is taken as even across households, so the donor propensity carries the diary's gradient by income, tenure, region and spending; the activity unions take activities as independent within their population, which GSGB's table B.13 rules out among players (45 percent of four-week gamblers took part in one activity, against 26 percent under independence), but a model in which each adult's activities share an intensity, which comes within 2.5 points of that share in every age band, moves neither key's union by more than 9 percent in any age band, nor the share of households carrying either key by more than 0.1 points; theta is one per key, fits households of three or more adults less well, and takes the share carrying betting and gaming from 28.5 percent at 0 to 41.2 percent at 1; the stake assumptions above; and GSGB covers adults in Great Britain in calendar 2025, so Northern Ireland's adults take its rates, against the FY2024-25 bases. On the real spine at prior weights, the share of households carrying the National Lottery rises from 51.5 percent in the bottom equivalised-income decile to 67.3 percent in the top, and betting and gaming from 26.8 to 34.8 percent, whose top decile holds 25.3 percent of the base; on the diary's draws alone betting and gaming is almost flat (1.9 to 2.1 percent, 18.9 percent of the base in the top decile). Ordered by the published chance alone, betting and gaming would run from 29.2 to 29.8 percent and the Lottery from 57.0 to 67.9 percent with GSGB's age mix, but neither key's regional pattern would follow GSGB's. With the propensity, the Lottery's does (a correlation of 0.67 across Great Britain's eleven regions, London lowest, as in GSGB), and betting and gaming's barely (0.11). Other tobacco (c22131) includes e-cigarette refills, so the tobacco inputs also follow vaping spending and a household that only vapes carries tobacco duty; Vaping Products Duty, from 1 October 2026, needs a key of its own. The draught shares are national constants, so a household that buys alcohol only in shops takes the same draught relief as one that drinks in pubs. The quantities are FY2024-25's, the excise year policyengine-uk charges in model year 2024 (its excise year runs from 6 April), and the engine holds them flat after it (PolicyEngine/policyengine-uk#2596). The step moves no spending column; the excise_quantities gate recomputes every level from the vendored rows. Since microcosm#1095 B3 the declared assign_car_attributes_from_nts step writes policyengine-uk's vehicle excise duty inputs, which no stage wrote, so every household's duty was zero: a household's vehicles less its members' company cars (an employer pays their duty) go one to each other adult, oldest first, a car beyond the adults left out (policyengine-uk holds one car a person); a household the fuel flag leaves without road fuel keeps zero-emission cars only, and one that buys fuel holds a petrol, diesel or other car first and further cars at its own per-car zero-emission share; each car is a kept NTS car of its class in the household's income fifth, drawn at its interview weight scaled to its fifth and age band's kept cars (fewer of the newest and oldest cars carry the registration record its CO2 bands come from), giving car_fuel_type (a diesel registered from 2021 meets RDE2), car_co2_emissions (its band's midpoint on the scale its duty regime reads), car_engine_size (none for a zero-emission car), car_first_registration_date (the reference date of 1 October 2025 less its age, drawn uniformly within its NTS band, so each car keeps its age; the open band of over 18 years closes at 25) and car_is_ved_exempt (DLA's higher-rate or PIP's enhanced mobility component exempts the member's own car, or the oldest car-holder's in their benefit unit). The list price keeps the engine's default, so no car pays the expensive-car supplement. Vehicle excise duty is measured, never bound: no target carries it.", "operations": [ { "annualization_weeks": 52.17857142857143, @@ -4789,6 +4792,7 @@ "tenure_type", "accommodation_type" ], + "gate_calibration": "cross_fitted", "kind": "fit_weighted_qrf_chain", "n_estimators": 4, "predictors": [ @@ -4850,6 +4854,7 @@ "c45114", "c45214" ], + "gate_calibration": "cross_fitted", "kind": "impute_prepayment_meter", "n_estimators": 100, "output": "uses_energy_prepayment_meter", @@ -5138,6 +5143,7 @@ "diesel_spending" ], "flag": "has_fuel_consumption", + "gate_calibration": "cross_fitted", "kind": "redraw_zero_road_fuel", "n_estimators": 100, "rule": "positive_total_then_petrol_share", @@ -5787,7 +5793,7 @@ "local_bus_trips", "household_local_bus_trips" ], - "notes": "Imputes local-bus travel per person from the National Travel Survey microdata (microcosm#930; the structural fix Maria ruled on 2026-09-15 for the rake-then-bind bus fares of microcosm#890). The donor is the NTS End User Licence extract (England residents only since 2013) pooled over the declared survey years for the conditional fit; the artifact pins are the 19th-edition (November 2025) tabs, verified at runtime, and the H2 fixture drives the stage with synthetic tabs in the same codebook. One QRF target, the interview frequency-of-use band (the variable behind NTS0313; 0 is the non-user band), conditioned on age band, sex, cars (the was_wealth draw on the recipient), household size, the three-band gross household income (on the recipient its HBAI net income with the deductions policyengine-uk takes to reach it added back, gross cash income as the NTS band measures it; the engine's household_gross_income adds capital gains and imputed NHS, education and transport spending, which put a fifth of households a band too high; microcosm#1164) and region, drawn from identity-keyed uniforms and rounded to the nearest band; devolved recipients take a declared proxy region for prediction only. Each person's annual local-bus trips are the diary's weighted mean for their band and residence group (London or the rest of England), split into the bus-in-London and other-local-bus series by main mode, W5 x JJXSC over W2 persons annualised by 52.14 weeks; a seven-day diary annualised per person would be right in aggregate and wrong in distribution, so it supplies band means, not per-person counts. If the extract carries no frequency column the band is drawn from the vendored NTS0313/NTS0621 shares and declared band midpoints are scaled to the vendored NTS0303 rate (the receipt names the path). Concessionary eligibility is the declared statutory age rule of the person's area, emitted for the lcfs pricing step to zero-price eligible persons' trips; the donor's eligible share of trips per series is receipted beside the publisher's concessionary boarding share. The stage and ticket tables class every diary bus boarding by how it was paid for (at the point of use, a season ticket or pass, a concessionary pass, free) and give each person the share of fare-paying boardings paid at the point of use for their band and residence group (local_bus_single_fare_share), the boardings a per-journey fare cap binds on, with the fare paid per boarding by residence group and survey year receipted beside it (microcosm#930 C13, Mar\u00eda's ask of 2026-09-23). The share is read on the cap years declared in fare_cap_regime only (England's \u00a32 single-fare cap outside London ran from 1 January 2023 to 31 December 2024, and an NTS survey year is a calendar year), because nine months of the FRS 2024-25 base year (April to December 2024) sit under that cap and the last three under the \u00a33 cap that followed it; 2022, before it, stays in the band and trip fit. The share under the \u00a33 cap or with no cap is not observed, because the extract ends in 2024 (microcosm#1331). For England outside London the receipt also carries fare-mix lines, aggregates only. Before the cap they give the share of point-of-use boardings paid above the cap and their mean fare, at that year's prices; under it, the share paid at the cap, within the declared tolerance. A line that rests on fewer than 3 unweighted boardings or 3 distinct households, or whose complement does, reads <3. The stage records the frame's band shares against NTS0313/NTS0621, its trips per person against NTS0303 and by age band against NTS0601, and the frame's car availability against NTS0205, all from vendored rows; nothing derived from the licensed rows is committed.", + "notes": "Imputes local-bus travel per person from the National Travel Survey microdata (microcosm#930; the structural fix Maria ruled on 2026-09-15 for the rake-then-bind bus fares of microcosm#890). The donor is the NTS End User Licence extract (England residents only since 2013) pooled over the declared survey years for the conditional fit; the artifact pins are the 19th-edition (November 2025) tabs, verified at runtime, and the H2 fixture drives the stage with synthetic tabs in the same codebook. One QRF target, the interview frequency-of-use band (the variable behind NTS0313; 0 is the non-user band), conditioned on age band, sex, cars (the was_wealth draw on the recipient), household size, the three-band gross household income (on the recipient its HBAI net income with the deductions policyengine-uk takes to reach it added back, gross cash income as the NTS band measures it; the engine's household_gross_income adds capital gains and imputed NHS, education and transport spending, which put a fifth of households a band too high; microcosm#1164) and region, drawn from identity-keyed uniforms and rounded to the nearest band; devolved recipients take a declared proxy region for prediction only. Its sign gate is cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: it is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on people the gate was not fitted to, with each NTS household's members in one fold. Each person's annual local-bus trips are the diary's weighted mean for their band and residence group (London or the rest of England), split into the bus-in-London and other-local-bus series by main mode, W5 x JJXSC over W2 persons annualised by 52.14 weeks; a seven-day diary annualised per person would be right in aggregate and wrong in distribution, so it supplies band means, not per-person counts. If the extract carries no frequency column the band is drawn from the vendored NTS0313/NTS0621 shares and declared band midpoints are scaled to the vendored NTS0303 rate (the receipt names the path). Concessionary eligibility is the declared statutory age rule of the person's area, emitted for the lcfs pricing step to zero-price eligible persons' trips; the donor's eligible share of trips per series is receipted beside the publisher's concessionary boarding share. The stage and ticket tables class every diary bus boarding by how it was paid for (at the point of use, a season ticket or pass, a concessionary pass, free) and give each person the share of fare-paying boardings paid at the point of use for their band and residence group (local_bus_single_fare_share), the boardings a per-journey fare cap binds on, with the fare paid per boarding by residence group and survey year receipted beside it (microcosm#930 C13, Mar\u00eda's ask of 2026-09-23). The share is read on the cap years declared in fare_cap_regime only (England's \u00a32 single-fare cap outside London ran from 1 January 2023 to 31 December 2024, and an NTS survey year is a calendar year), because nine months of the FRS 2024-25 base year (April to December 2024) sit under that cap and the last three under the \u00a33 cap that followed it; 2022, before it, stays in the band and trip fit. The share under the \u00a33 cap or with no cap is not observed, because the extract ends in 2024 (microcosm#1331). For England outside London the receipt also carries fare-mix lines, aggregates only. Before the cap they give the share of point-of-use boardings paid above the cap and their mean fare, at that year's prices; under it, the share paid at the cap, within the declared tolerance. A line that rests on fewer than 3 unweighted boardings or 3 distinct households, or whose complement does, reads <3. The stage records the frame's band shares against NTS0313/NTS0621, its trips per person against NTS0303 and by age band against NTS0601, and the frame's car availability against NTS0205, all from vendored rows; nothing derived from the licensed rows is committed.", "operations": [ { "age_band_edges": [ @@ -6008,6 +6014,7 @@ "transport_mode_groupby_value_id": "local_bus", "user_definition": "at_least_once_a_year" }, + "gate_calibration": "cross_fitted", "income_band_edges": [ 25000, 50000 @@ -6596,7 +6603,7 @@ "employment_income", "salary_sacrifice_pre_conversion_pay" ], - "notes": "The QRF trains only on the 2024-25 FRS asked subset with pay. Salary sacrifice is pay given up, so every amount, reported or predicted, is limited to the pay the person still receives, and a person without pay has none (uk-data#518, microcosm#1095); the limit bites above all on SPI-channel rows, which keep their FRS twin's answer beside pay redrawn from the SPI. The second arm creates support toward the reviewed 5.4m staging target by moving contributors' pension amounts, up to half their pay, into salary sacrifice and lowering their pay by the same amount, since the engine reads employment_income after sacrifice; what does not move stays an employee contribution, so the sacrifice never exceeds the pay that remains. Before microcosm#1069 c9 the pay stayed whole and the converted record lost its net-pay relief. The third arm adds bonus sacrifice beside pay toward the OBR's 2027-28 base above GBP 2,000 (microcosm#1340). A sacrificed bonus is never received, so the FRS records it in neither pay nor its bonus amounts, and pay stays as it is (Mar\u00eda's ruling of 2026-10-24 on Vahid's review of microcosm#1383); a received FRS bonus marks a bonus-paying job and its size. An SPI-channel adult's FRS bonus is its twin's, beside the tape's pay, so it draws a bonus share of pay from a base-FRS adult in its pay cell instead.", + "notes": "The QRF trains only on the 2024-25 FRS asked subset with pay. Its sign gate is cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: it is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on people the gate was not fitted to, with each household's members in one fold. Salary sacrifice is pay given up, so every amount, reported or predicted, is limited to the pay the person still receives, and a person without pay has none (uk-data#518, microcosm#1095); the limit bites above all on SPI-channel rows, which keep their FRS twin's answer beside pay redrawn from the SPI. The second arm creates support toward the reviewed 5.4m staging target by moving contributors' pension amounts, up to half their pay, into salary sacrifice and lowering their pay by the same amount, since the engine reads employment_income after sacrifice; what does not move stays an employee contribution, so the sacrifice never exceeds the pay that remains. Before microcosm#1069 c9 the pay stayed whole and the converted record lost its net-pay relief. The third arm adds bonus sacrifice beside pay toward the OBR's 2027-28 base above GBP 2,000 (microcosm#1340). A sacrificed bonus is never received, so the FRS records it in neither pay nor its bonus amounts, and pay stays as it is (Mar\u00eda's ruling of 2026-10-24 on Vahid's review of microcosm#1383); a received FRS bonus marks a bonus-paying job and its size. An SPI-channel adult's FRS bonus is its twin's, beside the tape's pay, so it draws a bonus share of pay from a base-FRS adult in its pay cell instead.", "operations": [ { "artifact_role": "obr_salary_sacrifice_costing_facts", @@ -6620,6 +6627,7 @@ "cache": false, "clamp_maximum": "employment_income floored at zero; every row, reported or predicted, FRS and SPI channel", "clamp_minimum": 0, + "gate_calibration": "cross_fitted", "kind": "fit_weighted_qrf", "n_estimators": 100, "predictors": [ @@ -6812,7 +6820,7 @@ "artifacts": [], "grain": "household", "nonnegative_outputs": [], - "notes": "Runs after the SPI income chain and before the income-conditioned donor stages, the household counterpart of the SPI stage-2 FRS-only fill. The support copies and income band donors are whole FRS households, so without this stage each kept its FRS parent's housing, drawn for the parent's income. Trained on the FRS base households (positive household weight) and drawn for every SPI-channel household from engine-free predictors (region, household type, adults, children, single-adult status, reference-person age and household income components). Tenure, dwelling type, bedrooms and council-tax band are drawn in that order by weighted multiclass classifiers with an inverse-CDF draw; the housing amounts and the head benefit unit's Housing Benefit and the reference person's council tax benefit by one chained regime-gated QRF conditioned on the drawn categories, clipped to the training range. Every draw reads uniforms keyed on household_id. An amount is zero wherever the training households have no positive value for its tenure or region; mortgage payments need a mortgaged tenure (true of every FRS household); Housing Benefit needs a rented tenure (the engine pays it to renting reporters only); council tax benefit is capped at council tax and the household council_tax_rebate equals it, both on the reference person as the FRS holds them. Region, single-adult status, BRMA (region and the recipient's own LHA category), the flat-rate household draws and composition are kept; FRS base rows are byte-unchanged.", + "notes": "Runs after the SPI income chain and before the income-conditioned donor stages, the household counterpart of the SPI stage-2 FRS-only fill. The support copies and income band donors are whole FRS households, so without this stage each kept its FRS parent's housing, drawn for the parent's income. Trained on the FRS base households (positive household weight) and drawn for every SPI-channel household from engine-free predictors (region, household type, adults, children, single-adult status, reference-person age and household income components). Tenure, dwelling type, bedrooms and council-tax band are drawn in that order by weighted multiclass classifiers with an inverse-CDF draw; the housing amounts and the head benefit unit's Housing Benefit and the reference person's council tax benefit by one chained regime-gated QRF conditioned on the drawn categories, clipped to the training range. The QRF's sign gates are cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: each is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on households the gates were not fitted to. Every draw reads uniforms keyed on household_id. An amount is zero wherever the training households have no positive value for its tenure or region; mortgage payments need a mortgaged tenure (true of every FRS household); Housing Benefit needs a rented tenure (the engine pays it to renting reporters only); council tax benefit is capped at council tax and the household council_tax_rebate equals it, both on the reference person as the FRS holds them. Region, single-adult status, BRMA (region and the recipient's own LHA category), the flat-rate household draws and composition are kept; FRS base rows are byte-unchanged.", "operations": [ { "amount_fit": "regime_gated_qrf", @@ -6843,6 +6851,7 @@ "num_bedrooms", "council_tax_band" ], + "gate_calibration": "cross_fitted", "identity": "household_id", "kind": "impute_spi_housing_shell", "landing": "household_reference_person", @@ -7427,7 +7436,7 @@ "artifacts": [], "grain": "benunit", "nonnegative_outputs": [], - "notes": "Runs after the person-grain SPI income chain and before UC capital coherence. One temporary engine simulation screens both FRS and SPI benefit units to a positive pre-take-up award using FRS-carried capital AND at least one non-child member (uc_maximum_amount pays qualifying-young-person-only units mechanically), and materializes the UC child and state-pension-age flags; engine-known values are consumed only. The consumed is_uc_couple predictor counts two retained FRS claimant/partner roles, independently of legal is_married; older dependent children do not become partners. A benefit-unit RegimeGatedQRF fitted on the screened base domain draws the screened SPI domain (rows); the rewrite domain (rewrite_rows) is the whole SPI channel, so screen-failing SPI units are zeroed. Each positive amount lands on one deterministic adult claimant; base-FRS rows remain byte-unchanged; an empty screened SPI domain refuses.", + "notes": "Runs after the person-grain SPI income chain and before UC capital coherence. One temporary engine simulation screens both FRS and SPI benefit units to a positive pre-take-up award using FRS-carried capital AND at least one non-child member (uc_maximum_amount pays qualifying-young-person-only units mechanically), and materializes the UC child and state-pension-age flags; engine-known values are consumed only. The consumed is_uc_couple predictor counts two retained FRS claimant/partner roles, independently of legal is_married; older dependent children do not become partners. A benefit-unit RegimeGatedQRF fitted on the screened base domain draws the screened SPI domain (rows); the rewrite domain (rewrite_rows) is the whole SPI channel, so screen-failing SPI units are zeroed. Its sign gate is cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: it is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on benefit units the gate was not fitted to, with each household's benefit units in one fold. Each positive amount lands on one deterministic adult claimant; base-FRS rows remain byte-unchanged; an empty screened SPI domain refuses.", "operations": [ { "derived": { @@ -7464,6 +7473,7 @@ "region" ], "fit": "regime_gated_qrf", + "gate_calibration": "cross_fitted", "kind": "redraw_spi_reported_uc", "landing": "eldest_working_age_adult_lowest_person_id", "output": "universal_credit_reported", @@ -7881,7 +7891,7 @@ "other_residential_property_secured_debt", "non_residential_property_secured_debt" ], - "notes": "Ports incumbent WAS round-8 wealth imputation with signed E5 differences: exact lower-case column matching replaces the fuzzy r/w fallback; cash ISA uses DVCISAVR8_aggr and stocks-and-shares ISA uses DVIISAVR8_aggr; private pension wealth (WAS total private pension wealth less the current defined-benefit component; DB-type components at the SCAPE rate, money-purchase components at reported fund values) is drawn as its own output private_pension_wealth and no longer folded into corporate_wealth, which keeps only the share-like holdings - pension rights are disregarded capital in every means test (UC Regs 2013 Sch 10 para 10 and the HB/JSA/ESA/IS/SPC parallels; uk-data#452) - and the downstream chain segment conditions on both components; each chain segment starts its own fit and draw RNG streams from a child seed derived deterministically from the declared seed (start_chain respawns from the model seed on every call, so one shared model coupled the k-th target of every segment); corporate_wealth folds stocks-and-shares ISA after drawing corporate_wealth_excl_isa; recipient Northern Ireland regions are mapped to Wales for prediction only; student_loan_balance is allocated by household id rather than the incumbent positional off-by-one. Tenure enters every chain segment as one four-way category built the same way on both sides (microcosm#1063): the donor's from Ten1R8 and DVPriRntR8 (owned outright; buying with a mortgage or part rent, part mortgage; rented or rent-free from a private landlord; rented from a council or housing association), the recipient's from the frame's tenure_type (council and housing association together), so the stage reads no engine tenure formula. Two columns are structural in tenure and are fitted and drawn inside their stratum only, zero by rule elsewhere: main_residence_value on the owner tenures (every WAS owner has a positive value and no renter has one) and main_residence_mortgage (TotMortR8) on the mortgaged tenure. mortgage_debt is HMortGR8, all of the household's mortgages, and is derived as the main-residence mortgage plus the mortgages on other property (other_mortgage, HMortGR8 less TotMortR8 on the donor: buy-to-let, second homes and the rest), which are held on every tenure and drawn without a stratum, so an outright owner's or a renter's buy-to-let keeps its mortgage beside the property it is secured on (OthMortR8_sum is read for the receipt only); the donor's conditioning copy carries the same rule, so consumer_debt is fitted on values recipients can hold. Totals are not drawn: property_wealth is the sum of land, the main residence, other houses, buildings and a drawn remainder (buy-to-let, overseas and other property), gross_financial_wealth is savings, the cash ISA, the share-like holdings and a drawn remainder, and net_financial_wealth is gross less consumer debt and the student loan balance - identities the pinned tab satisfies on every row and the cleaning step refuses a donor that breaks. A sum of donor-valued components that leaves the donor's range for the total gives up the excess from the remainder first, and the receipt counts the rows. Eleven chain segments, each with its own child seed: land; the main residence; the other property components; pension and share-like wealth; the financial components, vehicles and the student loan balance; the main-residence mortgage; the other mortgages; consumer debt; then three appended after them, so the first eight draw as they did before them (microcosm#1095, the WAS property draw), each fitted on the donors and drawn for the recipients holding the column holder_strata names. The first is the directly held fraction of the share-like holdings outside ISAs, from which the stage writes directly_held_shares (WAS UK shares plus employee shares and options) and unit_and_investment_trusts (WAS collective investments, which the survey asks about in one question; uk-data#501), the inputs policyengine-uk reads inside corporate_wealth (pe-uk#1974): the split is written on the final corporate_wealth less the stocks-and-shares ISA, so the two and the ISA sum to corporate_wealth and the engine's share_like_capital stays corporate_wealth; a household with such holdings but no drawn fraction (a clip that lowered the ISA alone) holds them directly (undrawn_fraction), and the receipt counts it. The other two are the debt secured on other residential property (WAS DVHseDebtR8_sum + DVBLtDebtR8_sum) and on non-residential property (DVBldDebtR8_sum), which policyengine-uk deducts after the sale costs in valuing Universal Credit property capital (UC Regs 2013 reg 49(1)(b)): each is zero where the final value of its asset is zero, and the two are parts of the mortgages on other property, so where their sum passes other_mortgage both are scaled down to it (secured_debt_within); the receipt counts the rows each rule touched, and the wealth_coherence gate holds the split and the debts as identities. HFINWNTR8_exSLC_Sum is net financial wealth excluding student loans, so gross less it is the non-student-loan financial liabilities; UKDS SN 7215 documentation is the codebook. Engine predictors materialize at their native entity and person/benunit values are summed to household, reproducing the incumbent map_to=household semantics; region is one-hot encoded jointly across donor and recipient (the incumbent's dummy encoding), with unmapped donor GOR codes becoming all-zero dummy rows. The WAS and FRS predictor definitions are not fully like-for-like and are ported as-is; raw WAS missing values are blanket-filled with zero; UKDS negative sentinel codes (-9/-8/-7/-6) are recoded to zero for the nonnegative-domain columns the licensed audit found carrying them (vcarnr8: 2 rows; HBedRmR8: 95.8 percent - the bedrooms question is effectively unasked in the WAS household file, predictor-quality revisit registered on microcosm#145) - a signed difference vs the incumbent, which trains on raw sentinels; DVPriRntR8's -9 is structural not-applicable so the private-renter reading is unchanged; genuinely negative domains are never recoded. The recipient council_tax predictor is the bill the household pays, council_tax less council_tax_rebate, the quantity the WAS donor records, since the spine's council_tax is the liability before council tax reduction (uk-data#496/#499, microcosm#1095). The donor council_tax is DVCTaxAmtAnnualR8, the annual amount paid (CTAmtR8 is one instalment), its children are NumChildR8 (NumCh18R8 overlaps NumAdultR8), and the recipient adults and children are the household's FRS claimants and partners and its other members (is_uc_claimant), which together make the household size on both sides; rental_income is the donor's net rent DVNetRentAmtAnnualR8_aggr against the household's property_income (uk-data#486/#495, microcosm#1095).", + "notes": "Ports incumbent WAS round-8 wealth imputation with signed E5 differences: exact lower-case column matching replaces the fuzzy r/w fallback; cash ISA uses DVCISAVR8_aggr and stocks-and-shares ISA uses DVIISAVR8_aggr; private pension wealth (WAS total private pension wealth less the current defined-benefit component; DB-type components at the SCAPE rate, money-purchase components at reported fund values) is drawn as its own output private_pension_wealth and no longer folded into corporate_wealth, which keeps only the share-like holdings - pension rights are disregarded capital in every means test (UC Regs 2013 Sch 10 para 10 and the HB/JSA/ESA/IS/SPC parallels; uk-data#452) - and the downstream chain segment conditions on both components; each chain segment starts its own fit and draw RNG streams from a child seed derived deterministically from the declared seed (start_chain respawns from the model seed on every call, so one shared model coupled the k-th target of every segment); corporate_wealth folds stocks-and-shares ISA after drawing corporate_wealth_excl_isa; recipient Northern Ireland regions are mapped to Wales for prediction only; student_loan_balance is allocated by household id rather than the incumbent positional off-by-one. Its QRF sign gates are cross-fitted (gate_calibration: cross_fitted; microcosm#1359), as lcfs_consumption's are: each is calibrated on the donors its fold gates left out, so a sign is drawn at its donor rate on households the gates were not fitted to. Tenure enters every chain segment as one four-way category built the same way on both sides (microcosm#1063): the donor's from Ten1R8 and DVPriRntR8 (owned outright; buying with a mortgage or part rent, part mortgage; rented or rent-free from a private landlord; rented from a council or housing association), the recipient's from the frame's tenure_type (council and housing association together), so the stage reads no engine tenure formula. Two columns are structural in tenure and are fitted and drawn inside their stratum only, zero by rule elsewhere: main_residence_value on the owner tenures (every WAS owner has a positive value and no renter has one) and main_residence_mortgage (TotMortR8) on the mortgaged tenure. mortgage_debt is HMortGR8, all of the household's mortgages, and is derived as the main-residence mortgage plus the mortgages on other property (other_mortgage, HMortGR8 less TotMortR8 on the donor: buy-to-let, second homes and the rest), which are held on every tenure and drawn without a stratum, so an outright owner's or a renter's buy-to-let keeps its mortgage beside the property it is secured on (OthMortR8_sum is read for the receipt only); the donor's conditioning copy carries the same rule, so consumer_debt is fitted on values recipients can hold. Totals are not drawn: property_wealth is the sum of land, the main residence, other houses, buildings and a drawn remainder (buy-to-let, overseas and other property), gross_financial_wealth is savings, the cash ISA, the share-like holdings and a drawn remainder, and net_financial_wealth is gross less consumer debt and the student loan balance - identities the pinned tab satisfies on every row and the cleaning step refuses a donor that breaks. A sum of donor-valued components that leaves the donor's range for the total gives up the excess from the remainder first, and the receipt counts the rows. Eleven chain segments, each with its own child seed: land; the main residence; the other property components; pension and share-like wealth; the financial components, vehicles and the student loan balance; the main-residence mortgage; the other mortgages; consumer debt; then three appended after them, so the first eight draw as they did before them (microcosm#1095, the WAS property draw), each fitted on the donors and drawn for the recipients holding the column holder_strata names. The first is the directly held fraction of the share-like holdings outside ISAs, from which the stage writes directly_held_shares (WAS UK shares plus employee shares and options) and unit_and_investment_trusts (WAS collective investments, which the survey asks about in one question; uk-data#501), the inputs policyengine-uk reads inside corporate_wealth (pe-uk#1974): the split is written on the final corporate_wealth less the stocks-and-shares ISA, so the two and the ISA sum to corporate_wealth and the engine's share_like_capital stays corporate_wealth; a household with such holdings but no drawn fraction (a clip that lowered the ISA alone) holds them directly (undrawn_fraction), and the receipt counts it. The other two are the debt secured on other residential property (WAS DVHseDebtR8_sum + DVBLtDebtR8_sum) and on non-residential property (DVBldDebtR8_sum), which policyengine-uk deducts after the sale costs in valuing Universal Credit property capital (UC Regs 2013 reg 49(1)(b)): each is zero where the final value of its asset is zero, and the two are parts of the mortgages on other property, so where their sum passes other_mortgage both are scaled down to it (secured_debt_within); the receipt counts the rows each rule touched, and the wealth_coherence gate holds the split and the debts as identities. HFINWNTR8_exSLC_Sum is net financial wealth excluding student loans, so gross less it is the non-student-loan financial liabilities; UKDS SN 7215 documentation is the codebook. Engine predictors materialize at their native entity and person/benunit values are summed to household, reproducing the incumbent map_to=household semantics; region is one-hot encoded jointly across donor and recipient (the incumbent's dummy encoding), with unmapped donor GOR codes becoming all-zero dummy rows. The WAS and FRS predictor definitions are not fully like-for-like and are ported as-is; raw WAS missing values are blanket-filled with zero; UKDS negative sentinel codes (-9/-8/-7/-6) are recoded to zero for the nonnegative-domain columns the licensed audit found carrying them (vcarnr8: 2 rows; HBedRmR8: 95.8 percent - the bedrooms question is effectively unasked in the WAS household file, predictor-quality revisit registered on microcosm#145) - a signed difference vs the incumbent, which trains on raw sentinels; DVPriRntR8's -9 is structural not-applicable so the private-renter reading is unchanged; genuinely negative domains are never recoded. The recipient council_tax predictor is the bill the household pays, council_tax less council_tax_rebate, the quantity the WAS donor records, since the spine's council_tax is the liability before council tax reduction (uk-data#496/#499, microcosm#1095). The donor council_tax is DVCTaxAmtAnnualR8, the annual amount paid (CTAmtR8 is one instalment), its children are NumChildR8 (NumCh18R8 overlaps NumAdultR8), and the recipient adults and children are the household's FRS claimants and partners and its other members (is_uc_claimant), which together make the household size on both sides; rental_income is the donor's net rent DVNetRentAmtAnnualR8_aggr against the household's property_income (uk-data#486/#495, microcosm#1095).", "operations": [ { "derived": { @@ -8000,6 +8010,7 @@ "other_property_value" ] }, + "gate_calibration": "cross_fitted", "holder_strata": { "directly_held_share_fraction": "corporate_wealth_excl_isa", "non_residential_property_secured_debt": "non_residential_property_value", diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/property_purchase_targets.json b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/property_purchase_targets.json index 80a98038fd..5c3b5852e4 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/property_purchase_targets.json +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/property_purchase_targets.json @@ -26,8 +26,8 @@ ], "minimum_price": 1000.0, "property_type": "additional_residential", - "transactions": 27.097631578947365, - "value": 183301.81586439192 + "transactions": 17.659318823388908, + "value": 101248.94295794693 }, "derivation": {}, "non_residential": { @@ -57,7 +57,7 @@ ], "minimum_price": 1000.0, "property_type": "non_residential", - "transactions": 9.176436238560177, - "value": 112796.95808421359 + "transactions": 7.755511160450606, + "value": 73068.4056805093 } } diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/property_rental_facts.json b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/property_rental_facts.json index 44b3e68081..a6df867b36 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/property_rental_facts.json +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/sources/property_rental_facts.json @@ -1,90 +1,90 @@ { "expense_landlords_by_type": { - "legal_management_and_professional_fees": 68.73493528177121, - "non_residential_finance_costs": 68.73493528177121, - "other_allowable_expenses": 68.73493528177121, - "rent_rates_and_insurance": 68.73493528177121, - "repairs_and_maintenance": 68.73493528177121, - "residential_finance_costs": 68.73493528177121, - "services_including_wages": 68.73493528177121 + "legal_management_and_professional_fees": 69.5210412447454, + "non_residential_finance_costs": 69.5210412447454, + "other_allowable_expenses": 69.5210412447454, + "rent_rates_and_insurance": 69.5210412447454, + "repairs_and_maintenance": 69.5210412447454, + "residential_finance_costs": 69.5210412447454, + "services_including_wages": 69.5210412447454 }, "expenses": { - "all": 32249.572175972167, - "individual": 31927.076454212445, - "partnership": 322.4957217597221 + "all": 32757.922728603622, + "individual": 32430.343501317584, + "partnership": 327.5792272860381 }, "expenses_by_type": { - "legal_management_and_professional_fees": 3860.66820869192, - "non_residential_finance_costs": 1234.3001724904457, - "other_allowable_expenses": 4250.447210531009, - "rent_rates_and_insurance": 3535.8523738260133, - "repairs_and_maintenance": 5948.770004258463, - "residential_finance_costs": 11897.540008516926, - "services_including_wages": 1521.9941976573916 + "legal_management_and_professional_fees": 3921.5239870788796, + "non_residential_finance_costs": 1253.756467022815, + "other_allowable_expenses": 4317.44708192819, + "rent_rates_and_insurance": 3591.5880747044544, + "repairs_and_maintenance": 6042.540566628754, + "residential_finance_costs": 12085.081133257509, + "services_including_wages": 1545.98541798302 }, "landlords": { - "all": 137.46987056354243, - "individual": 136.095171857907, - "partnership": 1.3746987056354385 + "all": 139.0420824894908, + "individual": 137.6516616645959, + "partnership": 1.3904208248949033 }, "receipts": { - "all": 51599.31548155547, - "individual": 51083.322326739915, - "partnership": 515.9931548155582 + "all": 52412.676365765794, + "individual": 51888.549602108134, + "partnership": 524.1267636576595 }, "receipts_bands": [ { - "landlords": 62.052372129376785, + "landlords": 62.76205112372849, "lower_bound": 0, "upper_bound": 10000 }, { - "landlords": 41.05003079328003, + "landlords": 41.51951074338962, "lower_bound": 10000, "upper_bound": 20000 }, { - "landlords": 15.75175600207257, + "landlords": 15.931905285254155, "lower_bound": 20000, "upper_bound": 30000 }, { - "landlords": 7.159889091851168, + "landlords": 7.241775129660979, "lower_bound": 30000, "upper_bound": 40000 }, { - "landlords": 3.818607515653956, + "landlords": 3.8622800691525225, "lower_bound": 40000, "upper_bound": 50000 }, { - "landlords": 2.386629697283723, + "landlords": 2.4139250432203263, "lower_bound": 50000, "upper_bound": 60000 }, { - "landlords": 1.4319778183702336, + "landlords": 1.4483550259321958, "lower_bound": 60000, "upper_bound": 70000 }, { - "landlords": 0.954651878913489, + "landlords": 0.9655700172881306, "lower_bound": 70000, "upper_bound": 80000 }, { - "landlords": 0.4773259394567445, + "landlords": 0.4827850086440653, "lower_bound": 80000, "upper_bound": 90000 }, { - "landlords": 0.4773259394567445, + "landlords": 0.4827850086440653, "lower_bound": 90000, "upper_bound": 100000 }, { - "landlords": 1.909303757826978, + "landlords": 1.9311400345762613, "lower_bound": 100000, "upper_bound": null } diff --git a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json index 1ca04ea414..5c3cd5a361 100644 --- a/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json +++ b/packages/microcosm-graph/tests/fixtures/parity/uk_spine/uk_spine.json @@ -1 +1 @@ -{"country":"uk","nodes":[{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Load the source-bound UK FRS root population.","id":"create_uk_frs","inputs":[],"kernel":"uk.create@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"months_since_last_birthday","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_care_hours_in_household","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_blind","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_claimant_or_partner","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_hbai_dependent_child","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"uc_is_in_startup_period","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"uc_is_in_gainful_self_employment","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"rent_paid_as_boarder","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"rent_paid_as_lodger","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"trading_loss","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"loss_relief","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ni_class_4_losses_brought_forward","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"annuity_and_trust_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"individual_savings_account_interest_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"stands_as_sole_owner_or_partner_of_company","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_engaged_in_owned_company_trade","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"owned_company_is_main_employment","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"owned_company_carries_on_trade","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"owned_company_carries_on_property_business","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"owned_company_income_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"reports_rent_from_other_property","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"spousal_maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_paternity_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_bonus_amount","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_company_car_price_band","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_company_car_fuel_code","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_company_car_private_fuel","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_company_car_contribution","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_includes_support_component","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"war_widows_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"widowed_parents_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"liable_for_share_of_household_rent","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"sample_fraction":1.0,"sample_seed":578,"stage_contract_sha256":"879fdd6e1e5832b94af4259b1028f852470bbe2c3ab19b61ce5f92a2e9c12ec4","time_period":"2024"},"population":null,"sources":["frs"],"structural":"create","weights":null},{"base":"create_uk_frs","citation":"","description":"Ownership boundary for the source-assembling root stage.","id":"frs_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Claim the cells assembled by the UK FRS root transform.","id":"frs_spine","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"months_since_last_birthday","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_care_hours_in_household","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_blind","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_claimant_or_partner","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_hbai_dependent_child","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"uc_is_in_startup_period","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"uc_is_in_gainful_self_employment","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent_paid_as_boarder","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent_paid_as_lodger","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"trading_loss","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"loss_relief","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ni_class_4_losses_brought_forward","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"annuity_and_trust_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"individual_savings_account_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"other_investment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"stands_as_sole_owner_or_partner_of_company","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_engaged_in_owned_company_trade","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_is_main_employment","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_carries_on_trade","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_carries_on_property_business","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_income_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"reports_rent_from_other_property","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"spousal_maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_paternity_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_bonus_amount","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_company_car_price_band","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_company_car_fuel_code","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_company_car_private_fuel","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_company_car_contribution","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_includes_support_component","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"war_widows_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"widowed_parents_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"liable_for_share_of_household_rent","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{},"population":"frs_spine.boundary","sources":[],"structural":"none","weights":null},{"base":"frs_spine.boundary","citation":"","description":"Ownership boundary before age_tail rewrites.","id":"age_tail.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage age_tail.","id":"age_tail","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["external_child_payments","region"],"entity":"household","rows":"all"},{"columns":["gender"],"entity":"person","rows":"all"}],"kernel":"uk.stage.age_tail@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"age_tail","stage_contract_sha256":"963a34f38caede2525e3b8735f904bb70a1bbef5a272f0eefd4346343444484f","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_relationships.","id":"frs_relationships","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_household_head"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_relationships@1","mass":"conserve","outputs":[{"column":"relationship_to_head","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_role","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_looked_after_by_local_authority","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"child_limit_non_parental_caring_exception","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_household_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_relationships","stage_contract_sha256":"ae32bf855753d3b7505e54a18532b1b53a04b6beda764cc09ad09462cf130085","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_employment.","id":"frs_employment","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_employment@1","mass":"conserve","outputs":[{"column":"employment_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_sector","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"sic_industry_division","dtype":"int64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_employment","stage_contract_sha256":"ddbefaf05b44788d794a6e4b0e8926c14318d66e50d2f11f50ca549538bbf60c","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_council_tax.","id":"frs_council_tax","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","sic_industry_division"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_council_tax@1","mass":"conserve","outputs":[{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_council_tax","stage_contract_sha256":"06804f54c12d25f2afcb31eec27789802f663cb42689a932dc32f3ba5fc05fff","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_disability.","id":"frs_disability","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax","region"],"entity":"household","rows":"all"},{"columns":["afcs_reported","age","attendance_allowance_reported","dla_m_reported","dla_sc_reported","esa_contrib_reported","esa_income_reported","iidb_reported","incapacity_benefit_reported","pip_dl_reported","pip_m_reported","sda_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_disability@1","mass":"conserve","outputs":[{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_disability","stage_contract_sha256":"ac500b4cb1bc04d4fb72d198592dd376d61da8c150921a6ac53914ac18be0508","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education.","id":"frs_education","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","esa_contrib_reported","esa_income_reported","is_severely_disabled_for_benefits","jsa_contrib_reported","jsa_income_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education@1","mass":"conserve","outputs":[{"column":"current_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"highest_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_non_advanced_education","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_approved_training","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"age_started_or_accepted_current_education_or_training","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_before_universal_credit_qualifying_young_person_terminal_date","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"adult_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"receives_benefits_in_own_right","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"reports_outstanding_student_loan","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"age_left_full_time_education","dtype":"int64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education","stage_contract_sha256":"592ddc77703f19bb3e1d48b6aecffc98b4e2abd3379db84a06e011bde4fa5549","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_legacy_proxies.","id":"frs_legacy_proxies","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_legacy_proxies@1","mass":"conserve","outputs":[{"column":"legacy_jobseeker_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_health_condition_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_support_group_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_legacy_proxies","stage_contract_sha256":"1ecf761cf3fa7180da15659e138e67a8654e58272b4fde28344aa27a874ad0aa","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"age_tail.boundary","citation":"","description":"Ownership boundary before frs_education_grant_split rewrites.","id":"frs_education_grant_split.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education_grant_split.","id":"frs_education_grant_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education_grant_split@1","mass":"conserve","outputs":[{"column":"disabled_students_allowance_eligible_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education_grant_split","stage_contract_sha256":"8718f014b90498c2cc7c754289775ca4a41452d9b978d8cbc5f34b64cbdc7df2","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_take_up.","id":"frs_take_up","inputs":[{"columns":["frs_benunit_capital","is_married"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","child_benefit_reported","education_grants","is_uc_claimant","months_since_last_birthday","pension_credit_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_child_benefit","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"child_benefit_opts_out","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_pc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_tfc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_extended_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_universal_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_targeted_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"maximum_extended_childcare_hours_usage","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"max_free_entitlement_hours_used","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_take_up","stage_contract_sha256":"78aec80408c50455b37308e5a977fb70df3ecf915d6c1e8f80715ad9b58e62cf","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_person_draws.","id":"frs_person_draws","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","employment_income","employment_status","max_free_entitlement_hours_used"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_person_draws@1","mass":"conserve","outputs":[{"column":"would_claim_marriage_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_scp","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"attends_private_school_random_draw","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"tax_free_childcare_spend_routed_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_apprentice","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_person_draws","stage_contract_sha256":"112c502d702c640dedbc2dca7d1cfe5ae43e0f0e3ba6acfe49c738dbbfb7e693","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_household_draws.","id":"frs_household_draws","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_apprentice"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_household_draws@1","mass":"conserve","outputs":[{"column":"household_owns_tv","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"would_evade_tv_licence_fee","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residential_property_purchased_is_first_home","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"property_purchased","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_household_draws","stage_contract_sha256":"c74c63b09264319c4bf0049dabba00ecd0ce660beb7b53d6dae71518434bc949","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_brma.","id":"frs_brma","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_brma@1","mass":"conserve","outputs":[{"column":"brma","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_brma","stage_contract_sha256":"4285376b37299d375ed583b7f6b1747bd8b7cb1c8c0d19a36481156b5314a854","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"frs_education_grant_split.boundary","citation":"","description":"Freeze the assembled-spine gate population.","id":"frs_brma.checkpoint","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_hmrc_spine_leaves.","id":"frs_hmrc_spine_leaves","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["brma","region"],"entity":"household","rows":"all"},{"columns":["age","employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_hmrc_spine_leaves@1","mass":"conserve","outputs":[{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ossben_identifiable_subset","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"srp_regular_code5","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_hmrc_spine_leaves","stage_contract_sha256":"6b2e0264fbac47dae5e1fc4fa9e980c5c2caf7f12f165129649a559f3ad7a154","time_period":"2024"},"population":"frs_brma.checkpoint","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_annual_income_spells.","id":"frs_annual_income_spells","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","employer_pension_contributions","employment_income","gender","self_employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_annual_income_spells@1","mass":"conserve","outputs":[{"column":"employment_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income_other_spells","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income_other_spells","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_pension_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"contributory_benefits_annual_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_annual_income_spells","stage_contract_sha256":"2475738aee1e2bba3d93a759ee77b7b1a62e6a87feb07ac7b86c9150d2769009","time_period":"2024"},"population":"frs_brma.checkpoint","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"frs_brma.checkpoint","citation":"","description":"Run structural UK stage spi_support_channel.","id":"spi_support_channel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_support_channel@1","mass":"declared","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","source_household_id","int64"],["household","source_year","int64"],["household","source_household_key","string"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_support_channel","stage_contract_sha256":"2c682605139c0a8f96e8ba45a2c03f506d3f758ef437841066a8fdb8b74269b6","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_support_channel.","id":"spi_support_channel.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"source_household_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_year","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_household_key","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["person.person_source_id","person.person_support_channel","person.person_support_clone_index","benunit.benunit_source_id","benunit.benunit_support_channel","benunit.benunit_support_clone_index","household.source_household_id","household.source_year","household.source_household_key","household.household_source_id","household.household_support_channel","household.household_support_clone_index","household.household_is_spi_synthetic"]},"population":"spi_support_channel","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"spi_support_channel","citation":"","description":"Run structural UK stage spi_income_band_donors.","id":"spi_income_band_donors","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_income_band_donors@1","mass":"declared","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"],["household","household_is_spi_income_band_donor","bool"],["household","spi_income_band_donor_lower_bound","float64"],["person","person_is_spi_income_band_carrier","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_income_band_donors","stage_contract_sha256":"4754ace499836c44b00c1c53a9ef5fd686d3a29108d0d546d7a11dcc37ee8807","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_income_band_donors.","id":"spi_income_band_donors.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_income_band_donor","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"spi_income_band_donor_lower_bound","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"person_is_spi_income_band_carrier","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_spi_income_band_donor","household.spi_income_band_donor_lower_bound","person.person_is_spi_income_band_carrier"]},"population":"spi_income_band_donors","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_spi_income_spine.","id":"hmrc_spi_income_spine","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","rent_paid_as_boarder","rent_paid_as_lodger","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","maintenance_expenses","childcare_expenses","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","ssmg_reported","incapacity_benefit_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","ossben_identifiable_subset","srp_regular_code5","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_spi_income_spine@1","mass":"conserve","outputs":[{"column":"charitable_investment_gifts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"gift_aid","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_investment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_employment_benefits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employment_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_social_security_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_taxable_termination_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_miscellaneous_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_state_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"property_finance_costs","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employed_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_earned_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_assessable_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"individual_savings_account_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"war_widows_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"widowed_parents_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"trading_loss","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"loss_relief","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ni_class_4_losses_brought_forward","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_income_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income_other_spells","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income_other_spells","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"contributory_benefits_annual_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"annuity_and_trust_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"uc_is_in_startup_period","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"uc_is_in_gainful_self_employment","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_includes_support_component","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"reports_rent_from_other_property","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"stands_as_sole_owner_or_partner_of_company","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_engaged_in_owned_company_trade","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_is_main_employment","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_carries_on_trade","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_carries_on_property_business","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_is_spi_income_recipient","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_spi_income_spine","stage_contract_sha256":"b12912d2eee7e34ade513aa02dd554cbb26a7dc014155a031c53d1defe53a077","time_period":"2024"},"population":"spi_income_band_donors","sources":["frs"],"structural":"none","weights":null},{"base":"spi_income_band_donors","citation":"","description":"Ownership boundary before company_cars rewrites.","id":"company_cars.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage company_cars.","id":"company_cars","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","rent_paid_as_boarder","rent_paid_as_lodger","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient"],"entity":"person","rows":"all"}],"kernel":"uk.stage.company_cars@1","mass":"conserve","outputs":[{"column":"company_car_list_price","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"company_car_co2_emissions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"company_car_fuel_type","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"company_car_electric_range","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"company_car_capital_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"company_car_private_fuel_provided","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"uc_is_in_gainful_self_employment","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"company_cars","stage_contract_sha256":"a4e0348ecb76f8550486df0682d4f2d6b7d2dee3038f5bbcf6bd0a347b7dfa6a","time_period":"2024"},"population":"company_cars.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"company_cars.boundary","citation":"","description":"Ownership boundary before spi_housing_shell rewrites.","id":"spi_housing_shell.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage spi_housing_shell.","id":"spi_housing_shell","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax_single_adult_raw","household_support_channel","ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","individual_savings_account_interest_income","is_household_head","other_investment_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported","uc_is_in_gainful_self_employment"],"entity":"person","rows":"all"}],"kernel":"uk.stage.spi_housing_shell@1","mass":"conserve","outputs":[{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_housing_shell","stage_contract_sha256":"524549b7dfbd0fceb505311eb0c3b923cfe3b11a8acd5ecfbfbcbb477e142eb1","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_wealth.","id":"was_wealth","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_wealth@1","mass":"conserve","outputs":[{"column":"owned_land","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"corporate_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"private_pension_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gross_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"net_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"non_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"savings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"num_vehicles","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cash_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"stocks_and_shares_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"consumer_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"student_loan_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"directly_held_shares","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"unit_and_investment_trusts","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_residential_property_secured_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"non_residential_property_secured_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_wealth","stage_contract_sha256":"e648f94320deffd15d4e7c2f51e044e8b3572b24bb62d65f157edcb8f31753b5","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_lisa.","id":"was_lisa","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_lisa@1","mass":"conserve","outputs":[{"column":"has_lifetime_isa","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"lifetime_isa_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_lifetime_isa_balance","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_lisa","stage_contract_sha256":"bf0389b9b72cd952ff1290dc190f2860497f6c68bb08dc2fa6f523bb33f59ab1","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"spi_housing_shell.boundary","citation":"","description":"Ownership boundary before regional_property_uprating rewrites.","id":"regional_property_uprating.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage regional_property_uprating.","id":"regional_property_uprating","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_lifetime_isa_balance","household_support_channel","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.regional_property_uprating@1","mass":"conserve","outputs":[{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_land","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"other_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"non_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"regional_property_uprating","stage_contract_sha256":"f45db95fde3f93731c0925b9bf8c12021921df2e4908770acdec1e3c97889277","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"regional_property_uprating.boundary","citation":"","description":"Run structural UK stage high_value_home_support.","id":"high_value_home_support","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.high_value_home_support@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_high_value_support_copy","bool"],["household","high_value_support_copies","int64"],["household","high_value_support_copy_index","int64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"high_value_home_support","stage_contract_sha256":"174f4b38228d98107bee1639d1a297a2748bb618e87c7bd0a6c869c6ab06f8fa","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by high_value_home_support.","id":"high_value_home_support.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_high_value_support_copy","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"high_value_support_copies","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"high_value_support_copy_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_high_value_support_copy","household.high_value_support_copies","household.high_value_support_copy_index"]},"population":"high_value_home_support","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage regional_home_values.","id":"regional_home_values","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["high_value_support_copy_index","household_is_high_value_support_copy","household_source_id","region","tenure_type"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.regional_home_values@1","mass":"conserve","outputs":[{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"main_residence_value_rank_basis","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"regional_home_values","stage_contract_sha256":"48e8a622c8830a54a4c48d9d8cb4f011751aa05d7cb5f6c7f0e06e1121b720b1","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage property_components.","id":"property_components","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["main_residence_value_rank_basis","non_residential_property_value","other_residential_property_value","region","subrent"],"entity":"household","rows":"all"},{"columns":["age","is_household_head","person_is_spi_income_recipient","person_support_channel"],"entity":"person","rows":"all"}],"kernel":"uk.stage.property_components@1","mass":"conserve","outputs":[{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_finance_costs","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_rental_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"property_components","stage_contract_sha256":"5022c27a480f057f8b8a4f87d9305ad00b1b9c724b225e37b02403b79b99f82e","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage property_purchases.","id":"property_purchases","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_source_id","non_residential_property_value","other_residential_property_value","region"],"entity":"household","rows":"all"},{"columns":["age","property_rental_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.property_purchases@1","mass":"conserve","outputs":[{"column":"additional_residential_property_purchased","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"non_residential_property_purchased","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"property_purchases","stage_contract_sha256":"7af04815a11c84990306ea0293606448cdce83bb57359fe3bb4ffbf592a39fb2","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage nts_bus_travel.","id":"nts_bus_travel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.nts_bus_travel@1","mass":"conserve","outputs":[{"column":"local_bus_use_band","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_in_london_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_pass_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_single_fare_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_local_bus_trips","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"nts_bus_travel","stage_contract_sha256":"f96c01de0180936596838a5cfb586e398ac33e521b4e2e58f6ed10c0dfd2fea8","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage lcfs_consumption.","id":"lcfs_consumption","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.lcfs_consumption@1","mass":"conserve","outputs":[{"column":"food_and_non_alcoholic_beverages_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"alcohol_and_tobacco_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"clothing_and_footwear_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_water_and_electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_furnishings_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"health_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"transport_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"communication_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"recreation_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"education_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"restaurants_and_hotels_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"miscellaneous_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"petrol_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"diesel_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_fare_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_energy_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gas_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"liquid_fuel_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"solid_fuel_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"has_fuel_consumption","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"uses_energy_prepayment_meter","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"beer_litres","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"cider_litres","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"wine_litres","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"spirits_litres","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_fermented_litres","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"beer_draught_share","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"cider_draught_share","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"cigarettes_per_week","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"hand_rolling_tobacco_grams_per_week","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"cigars_grams_per_week","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_tobacco_grams_per_week","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"remote_gaming_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"pool_betting_net_receipts","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bingo_net_receipts","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"national_lottery_ticket_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"land_based_casino_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"machine_games_lower_rate_net_takings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"machine_games_standard_rate_net_takings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"machine_games_higher_rate_net_takings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"land_based_fixed_odds_betting_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"remote_uk_horseracing_betting_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"remote_other_betting_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"betting_exchange_commission","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"horse_and_dog_pool_betting_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"car_fuel_type","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"car_co2_emissions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"car_engine_size","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"car_first_registration_date","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"car_is_ved_exempt","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"lcfs_consumption","stage_contract_sha256":"9b4c691d4bda26cb5e45083ad1970378a1e1b632bee52759f498461f4ba90413","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_vat.","id":"etb_vat","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_vat@1","mass":"conserve","outputs":[{"column":"full_rate_vat_expenditure_rate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_vat","stage_contract_sha256":"216b28835eba7a952243134dffbb45a1b3a0cdff2e3e7d0e94e2acbf754052b5","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_services.","id":"etb_services","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_services@1","mass":"conserve","outputs":[{"column":"dfe_education_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_usage","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"a_and_e_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"admitted_patient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"outpatient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_a_and_e_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_admitted_patient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_outpatient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_services","stage_contract_sha256":"2c5f860468ce64c1b7216e15d1f0f832d6dca5039b034af3e71470f4f682d21a","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"base":"high_value_home_support","citation":"","description":"Ownership boundary before uc_reporter_redraw rewrites.","id":"uc_reporter_redraw.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_reporter_redraw.","id":"uc_reporter_redraw","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_reporter_redraw@1","mass":"conserve","outputs":[{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_reporter_redraw","stage_contract_sha256":"b03d4947d6cb0404ba410c548e1850d5abe0c7dae2dc097d419b63eea04920a9","time_period":"2024"},"population":"uc_reporter_redraw.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"uc_reporter_redraw.boundary","citation":"","description":"Ownership boundary before spi_benefit_coherence rewrites.","id":"spi_benefit_coherence.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage spi_benefit_coherence.","id":"spi_benefit_coherence","inputs":[{"columns":["benunit_support_channel","frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_source_id","region"],"entity":"household","rows":"all"},{"columns":["aa_category","age","attendance_allowance_reported","dla_m_category","dla_m_reported","dla_sc_category","dla_sc_reported","employment_income","hours_worked","incapacity_benefit_reported","is_uc_claimant","person_source_id","person_support_channel","pip_dl_category","pip_dl_reported","pip_m_category","pip_m_reported","self_employment_income","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.spi_benefit_coherence@1","mass":"conserve","outputs":[{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"war_widows_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"widowed_parents_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"receives_benefits_in_own_right","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_benefit_coherence","stage_contract_sha256":"2c0162b22d5fcab2296f654177c9f87710184c20fb323cff25710ee0667fcdef","time_period":"2024"},"population":"spi_benefit_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"spi_benefit_coherence.boundary","citation":"","description":"Ownership boundary before uc_capital_coherence rewrites.","id":"uc_capital_coherence.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_capital_coherence.","id":"uc_capital_coherence","inputs":[{"columns":["benunit_support_channel","dependent_children","is_married"],"entity":"benunit","rows":"all"},{"columns":["non_residential_property_secured_debt","non_residential_property_value","other_residential_property_secured_debt","other_residential_property_value","owned_land","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","individual_savings_account_interest_income","is_benunit_head","is_household_head","is_parent","other_investment_income","person_support_channel","savings_interest_income","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_capital_coherence@1","mass":"conserve","outputs":[{"column":"uc_reported_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"pension_credit_reported_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_capital_coherence","stage_contract_sha256":"67478de55540a138448d9da387a64e5e2afbb17caf17b244bc3baaa34de56022","time_period":"2024"},"population":"uc_capital_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"uc_capital_coherence.boundary","citation":"","description":"Ownership boundary before uc_take_up rewrites.","id":"uc_take_up.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_take_up.","id":"uc_take_up","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_take_up","stage_contract_sha256":"1f5bb5a59426d5a1f0a8ba40180b744725be29dea741a4e93924f4f55e9a7e11","time_period":"2024"},"population":"uc_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_legacy_closure_take_up.","id":"uc_legacy_closure_take_up","inputs":[{"columns":["frs_benunit_capital","would_claim_uc"],"entity":"benunit","rows":"all"},{"columns":["household_source_id","region"],"entity":"household","rows":"all"},{"columns":["age","child_tax_credit_reported","esa_income_reported","housing_benefit_reported","income_support_reported","is_claimant_or_partner","jsa_income_reported","universal_credit_reported","working_tax_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_legacy_closure_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_uc_at_legacy_closure","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_legacy_closure_take_up","stage_contract_sha256":"bd7d87d11fb5271cd5a3e26a0268f2eaacb155fa87a9f4a8f00a6418b6da6b5c","time_period":"2024"},"population":"uc_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"uc_take_up.boundary","citation":"","description":"Ownership boundary before pension_credit_take_up rewrites.","id":"pension_credit_take_up.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage pension_credit_take_up.","id":"pension_credit_take_up","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.pension_credit_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_pc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"has_mixed_age_couple_pension_credit_saving","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"pension_credit_take_up","stage_contract_sha256":"e887dbbb186cb79f6d3fc9a629269dbac4a43381b9574df65353b816f01a3a35","time_period":"2024"},"population":"pension_credit_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"pension_credit_take_up.boundary","citation":"","description":"Ownership boundary before child_benefit_take_up rewrites.","id":"child_benefit_take_up.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage child_benefit_take_up.","id":"child_benefit_take_up","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.child_benefit_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_child_benefit","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_opts_out","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"child_benefit_take_up","stage_contract_sha256":"c99071c19d0184440163f7ab49ee33cc19ad0ad4e2f6462ed50c36917b0da364","time_period":"2024"},"population":"child_benefit_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_deduction_attributes.","id":"uc_deduction_attributes","inputs":[{"columns":["child_benefit_opts_out","frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_deduction_attributes@1","mass":"conserve","outputs":[{"column":"uc_deduction_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_type_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_latent_deduction_rate","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_combination","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_deduction_attributes","stage_contract_sha256":"6bc7e3ec1a5712e23ca1b7d2956e8b17f2526b94431ba3e5a9294b04658e4fe0","time_period":"2024"},"population":"child_benefit_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"child_benefit_take_up.boundary","citation":"","description":"Run structural UK stage cgt_support_split.","id":"cgt_support_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_support_split@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_cgt_support_copy","bool"],["household","cgt_support_copies","int64"],["household","cgt_support_copy_index","int64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_support_split","stage_contract_sha256":"88a0f5974de73dc778a782c9ce6e5f811e9d17e9eb86a30207bc9276134e53af","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_support_split.","id":"cgt_support_split.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_cgt_support_copy","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copies","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copy_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_cgt_support_copy","household.cgt_support_copies","household.cgt_support_copy_index"]},"population":"cgt_support_split","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"cgt_support_split","citation":"","description":"Run structural UK stage cgt_incidence_clone.","id":"cgt_incidence_clone","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_clone@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_capital_gains_clone","bool"],["person","capital_gains","float64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_clone","stage_contract_sha256":"29198953c5522c9b996b981478909916870977a79e9f2feb2db7e9e72ef15de8","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_incidence_clone.","id":"cgt_incidence_clone.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_capital_gains_clone","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_capital_gains_clone","person.capital_gains"]},"population":"cgt_incidence_clone","sources":[],"structural":"none","weights":null},{"base":"cgt_incidence_clone","citation":"","description":"Ownership boundary before hmrc_cgt_gains_spine rewrites.","id":"hmrc_cgt_gains_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_gains_spine.","id":"hmrc_cgt_gains_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["cgt_support_copies","corporate_wealth","gross_financial_wealth","household_is_cgt_support_copy","non_residential_property_value","other_residential_property_value","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","individual_savings_account_interest_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_gains_spine@1","mass":"conserve","outputs":[{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_gains_spine","stage_contract_sha256":"b5d27d6b6307acec73a9336a00ef3e4cd900164787362e1157a49ffaa8af50ef","time_period":"2024"},"population":"hmrc_cgt_gains_spine.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"hmrc_cgt_gains_spine.boundary","citation":"","description":"Run structural UK stage cgt_incidence_anchor.","id":"cgt_incidence_anchor","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_is_capital_gains_clone","region"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","dividend_income","employment_income","individual_savings_account_interest_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_anchor@1","mass":"conserve","outputs":[],"params":{"expand_cells":[],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_anchor","stage_contract_sha256":"ed54c55428e56d7597c57c8459b014aa43b2ff9495b903f0b789bd5e4264ca9a","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"cgt_incidence_anchor","citation":"","description":"Run structural UK stage cgt_residential_split.","id":"cgt_residential_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_residential_split@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_cgt_residential_clone","bool"],["household","cgt_residential_clone_index","int64"],["person","cgt_residential_probability","float64"],["person","capital_gains_residential_property","float64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_residential_split","stage_contract_sha256":"57d73fd1e8673d747fed04bb73b3eb1a8b215f73b7d24dd5b191b10ecf1e505f","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_residential_split.","id":"cgt_residential_split.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_cgt_residential_clone","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_residential_clone_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_residential_probability","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_residential_property","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_cgt_residential_clone","household.cgt_residential_clone_index","person.cgt_residential_probability","person.capital_gains_residential_property"]},"population":"cgt_residential_split","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_asset_type_spine.","id":"hmrc_cgt_asset_type_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["corporate_wealth","gross_financial_wealth","other_residential_property_value","region","stocks_and_shares_isa"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","capital_gains_residential_property","dividend_income","property_income","reports_rent_from_other_property","self_employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_asset_type_spine@1","mass":"conserve","outputs":[{"column":"capital_gains_asset_type","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_badr","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_asset_type_spine","stage_contract_sha256":"722e19b00e13d98ce9fde4069ef6ebf3e30ed9143871bec788992a36b94b5e85","time_period":"2024"},"population":"cgt_residential_split","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage salary_sacrifice.","id":"salary_sacrifice","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr"],"entity":"person","rows":"all"}],"kernel":"uk.stage.salary_sacrifice@1","mass":"conserve","outputs":[{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_bonus_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_pre_conversion_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"salary_sacrifice","stage_contract_sha256":"d653f391e521528a66aae725488c307945ed870203e3070c89766ecaae392624","time_period":"2024"},"population":"cgt_residential_split","sources":["frs"],"structural":"none","weights":null},{"base":"cgt_residential_split","citation":"","description":"Ownership boundary before carers_allowance_take_up rewrites.","id":"carers_allowance_take_up.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage carers_allowance_take_up.","id":"carers_allowance_take_up","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay"],"entity":"person","rows":"all"}],"kernel":"uk.stage.carers_allowance_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"carers_allowance_take_up","stage_contract_sha256":"7cf2cf79bd0f9a92f2a334081a35c8bfe24a0b841131fb9a8b8aceee6caf2dba","time_period":"2024"},"population":"carers_allowance_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"carers_allowance_take_up.boundary","citation":"","description":"Ownership boundary before student_loans rewrites.","id":"student_loans.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage student_loans.","id":"student_loans","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","age_left_full_time_education","current_education","highest_education","reports_outstanding_student_loan","student_loan_repayments","student_loans","would_claim_carers_allowance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.student_loans@1","mass":"conserve","outputs":[{"column":"student_loan_plan","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loan_balance","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"student_loans","stage_contract_sha256":"507ca0160144d8f5ea1b2483b812658ee8b49854e2388d50a8c59ca58f2ca9ee","time_period":"2024"},"population":"student_loans.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"student_loans.boundary","citation":"","description":"Ownership boundary before childcare_copy_take_up rewrites.","id":"childcare_copy_take_up.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay","student_loan_plan"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage childcare_copy_take_up.","id":"childcare_copy_take_up","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_uc_childcare","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay","student_loan_plan"],"entity":"person","rows":"all"}],"kernel":"uk.stage.childcare_copy_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_tfc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_extended_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_universal_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_targeted_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maximum_extended_childcare_hours_usage","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"max_free_entitlement_hours_used","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"childcare_copy_take_up","stage_contract_sha256":"cdbb7e135b16fac7ca1bcd6c54222821e2976b4da99f10a60913efd0ba03c13c","time_period":"2024"},"population":"childcare_copy_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage private_school_attendance.","id":"private_school_attendance","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay","student_loan_plan"],"entity":"person","rows":"all"}],"kernel":"uk.stage.private_school_attendance@1","mass":"conserve","outputs":[{"column":"attends_private_school","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"private_school_attendance","stage_contract_sha256":"7e44379c0331fe4c9de05cd76a075c1a6aa22cf0dec6cd2f91b277e70f14a038","time_period":"2024"},"population":"childcare_copy_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage isa_subscriptions.","id":"isa_subscriptions","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["cash_isa","region","stocks_and_shares_isa"],"entity":"household","rows":"all"},{"columns":["age","attends_private_school","dividend_income","employment_income","gender","has_lifetime_isa","individual_savings_account_interest_income","lifetime_isa_balance","loss_relief","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.isa_subscriptions@1","mass":"conserve","outputs":[{"column":"cash_isa_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"stocks_and_shares_isa_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"cash_isa_subscriptions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"stocks_and_shares_isa_subscriptions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"lifetime_isa_payments","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"isa_subscriptions","stage_contract_sha256":"9fc3e3ecf333df38206c9627470ca0c1a9d8abbea7534f6367e01868fdc3081f","time_period":"2024"},"population":"childcare_copy_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage trading_allowance_receipts.","id":"trading_allowance_receipts","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_source_id","region"],"entity":"household","rows":"all"},{"columns":["age","lifetime_isa_payments","self_employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.trading_allowance_receipts@1","mass":"conserve","outputs":[{"column":"self_employment_gross_receipts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"trading_allowance_receipts","stage_contract_sha256":"f91329806570bd874750845816de96b28160e766e8e26bf1174cb0809ad8ff43","time_period":"2024"},"population":"childcare_copy_take_up.boundary","sources":["frs"],"structural":"none","weights":null}],"sources":[{"codec":"csv-tables","description":"Content-bound UK FRS and donor fixture/source bundle.","name":"frs"}]} +{"country":"uk","nodes":[{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Load the source-bound UK FRS root population.","id":"create_uk_frs","inputs":[],"kernel":"uk.create@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"months_since_last_birthday","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_care_hours_in_household","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_blind","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_claimant_or_partner","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_hbai_dependent_child","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"uc_is_in_startup_period","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"uc_is_in_gainful_self_employment","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"rent_paid_as_boarder","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"rent_paid_as_lodger","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"trading_loss","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"loss_relief","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ni_class_4_losses_brought_forward","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"annuity_and_trust_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"individual_savings_account_interest_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"stands_as_sole_owner_or_partner_of_company","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_engaged_in_owned_company_trade","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"owned_company_is_main_employment","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"owned_company_carries_on_trade","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"owned_company_carries_on_property_business","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"owned_company_income_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"reports_rent_from_other_property","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"spousal_maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"statutory_paternity_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_bonus_amount","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_company_car_price_band","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_company_car_fuel_code","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_company_car_private_fuel","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_company_car_contribution","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_includes_support_component","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"war_widows_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"widowed_parents_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"liable_for_share_of_household_rent","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"sample_fraction":1.0,"sample_seed":578,"stage_contract_sha256":"879fdd6e1e5832b94af4259b1028f852470bbe2c3ab19b61ce5f92a2e9c12ec4","time_period":"2024"},"population":null,"sources":["frs"],"structural":"create","weights":null},{"base":"create_uk_frs","citation":"","description":"Ownership boundary for the source-assembling root stage.","id":"frs_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"base":null,"citation":"","description":"Claim the cells assembled by the UK FRS root transform.","id":"frs_spine","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"gender","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"months_since_last_birthday","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"marital_status","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hours_worked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"care_hours","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_care_hours_in_household","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_household_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_benunit_head","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_parent","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_blind","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_uc_claimant","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_claimant_or_partner","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_hbai_dependent_child","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"uc_is_in_startup_period","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"uc_is_in_gainful_self_employment","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent_paid_as_boarder","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent_paid_as_lodger","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"trading_loss","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"loss_relief","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ni_class_4_losses_brought_forward","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"annuity_and_trust_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"individual_savings_account_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"other_investment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"stands_as_sole_owner_or_partner_of_company","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_engaged_in_owned_company_trade","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_is_main_employment","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_carries_on_trade","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_carries_on_property_business","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_income_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"reports_rent_from_other_property","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"spousal_maintenance_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"miscellaneous_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_transfer_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"lump_sum_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loan_repayments","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_sick_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_maternity_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"statutory_paternity_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"student_loans","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"access_fund","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"healthy_start_vouchers","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_breakfasts","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_fruit_veg","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"free_school_meals","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maintenance_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"childcare_expenses","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_asked","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_bonus_amount","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_company_car_price_band","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_company_car_fuel_code","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_company_car_private_fuel","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_company_car_contribution","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"incapacity_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_includes_support_component","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"war_widows_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"widowed_parents_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_married","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dependent_children","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"liable_for_share_of_household_rent","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"region","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_single_adult_raw","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"external_child_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{},"population":"frs_spine.boundary","sources":[],"structural":"none","weights":null},{"base":"frs_spine.boundary","citation":"","description":"Ownership boundary before age_tail rewrites.","id":"age_tail.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage age_tail.","id":"age_tail","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["external_child_payments","region"],"entity":"household","rows":"all"},{"columns":["gender"],"entity":"person","rows":"all"}],"kernel":"uk.stage.age_tail@1","mass":"conserve","outputs":[{"column":"age","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"age_tail","stage_contract_sha256":"963a34f38caede2525e3b8735f904bb70a1bbef5a272f0eefd4346343444484f","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_relationships.","id":"frs_relationships","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_household_head"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_relationships@1","mass":"conserve","outputs":[{"column":"relationship_to_head","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_role","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_family_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_looked_after_by_local_authority","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"child_limit_non_parental_caring_exception","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"ons_household_type","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_relationships","stage_contract_sha256":"ae32bf855753d3b7505e54a18532b1b53a04b6beda764cc09ad09462cf130085","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_employment.","id":"frs_employment","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_employment@1","mass":"conserve","outputs":[{"column":"employment_status","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_sector","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"sic_industry_division","dtype":"int64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_employment","stage_contract_sha256":"ddbefaf05b44788d794a6e4b0e8926c14318d66e50d2f11f50ca549538bbf60c","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_council_tax.","id":"frs_council_tax","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","sic_industry_division"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_council_tax@1","mass":"conserve","outputs":[{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_council_tax","stage_contract_sha256":"06804f54c12d25f2afcb31eec27789802f663cb42689a932dc32f3ba5fc05fff","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_disability.","id":"frs_disability","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax","region"],"entity":"household","rows":"all"},{"columns":["afcs_reported","age","attendance_allowance_reported","dla_m_reported","dla_sc_reported","esa_contrib_reported","esa_income_reported","iidb_reported","incapacity_benefit_reported","pip_dl_reported","pip_m_reported","sda_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_disability@1","mass":"conserve","outputs":[{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_disability","stage_contract_sha256":"ac500b4cb1bc04d4fb72d198592dd376d61da8c150921a6ac53914ac18be0508","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education.","id":"frs_education","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","esa_contrib_reported","esa_income_reported","is_severely_disabled_for_benefits","jsa_contrib_reported","jsa_income_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education@1","mass":"conserve","outputs":[{"column":"current_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"highest_education","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_non_advanced_education","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"is_in_approved_training","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"age_started_or_accepted_current_education_or_training","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_before_universal_credit_qualifying_young_person_terminal_date","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"adult_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"child_ema","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"receives_benefits_in_own_right","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"reports_outstanding_student_loan","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"age_left_full_time_education","dtype":"int64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education","stage_contract_sha256":"592ddc77703f19bb3e1d48b6aecffc98b4e2abd3379db84a06e011bde4fa5549","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_legacy_proxies.","id":"frs_legacy_proxies","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_legacy_proxies@1","mass":"conserve","outputs":[{"column":"legacy_jobseeker_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_health_condition_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"esa_support_group_proxy","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_legacy_proxies","stage_contract_sha256":"1ecf761cf3fa7180da15659e138e67a8654e58272b4fde28344aa27a874ad0aa","time_period":"2024"},"population":"age_tail.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"age_tail.boundary","citation":"","description":"Ownership boundary before frs_education_grant_split rewrites.","id":"frs_education_grant_split.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_education_grant_split.","id":"frs_education_grant_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_education_grant_split@1","mass":"conserve","outputs":[{"column":"disabled_students_allowance_eligible_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"education_grants","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_education_grant_split","stage_contract_sha256":"8718f014b90498c2cc7c754289775ca4a41452d9b978d8cbc5f34b64cbdc7df2","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_take_up.","id":"frs_take_up","inputs":[{"columns":["frs_benunit_capital","is_married"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","child_benefit_reported","education_grants","is_uc_claimant","months_since_last_birthday","pension_credit_reported","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_child_benefit","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"child_benefit_opts_out","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_pc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_tfc","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_extended_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_universal_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_targeted_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"would_claim_uc_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"},{"column":"maximum_extended_childcare_hours_usage","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"max_free_entitlement_hours_used","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_take_up","stage_contract_sha256":"78aec80408c50455b37308e5a977fb70df3ecf915d6c1e8f80715ad9b58e62cf","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_person_draws.","id":"frs_person_draws","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","employment_income","employment_status","max_free_entitlement_hours_used"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_person_draws@1","mass":"conserve","outputs":[{"column":"would_claim_marriage_allowance","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"would_claim_scp","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"attends_private_school_random_draw","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"tax_free_childcare_spend_routed_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"is_apprentice","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_person_draws","stage_contract_sha256":"112c502d702c640dedbc2dca7d1cfe5ae43e0f0e3ba6acfe49c738dbbfb7e693","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_household_draws.","id":"frs_household_draws","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","is_apprentice"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_household_draws@1","mass":"conserve","outputs":[{"column":"household_owns_tv","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"would_evade_tv_licence_fee","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residential_property_purchased_is_first_home","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"property_purchased","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_household_draws","stage_contract_sha256":"c74c63b09264319c4bf0049dabba00ecd0ce660beb7b53d6dae71518434bc949","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_brma.","id":"frs_brma","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_brma@1","mass":"conserve","outputs":[{"column":"brma","dtype":"string","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_brma","stage_contract_sha256":"4285376b37299d375ed583b7f6b1747bd8b7cb1c8c0d19a36481156b5314a854","time_period":"2024"},"population":"frs_education_grant_split.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"frs_education_grant_split.boundary","citation":"","description":"Freeze the assembled-spine gate population.","id":"frs_brma.checkpoint","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_hmrc_spine_leaves.","id":"frs_hmrc_spine_leaves","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["brma","region"],"entity":"household","rows":"all"},{"columns":["age","employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_hmrc_spine_leaves@1","mass":"conserve","outputs":[{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"ossben_identifiable_subset","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"srp_regular_code5","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_hmrc_spine_leaves","stage_contract_sha256":"6b2e0264fbac47dae5e1fc4fa9e980c5c2caf7f12f165129649a559f3ad7a154","time_period":"2024"},"population":"frs_brma.checkpoint","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage frs_annual_income_spells.","id":"frs_annual_income_spells","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","employer_pension_contributions","employment_income","gender","self_employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.frs_annual_income_spells@1","mass":"conserve","outputs":[{"column":"employment_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income_other_spells","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"self_employment_income_other_spells","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"private_pension_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"contributory_benefits_annual_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"frs_annual_income_spells","stage_contract_sha256":"2475738aee1e2bba3d93a759ee77b7b1a62e6a87feb07ac7b86c9150d2769009","time_period":"2024"},"population":"frs_brma.checkpoint","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"frs_brma.checkpoint","citation":"","description":"Run structural UK stage spi_support_channel.","id":"spi_support_channel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_support_channel@1","mass":"declared","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","source_household_id","int64"],["household","source_year","int64"],["household","source_household_key","string"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_support_channel","stage_contract_sha256":"2c682605139c0a8f96e8ba45a2c03f506d3f758ef437841066a8fdb8b74269b6","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_support_channel.","id":"spi_support_channel.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"source_household_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_year","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"source_household_key","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["person.person_source_id","person.person_support_channel","person.person_support_clone_index","benunit.benunit_source_id","benunit.benunit_support_channel","benunit.benunit_support_clone_index","household.source_household_id","household.source_year","household.source_household_key","household.household_source_id","household.household_support_channel","household.household_support_clone_index","household.household_is_spi_synthetic"]},"population":"spi_support_channel","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"spi_support_channel","citation":"","description":"Run structural UK stage spi_income_band_donors.","id":"spi_income_band_donors","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.spi_income_band_donors@1","mass":"declared","outputs":[],"params":{"expand_cells":[["person","person_source_id","int64"],["person","person_support_channel","string"],["person","person_support_clone_index","int64"],["benunit","benunit_source_id","int64"],["benunit","benunit_support_channel","string"],["benunit","benunit_support_clone_index","int64"],["household","household_source_id","int64"],["household","household_support_channel","string"],["household","household_support_clone_index","int64"],["household","household_is_spi_synthetic","bool"],["household","household_is_spi_income_band_donor","bool"],["household","spi_income_band_donor_lower_bound","float64"],["person","person_is_spi_income_band_carrier","bool"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_income_band_donors","stage_contract_sha256":"4754ace499836c44b00c1c53a9ef5fd686d3a29108d0d546d7a11dcc37ee8807","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by spi_income_band_donors.","id":"spi_income_band_donors.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"person_source_id","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_channel","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_support_clone_index","dtype":"int64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_source_id","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_channel","dtype":"string","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"benunit_support_clone_index","dtype":"int64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_source_id","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_channel","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_support_clone_index","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_synthetic","dtype":"bool","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"household_is_spi_income_band_donor","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"spi_income_band_donor_lower_bound","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"person_is_spi_income_band_carrier","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_spi_income_band_donor","household.spi_income_band_donor_lower_bound","person.person_is_spi_income_band_carrier"]},"population":"spi_income_band_donors","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_spi_income_spine.","id":"hmrc_spi_income_spine","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","rent_paid_as_boarder","rent_paid_as_lodger","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","maintenance_expenses","childcare_expenses","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","ssmg_reported","incapacity_benefit_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","ossben_identifiable_subset","srp_regular_code5","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_spi_income_spine@1","mass":"conserve","outputs":[{"column":"charitable_investment_gifts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"gift_aid","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_investment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_employment_benefits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employment_expenses","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_social_security_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_taxable_termination_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_miscellaneous_employment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_other_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_state_pension_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"property_finance_costs","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_employed_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_earned_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_total_investment_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"hmrc_spi_assessable_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"savings_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dividend_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employer_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"personal_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"individual_savings_account_interest_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"attendance_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"state_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"carers_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"war_widows_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"widowed_parents_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"winter_fuel_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"trading_loss","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"loss_relief","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ni_class_4_losses_brought_forward","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_income_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_pay","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_unemployment_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"hmrc_spi_incapacity_benefit_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income_other_spells","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"self_employment_income_other_spells","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"private_pension_income_annual_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"contributory_benefits_annual_share","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"annuity_and_trust_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"aa_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_sc_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"dla_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_m_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pip_dl_category","dtype":"string","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"uc_is_in_startup_period","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"uc_is_in_gainful_self_employment","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_includes_support_component","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"reports_rent_from_other_property","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"stands_as_sole_owner_or_partner_of_company","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_engaged_in_owned_company_trade","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_is_main_employment","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_carries_on_trade","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_company_carries_on_property_business","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"person_is_spi_income_recipient","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_spi_income_spine","stage_contract_sha256":"481cec216d5edea741ff81c3cf939b521c0b89286ca6a67795862c6358118039","time_period":"2024"},"population":"spi_income_band_donors","sources":["frs"],"structural":"none","weights":null},{"base":"spi_income_band_donors","citation":"","description":"Ownership boundary before company_cars rewrites.","id":"company_cars.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage company_cars.","id":"company_cars","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","rent_paid_as_boarder","rent_paid_as_lodger","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient"],"entity":"person","rows":"all"}],"kernel":"uk.stage.company_cars@1","mass":"conserve","outputs":[{"column":"company_car_list_price","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"company_car_co2_emissions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"company_car_fuel_type","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"company_car_electric_range","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"company_car_capital_contributions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"company_car_private_fuel_provided","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"uc_is_in_gainful_self_employment","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"company_cars","stage_contract_sha256":"a4e0348ecb76f8550486df0682d4f2d6b7d2dee3038f5bbcf6bd0a347b7dfa6a","time_period":"2024"},"population":"company_cars.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"company_cars.boundary","citation":"","description":"Ownership boundary before spi_housing_shell rewrites.","id":"spi_housing_shell.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage spi_housing_shell.","id":"spi_housing_shell","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["council_tax_single_adult_raw","household_support_channel","ons_household_type","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","individual_savings_account_interest_income","is_household_head","other_investment_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported","uc_is_in_gainful_self_employment"],"entity":"person","rows":"all"}],"kernel":"uk.stage.spi_housing_shell@1","mass":"conserve","outputs":[{"column":"tenure_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"accommodation_type","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_band","dtype":"string","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"num_bedrooms","dtype":"int64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_reported","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"rent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_interest_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"mortgage_capital_repayment","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"structural_insurance_payments","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_service_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"water_and_sewerage_charges","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"domestic_rates","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"subrent","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_rebate","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"housing_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"council_tax_benefit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_housing_shell","stage_contract_sha256":"9a76a02ceddb2cd85819f57cd33feb44d645800ce963d0b18bad0f6de808fd81","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_wealth.","id":"was_wealth","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_wealth@1","mass":"conserve","outputs":[{"column":"owned_land","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"corporate_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"private_pension_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gross_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"net_financial_wealth","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"non_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"savings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"num_vehicles","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cash_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"stocks_and_shares_isa","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"mortgage_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"consumer_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"student_loan_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"directly_held_shares","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"unit_and_investment_trusts","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_residential_property_secured_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"non_residential_property_secured_debt","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_wealth","stage_contract_sha256":"4c0bcaabf3695a75ec7e69d99b6b8c90570fd345067d77f1ea315f5508a88962","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage was_lisa.","id":"was_lisa","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.was_lisa@1","mass":"conserve","outputs":[{"column":"has_lifetime_isa","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"lifetime_isa_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_lifetime_isa_balance","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"was_lisa","stage_contract_sha256":"bf0389b9b72cd952ff1290dc190f2860497f6c68bb08dc2fa6f523bb33f59ab1","time_period":"2024"},"population":"spi_housing_shell.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"spi_housing_shell.boundary","citation":"","description":"Ownership boundary before regional_property_uprating rewrites.","id":"regional_property_uprating.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage regional_property_uprating.","id":"regional_property_uprating","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_lifetime_isa_balance","household_support_channel","region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.regional_property_uprating@1","mass":"conserve","outputs":[{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"owned_land","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"other_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"non_residential_property_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"regional_property_uprating","stage_contract_sha256":"f45db95fde3f93731c0925b9bf8c12021921df2e4908770acdec1e3c97889277","time_period":"2024"},"population":"regional_property_uprating.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"regional_property_uprating.boundary","citation":"","description":"Run structural UK stage high_value_home_support.","id":"high_value_home_support","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.high_value_home_support@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_high_value_support_copy","bool"],["household","high_value_support_copies","int64"],["household","high_value_support_copy_index","int64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"high_value_home_support","stage_contract_sha256":"174f4b38228d98107bee1639d1a297a2748bb618e87c7bd0a6c869c6ab06f8fa","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by high_value_home_support.","id":"high_value_home_support.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_high_value_support_copy","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"high_value_support_copies","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"high_value_support_copy_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_high_value_support_copy","household.high_value_support_copies","household.high_value_support_copy_index"]},"population":"high_value_home_support","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage regional_home_values.","id":"regional_home_values","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["high_value_support_copy_index","household_is_high_value_support_copy","household_source_id","region","tenure_type"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.regional_home_values@1","mass":"conserve","outputs":[{"column":"main_residence_value","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_wealth","dtype":"float64","entity":"household","ownership":"produced","rewrite":true,"rows":"all"},{"column":"main_residence_value_rank_basis","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"regional_home_values","stage_contract_sha256":"48e8a622c8830a54a4c48d9d8cb4f011751aa05d7cb5f6c7f0e06e1121b720b1","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage property_components.","id":"property_components","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["main_residence_value_rank_basis","non_residential_property_value","other_residential_property_value","region","subrent"],"entity":"household","rows":"all"},{"columns":["age","is_household_head","person_is_spi_income_recipient","person_support_channel"],"entity":"person","rows":"all"}],"kernel":"uk.stage.property_components@1","mass":"conserve","outputs":[{"column":"property_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_finance_costs","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"property_rental_income","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"property_components","stage_contract_sha256":"5022c27a480f057f8b8a4f87d9305ad00b1b9c724b225e37b02403b79b99f82e","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage property_purchases.","id":"property_purchases","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_source_id","non_residential_property_value","other_residential_property_value","region"],"entity":"household","rows":"all"},{"columns":["age","property_rental_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.property_purchases@1","mass":"conserve","outputs":[{"column":"additional_residential_property_purchased","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"non_residential_property_purchased","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"property_purchases","stage_contract_sha256":"7af04815a11c84990306ea0293606448cdce83bb57359fe3bb4ffbf592a39fb2","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage nts_bus_travel.","id":"nts_bus_travel","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.nts_bus_travel@1","mass":"conserve","outputs":[{"column":"local_bus_use_band","dtype":"int64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_in_london_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"other_local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_trips","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"bus_pass_eligible","dtype":"bool","entity":"person","ownership":"produced","rows":"all"},{"column":"local_bus_single_fare_share","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"household_local_bus_trips","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"nts_bus_travel","stage_contract_sha256":"e9496b5f8ed8e3b1e53f8d0ed8b05e2f681ab8bd107153fe6cfc18bda77d7684","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage lcfs_consumption.","id":"lcfs_consumption","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share"],"entity":"person","rows":"all"}],"kernel":"uk.stage.lcfs_consumption@1","mass":"conserve","outputs":[{"column":"food_and_non_alcoholic_beverages_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"alcohol_and_tobacco_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"clothing_and_footwear_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"housing_water_and_electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"household_furnishings_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"health_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"transport_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"communication_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"recreation_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"education_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"restaurants_and_hotels_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"miscellaneous_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"petrol_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"diesel_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_fare_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"domestic_energy_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"electricity_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"gas_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"liquid_fuel_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"solid_fuel_consumption","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"has_fuel_consumption","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"uses_energy_prepayment_meter","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"beer_litres","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"cider_litres","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"wine_litres","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"spirits_litres","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_fermented_litres","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"beer_draught_share","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"cider_draught_share","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"cigarettes_per_week","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"hand_rolling_tobacco_grams_per_week","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"cigars_grams_per_week","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"other_tobacco_grams_per_week","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"remote_gaming_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"pool_betting_net_receipts","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bingo_net_receipts","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"national_lottery_ticket_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"land_based_casino_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"machine_games_lower_rate_net_takings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"machine_games_standard_rate_net_takings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"machine_games_higher_rate_net_takings","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"land_based_fixed_odds_betting_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"remote_uk_horseracing_betting_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"remote_other_betting_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"betting_exchange_commission","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"horse_and_dog_pool_betting_net_losses","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"car_fuel_type","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"car_co2_emissions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"car_engine_size","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"car_first_registration_date","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"car_is_ved_exempt","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"lcfs_consumption","stage_contract_sha256":"383cdee98de70319226167ecce47ce037c165ab650a307420017410f6f9395d4","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_vat.","id":"etb_vat","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_vat@1","mass":"conserve","outputs":[{"column":"full_rate_vat_expenditure_rate","dtype":"float64","entity":"household","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_vat","stage_contract_sha256":"216b28835eba7a952243134dffbb45a1b3a0cdff2e3e7d0e94e2acbf754052b5","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage etb_services.","id":"etb_services","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt"],"entity":"person","rows":"all"}],"kernel":"uk.stage.etb_services@1","mass":"conserve","outputs":[{"column":"dfe_education_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"bus_subsidy_spending","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"rail_usage","dtype":"float64","entity":"household","ownership":"produced","rows":"all"},{"column":"a_and_e_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"admitted_patient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"outpatient_visits","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_a_and_e_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_admitted_patient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"nhs_outpatient_spending","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"etb_services","stage_contract_sha256":"f072ed46fa47e369135fec63bb272fb3c928cec9eec094abcd1780187f561111","time_period":"2024"},"population":"high_value_home_support","sources":["frs"],"structural":"none","weights":null},{"base":"high_value_home_support","citation":"","description":"Ownership boundary before uc_reporter_redraw rewrites.","id":"uc_reporter_redraw.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_reporter_redraw.","id":"uc_reporter_redraw","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_reporter_redraw@1","mass":"conserve","outputs":[{"column":"universal_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_reporter_redraw","stage_contract_sha256":"1b8f99bd8bc50e3e5dacbb63b75e6b8da0c42c1c8c508c492d078e08ddab0e66","time_period":"2024"},"population":"uc_reporter_redraw.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"uc_reporter_redraw.boundary","citation":"","description":"Ownership boundary before spi_benefit_coherence rewrites.","id":"spi_benefit_coherence.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage spi_benefit_coherence.","id":"spi_benefit_coherence","inputs":[{"columns":["benunit_support_channel","frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_source_id","region"],"entity":"household","rows":"all"},{"columns":["aa_category","age","attendance_allowance_reported","dla_m_category","dla_m_reported","dla_sc_category","dla_sc_reported","employment_income","hours_worked","incapacity_benefit_reported","is_uc_claimant","person_source_id","person_support_channel","pip_dl_category","pip_dl_reported","pip_m_category","pip_m_reported","private_pension_income","self_employment_income","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.spi_benefit_coherence@1","mass":"conserve","outputs":[{"column":"jsa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_income_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"income_support_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"working_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_tax_credit_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"sda_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"ssmg_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"iidb_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"afcs_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"bsp_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"war_widows_pension_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"widowed_parents_allowance_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"jsa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"esa_contrib_reported","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_enhanced_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"is_severely_disabled_for_benefits","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"receives_benefits_in_own_right","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"spi_benefit_coherence","stage_contract_sha256":"2c0162b22d5fcab2296f654177c9f87710184c20fb323cff25710ee0667fcdef","time_period":"2024"},"population":"spi_benefit_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"spi_benefit_coherence.boundary","citation":"","description":"Ownership boundary before uc_capital_coherence rewrites.","id":"uc_capital_coherence.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_capital_coherence.","id":"uc_capital_coherence","inputs":[{"columns":["benunit_support_channel","dependent_children","is_married"],"entity":"benunit","rows":"all"},{"columns":["non_residential_property_secured_debt","non_residential_property_value","other_residential_property_secured_debt","other_residential_property_value","owned_land","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","individual_savings_account_interest_income","is_benunit_head","is_household_head","is_parent","other_investment_income","person_support_channel","savings_interest_income","universal_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_capital_coherence@1","mass":"conserve","outputs":[{"column":"uc_reported_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"pension_credit_reported_capital","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"frs_benunit_capital","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_capital_coherence","stage_contract_sha256":"67478de55540a138448d9da387a64e5e2afbb17caf17b244bc3baaa34de56022","time_period":"2024"},"population":"uc_capital_coherence.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"uc_capital_coherence.boundary","citation":"","description":"Ownership boundary before uc_take_up rewrites.","id":"uc_take_up.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_take_up.","id":"uc_take_up","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_uc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_take_up","stage_contract_sha256":"1f5bb5a59426d5a1f0a8ba40180b744725be29dea741a4e93924f4f55e9a7e11","time_period":"2024"},"population":"uc_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_legacy_closure_take_up.","id":"uc_legacy_closure_take_up","inputs":[{"columns":["frs_benunit_capital","would_claim_uc"],"entity":"benunit","rows":"all"},{"columns":["household_source_id","region"],"entity":"household","rows":"all"},{"columns":["age","child_tax_credit_reported","esa_income_reported","housing_benefit_reported","income_support_reported","is_claimant_or_partner","jsa_income_reported","universal_credit_reported","working_tax_credit_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_legacy_closure_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_uc_at_legacy_closure","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_legacy_closure_take_up","stage_contract_sha256":"bd7d87d11fb5271cd5a3e26a0268f2eaacb155fa87a9f4a8f00a6418b6da6b5c","time_period":"2024"},"population":"uc_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"uc_take_up.boundary","citation":"","description":"Ownership boundary before pension_credit_take_up rewrites.","id":"pension_credit_take_up.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage pension_credit_take_up.","id":"pension_credit_take_up","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.pension_credit_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_pc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"has_mixed_age_couple_pension_credit_saving","dtype":"bool","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"pension_credit_take_up","stage_contract_sha256":"e887dbbb186cb79f6d3fc9a629269dbac4a43381b9574df65353b816f01a3a35","time_period":"2024"},"population":"pension_credit_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"pension_credit_take_up.boundary","citation":"","description":"Ownership boundary before child_benefit_take_up rewrites.","id":"child_benefit_take_up.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage child_benefit_take_up.","id":"child_benefit_take_up","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.child_benefit_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_child_benefit","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"child_benefit_opts_out","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"child_benefit_take_up","stage_contract_sha256":"c99071c19d0184440163f7ab49ee33cc19ad0ad4e2f6462ed50c36917b0da364","time_period":"2024"},"population":"child_benefit_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage uc_deduction_attributes.","id":"uc_deduction_attributes","inputs":[{"columns":["child_benefit_opts_out","frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age"],"entity":"person","rows":"all"}],"kernel":"uk.stage.uc_deduction_attributes@1","mass":"conserve","outputs":[{"column":"uc_deduction_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_type_random_draw","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_latent_deduction_rate","dtype":"float64","entity":"benunit","ownership":"produced","rows":"all"},{"column":"uc_deduction_combination","dtype":"string","entity":"benunit","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"uc_deduction_attributes","stage_contract_sha256":"6bc7e3ec1a5712e23ca1b7d2956e8b17f2526b94431ba3e5a9294b04658e4fe0","time_period":"2024"},"population":"child_benefit_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"child_benefit_take_up.boundary","citation":"","description":"Run structural UK stage cgt_support_split.","id":"cgt_support_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_support_split@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_cgt_support_copy","bool"],["household","cgt_support_copies","int64"],["household","cgt_support_copy_index","int64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_support_split","stage_contract_sha256":"88a0f5974de73dc778a782c9ce6e5f811e9d17e9eb86a30207bc9276134e53af","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_support_split.","id":"cgt_support_split.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_cgt_support_copy","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copies","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_support_copy_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_cgt_support_copy","household.cgt_support_copies","household.cgt_support_copy_index"]},"population":"cgt_support_split","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"cgt_support_split","citation":"","description":"Run structural UK stage cgt_incidence_clone.","id":"cgt_incidence_clone","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_clone@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_capital_gains_clone","bool"],["person","capital_gains","float64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_clone","stage_contract_sha256":"29198953c5522c9b996b981478909916870977a79e9f2feb2db7e9e72ef15de8","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_incidence_clone.","id":"cgt_incidence_clone.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_capital_gains_clone","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_capital_gains_clone","person.capital_gains"]},"population":"cgt_incidence_clone","sources":[],"structural":"none","weights":null},{"base":"cgt_incidence_clone","citation":"","description":"Ownership boundary before hmrc_cgt_gains_spine rewrites.","id":"hmrc_cgt_gains_spine.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_gains_spine.","id":"hmrc_cgt_gains_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["cgt_support_copies","corporate_wealth","gross_financial_wealth","household_is_cgt_support_copy","non_residential_property_value","other_residential_property_value","region"],"entity":"household","rows":"all"},{"columns":["age","dividend_income","employment_income","individual_savings_account_interest_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_gains_spine@1","mass":"conserve","outputs":[{"column":"capital_gains","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_gains_spine","stage_contract_sha256":"b5d27d6b6307acec73a9336a00ef3e4cd900164787362e1157a49ffaa8af50ef","time_period":"2024"},"population":"hmrc_cgt_gains_spine.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"hmrc_cgt_gains_spine.boundary","citation":"","description":"Run structural UK stage cgt_incidence_anchor.","id":"cgt_incidence_anchor","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_is_capital_gains_clone","region"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","dividend_income","employment_income","individual_savings_account_interest_income","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_incidence_anchor@1","mass":"conserve","outputs":[],"params":{"expand_cells":[],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_incidence_anchor","stage_contract_sha256":"ed54c55428e56d7597c57c8459b014aa43b2ff9495b903f0b789bd5e4264ca9a","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":"cgt_incidence_anchor","citation":"","description":"Run structural UK stage cgt_residential_split.","id":"cgt_residential_split","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains"],"entity":"person","rows":"all"}],"kernel":"uk.stage.expand.cgt_residential_split@1","mass":"conserve","outputs":[],"params":{"expand_cells":[["household","household_is_cgt_residential_clone","bool"],["household","cgt_residential_clone_index","int64"],["person","cgt_residential_probability","float64"],["person","capital_gains_residential_property","float64"]],"expand_weight_entity":"household","expand_weight_kind":"importance","numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"cgt_residential_split","stage_contract_sha256":"57d73fd1e8673d747fed04bb73b3eb1a8b215f73b7d24dd5b191b10ecf1e505f","time_period":"2024"},"population":null,"sources":["frs"],"structural":"expand","weights":null},{"base":null,"citation":"","description":"Own the cells materialized by cgt_residential_split.","id":"cgt_residential_split.owned","inputs":[],"kernel":"uk.claim@1","mass":"conserve","outputs":[{"column":"household_is_cgt_residential_clone","dtype":"bool","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_residential_clone_index","dtype":"int64","entity":"household","ownership":"produced","rows":"all"},{"column":"cgt_residential_probability","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_residential_property","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"materialized_expand_outputs":["household.household_is_cgt_residential_clone","household.cgt_residential_clone_index","person.cgt_residential_probability","person.capital_gains_residential_property"]},"population":"cgt_residential_split","sources":[],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage hmrc_cgt_asset_type_spine.","id":"hmrc_cgt_asset_type_spine","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["corporate_wealth","gross_financial_wealth","other_residential_property_value","region","stocks_and_shares_isa"],"entity":"household","rows":"all"},{"columns":["age","capital_gains","capital_gains_residential_property","dividend_income","property_income","reports_rent_from_other_property","self_employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.hmrc_cgt_asset_type_spine@1","mass":"conserve","outputs":[{"column":"capital_gains_asset_type","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"capital_gains_badr","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"hmrc_cgt_asset_type_spine","stage_contract_sha256":"722e19b00e13d98ce9fde4069ef6ebf3e30ed9143871bec788992a36b94b5e85","time_period":"2024"},"population":"cgt_residential_split","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage salary_sacrifice.","id":"salary_sacrifice","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr"],"entity":"person","rows":"all"}],"kernel":"uk.stage.salary_sacrifice@1","mass":"conserve","outputs":[{"column":"pension_contributions_via_salary_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"pension_contributions_via_bonus_sacrifice","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"employee_pension_contributions","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"employment_income","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"},{"column":"salary_sacrifice_pre_conversion_pay","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"salary_sacrifice","stage_contract_sha256":"fa736918c6d5d2f3a88843b562a3d3073c86882be3a48e86e4d99f1f9a098e6b","time_period":"2024"},"population":"cgt_residential_split","sources":["frs"],"structural":"none","weights":null},{"base":"cgt_residential_split","citation":"","description":"Ownership boundary before carers_allowance_take_up rewrites.","id":"carers_allowance_take_up.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage carers_allowance_take_up.","id":"carers_allowance_take_up","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay"],"entity":"person","rows":"all"}],"kernel":"uk.stage.carers_allowance_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_carers_allowance","dtype":"bool","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"carers_allowance_take_up","stage_contract_sha256":"7cf2cf79bd0f9a92f2a334081a35c8bfe24a0b841131fb9a8b8aceee6caf2dba","time_period":"2024"},"population":"carers_allowance_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"carers_allowance_take_up.boundary","citation":"","description":"Ownership boundary before student_loans rewrites.","id":"student_loans.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage student_loans.","id":"student_loans","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["region"],"entity":"household","rows":"all"},{"columns":["age","age_left_full_time_education","current_education","highest_education","reports_outstanding_student_loan","student_loan_repayments","student_loans","would_claim_carers_allowance"],"entity":"person","rows":"all"}],"kernel":"uk.stage.student_loans@1","mass":"conserve","outputs":[{"column":"student_loan_plan","dtype":"string","entity":"person","ownership":"produced","rows":"all"},{"column":"student_loan_balance","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"student_loans","stage_contract_sha256":"507ca0160144d8f5ea1b2483b812658ee8b49854e2388d50a8c59ca58f2ca9ee","time_period":"2024"},"population":"student_loans.boundary","sources":["frs"],"structural":"none","weights":null},{"base":"student_loans.boundary","citation":"","description":"Ownership boundary before childcare_copy_take_up rewrites.","id":"childcare_copy_take_up.boundary","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay","student_loan_plan"],"entity":"person","rows":"all"}],"kernel":"uk.identity@1","mass":"conserve","outputs":[],"params":{},"population":null,"sources":[],"structural":"filter","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage childcare_copy_take_up.","id":"childcare_copy_take_up","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_uc_childcare","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay","student_loan_plan"],"entity":"person","rows":"all"}],"kernel":"uk.stage.childcare_copy_take_up@1","mass":"conserve","outputs":[{"column":"would_claim_tfc","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_extended_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_universal_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"would_claim_targeted_childcare","dtype":"bool","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"maximum_extended_childcare_hours_usage","dtype":"float64","entity":"benunit","ownership":"produced","rewrite":true,"rows":"all"},{"column":"max_free_entitlement_hours_used","dtype":"float64","entity":"person","ownership":"produced","rewrite":true,"rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"childcare_copy_take_up","stage_contract_sha256":"cdbb7e135b16fac7ca1bcd6c54222821e2976b4da99f10a60913efd0ba03c13c","time_period":"2024"},"population":"childcare_copy_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage private_school_attendance.","id":"private_school_attendance","inputs":[{"columns":["frs_benunit_capital","is_married","dependent_children","liable_for_share_of_household_rent","would_claim_child_benefit","child_benefit_opts_out","would_claim_pc","would_claim_uc","would_claim_tfc","would_claim_extended_childcare","would_claim_universal_childcare","would_claim_targeted_childcare","would_claim_uc_childcare","maximum_extended_childcare_hours_usage","benunit_source_id","benunit_support_channel","benunit_support_clone_index","uc_reported_capital","pension_credit_reported_capital","would_claim_uc_at_legacy_closure","has_mixed_age_couple_pension_credit_saving","uc_deduction_random_draw","uc_deduction_type_random_draw","uc_latent_deduction_rate","uc_deduction_combination"],"entity":"benunit","rows":"all"},{"columns":["region","tenure_type","accommodation_type","num_bedrooms","council_tax_reported","council_tax_band","council_tax_rebate","council_tax_single_adult_raw","water_and_sewerage_charges","domestic_rates","rent","subrent","mortgage_interest_repayment","mortgage_capital_repayment","structural_insurance_payments","housing_service_charges","external_child_payments","ons_household_type","council_tax","household_owns_tv","would_evade_tv_licence_fee","main_residential_property_purchased_is_first_home","property_purchased","brma","source_household_id","source_year","source_household_key","household_source_id","household_support_channel","household_support_clone_index","household_is_spi_synthetic","household_is_spi_income_band_donor","spi_income_band_donor_lower_bound","owned_land","property_wealth","corporate_wealth","private_pension_wealth","gross_financial_wealth","net_financial_wealth","main_residence_value","other_residential_property_value","non_residential_property_value","savings","num_vehicles","cash_isa","stocks_and_shares_isa","mortgage_debt","consumer_debt","directly_held_shares","unit_and_investment_trusts","other_residential_property_secured_debt","non_residential_property_secured_debt","household_lifetime_isa_balance","household_is_high_value_support_copy","high_value_support_copies","high_value_support_copy_index","main_residence_value_rank_basis","additional_residential_property_purchased","non_residential_property_purchased","household_local_bus_trips","food_and_non_alcoholic_beverages_consumption","alcohol_and_tobacco_consumption","clothing_and_footwear_consumption","housing_water_and_electricity_consumption","household_furnishings_consumption","health_consumption","transport_consumption","communication_consumption","recreation_consumption","education_consumption","restaurants_and_hotels_consumption","miscellaneous_consumption","petrol_spending","diesel_spending","bus_fare_spending","domestic_energy_consumption","electricity_consumption","gas_consumption","liquid_fuel_consumption","solid_fuel_consumption","has_fuel_consumption","uses_energy_prepayment_meter","beer_litres","cider_litres","wine_litres","spirits_litres","other_fermented_litres","beer_draught_share","cider_draught_share","cigarettes_per_week","hand_rolling_tobacco_grams_per_week","cigars_grams_per_week","other_tobacco_grams_per_week","remote_gaming_net_losses","pool_betting_net_receipts","bingo_net_receipts","national_lottery_ticket_spending","land_based_casino_net_losses","machine_games_lower_rate_net_takings","machine_games_standard_rate_net_takings","machine_games_higher_rate_net_takings","land_based_fixed_odds_betting_net_losses","remote_uk_horseracing_betting_net_losses","remote_other_betting_net_losses","betting_exchange_commission","horse_and_dog_pool_betting_net_losses","full_rate_vat_expenditure_rate","dfe_education_spending","rail_subsidy_spending","bus_subsidy_spending","rail_usage","household_is_cgt_support_copy","cgt_support_copies","cgt_support_copy_index","household_is_capital_gains_clone","household_is_cgt_residential_clone","cgt_residential_clone_index"],"entity":"household","rows":"all"},{"columns":["age","gender","months_since_last_birthday","marital_status","hours_worked","care_hours","frs_care_hours_in_household","is_household_head","is_benunit_head","is_parent","is_blind","is_uc_claimant","is_claimant_or_partner","is_hbai_dependent_child","uc_is_in_startup_period","uc_is_in_gainful_self_employment","rent_paid_as_boarder","rent_paid_as_lodger","employment_income","self_employment_income","trading_loss","loss_relief","ni_class_4_losses_brought_forward","private_pension_income","annuity_and_trust_income","individual_savings_account_interest_income","savings_interest_income","dividend_income","other_investment_income","stands_as_sole_owner_or_partner_of_company","is_engaged_in_owned_company_trade","owned_company_is_main_employment","owned_company_carries_on_trade","owned_company_carries_on_property_business","owned_company_income_share","property_income","reports_rent_from_other_property","maintenance_income","spousal_maintenance_income","miscellaneous_income","private_transfer_income","lump_sum_income","student_loan_repayments","statutory_sick_pay","statutory_maternity_pay","statutory_paternity_pay","student_loans","access_fund","education_grants","healthy_start_vouchers","free_school_breakfasts","free_school_fruit_veg","free_school_meals","council_tax_benefit_reported","maintenance_expenses","childcare_expenses","personal_pension_contributions","employee_pension_contributions","pension_contributions_via_salary_sacrifice","salary_sacrifice_reported","salary_sacrifice_asked","frs_bonus_amount","frs_company_car_price_band","frs_company_car_fuel_code","frs_company_car_private_fuel","frs_company_car_contribution","child_benefit_reported","income_support_reported","housing_benefit_reported","attendance_allowance_reported","dla_sc_reported","dla_m_reported","iidb_reported","carers_allowance_reported","would_claim_carers_allowance","sda_reported","afcs_reported","ssmg_reported","pension_credit_reported","child_tax_credit_reported","working_tax_credit_reported","state_pension_reported","winter_fuel_allowance_reported","incapacity_benefit_reported","universal_credit_reported","pip_m_reported","pip_dl_reported","jsa_contrib_reported","jsa_income_reported","esa_contrib_reported","esa_income_reported","esa_includes_support_component","bsp_reported","war_widows_pension_reported","widowed_parents_allowance_reported","relationship_to_head","ons_family_role","ons_family_index","is_looked_after_by_local_authority","child_limit_non_parental_caring_exception","employment_status","employment_sector","sic_industry_division","aa_category","dla_sc_category","dla_m_category","pip_m_category","pip_dl_category","is_disabled_for_benefits","is_enhanced_disabled_for_benefits","is_severely_disabled_for_benefits","current_education","highest_education","is_in_non_advanced_education","is_in_approved_training","age_started_or_accepted_current_education_or_training","is_before_universal_credit_qualifying_young_person_terminal_date","adult_ema","child_ema","receives_benefits_in_own_right","reports_outstanding_student_loan","age_left_full_time_education","legacy_jobseeker_proxy","esa_health_condition_proxy","esa_support_group_proxy","disabled_students_allowance_eligible_expenses","max_free_entitlement_hours_used","would_claim_marriage_allowance","would_claim_scp","attends_private_school_random_draw","tax_free_childcare_spend_routed_share","is_apprentice","hmrc_spi_pay","hmrc_spi_unemployment_benefit_income","hmrc_spi_incapacity_benefit_income","ossben_identifiable_subset","srp_regular_code5","employer_pension_contributions","employment_income_annual_share","employment_income_other_spells","self_employment_income_annual_share","self_employment_income_other_spells","private_pension_income_annual_share","contributory_benefits_annual_share","person_source_id","person_support_channel","person_support_clone_index","person_is_spi_income_band_carrier","charitable_investment_gifts","gift_aid","hmrc_spi_employment_benefits","hmrc_spi_employment_expenses","hmrc_spi_other_social_security_income","hmrc_spi_taxable_termination_pay","hmrc_spi_miscellaneous_employment_income","hmrc_spi_other_income","hmrc_spi_state_pension_income","property_finance_costs","hmrc_spi_employed_income","hmrc_spi_total_earned_income","hmrc_spi_total_investment_income","hmrc_spi_assessable_income","person_is_spi_income_recipient","company_car_list_price","company_car_co2_emissions","company_car_fuel_type","company_car_electric_range","company_car_capital_contributions","company_car_private_fuel_provided","student_loan_balance","has_lifetime_isa","lifetime_isa_balance","property_rental_income","local_bus_use_band","bus_in_london_trips","other_local_bus_trips","local_bus_trips","bus_pass_eligible","local_bus_single_fare_share","car_fuel_type","car_co2_emissions","car_engine_size","car_first_registration_date","car_is_ved_exempt","a_and_e_visits","admitted_patient_visits","outpatient_visits","nhs_a_and_e_spending","nhs_admitted_patient_spending","nhs_outpatient_spending","capital_gains","cgt_residential_probability","capital_gains_residential_property","capital_gains_asset_type","capital_gains_badr","pension_contributions_via_bonus_sacrifice","salary_sacrifice_pre_conversion_pay","student_loan_plan"],"entity":"person","rows":"all"}],"kernel":"uk.stage.private_school_attendance@1","mass":"conserve","outputs":[{"column":"attends_private_school","dtype":"bool","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"private_school_attendance","stage_contract_sha256":"7e44379c0331fe4c9de05cd76a075c1a6aa22cf0dec6cd2f91b277e70f14a038","time_period":"2024"},"population":"childcare_copy_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage isa_subscriptions.","id":"isa_subscriptions","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["cash_isa","region","stocks_and_shares_isa"],"entity":"household","rows":"all"},{"columns":["age","attends_private_school","dividend_income","employment_income","gender","has_lifetime_isa","individual_savings_account_interest_income","lifetime_isa_balance","loss_relief","miscellaneous_income","private_pension_income","property_income","savings_interest_income","self_employment_income","state_pension_reported"],"entity":"person","rows":"all"}],"kernel":"uk.stage.isa_subscriptions@1","mass":"conserve","outputs":[{"column":"cash_isa_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"stocks_and_shares_isa_balance","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"cash_isa_subscriptions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"stocks_and_shares_isa_subscriptions","dtype":"float64","entity":"person","ownership":"produced","rows":"all"},{"column":"lifetime_isa_payments","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"isa_subscriptions","stage_contract_sha256":"9fc3e3ecf333df38206c9627470ca0c1a9d8abbea7534f6367e01868fdc3081f","time_period":"2024"},"population":"childcare_copy_take_up.boundary","sources":["frs"],"structural":"none","weights":null},{"artifact_outputs":[{"name":"stage_evidence","type":{"name":"microcosm.stage-evidence","schema_version":1}}],"base":null,"citation":"","description":"Run UK spine stage trading_allowance_receipts.","id":"trading_allowance_receipts","inputs":[{"columns":["frs_benunit_capital"],"entity":"benunit","rows":"all"},{"columns":["household_source_id","region"],"entity":"household","rows":"all"},{"columns":["age","lifetime_isa_payments","self_employment_income"],"entity":"person","rows":"all"}],"kernel":"uk.stage.trading_allowance_receipts@1","mass":"conserve","outputs":[{"column":"self_employment_gross_receipts","dtype":"float64","entity":"person","ownership":"produced","rows":"all"}],"params":{"numerical_dependencies":[["policyengine-uk","2.165.1"],["policyengine-core","3.33.3"],["numpy","2.4.6"],["pandas","3.0.3"],["scikit-learn","1.8.0"],["quantile-forest","1.4.2"]],"stage":"trading_allowance_receipts","stage_contract_sha256":"f91329806570bd874750845816de96b28160e766e8e26bf1174cb0809ad8ff43","time_period":"2024"},"population":"childcare_copy_take_up.boundary","sources":["frs"],"structural":"none","weights":null}],"sources":[{"codec":"csv-tables","description":"Content-bound UK FRS and donor fixture/source bundle.","name":"frs"}]} diff --git a/test_support/microcosm_build/uk_spi_income.py b/test_support/microcosm_build/uk_spi_income.py index 06745445c8..b0fdaf28eb 100644 --- a/test_support/microcosm_build/uk_spi_income.py +++ b/test_support/microcosm_build/uk_spi_income.py @@ -57,9 +57,19 @@ class _FakeFittedQRF: - def __init__(self, targets: tuple[str, ...], weight_kind: str) -> None: + def __init__( + self, + targets: tuple[str, ...], + weight_kind: str, + gate_calibration: str = "in_sample", + ) -> None: self.targets = targets self.weight_kind = weight_kind + self.gate_calibration = gate_calibration + + def gate_outcomes(self) -> dict[str, str | None]: + outcome = None if self.gate_calibration == "in_sample" else "cross_fitted" + return dict.fromkeys(self.targets, outcome) def regimes(self) -> dict[str, str]: return dict.fromkeys(self.targets, "zero_inflated_positive") @@ -132,10 +142,15 @@ def predict(self, predictors: pd.DataFrame) -> pd.DataFrame: class _FakeQRF: fit_weight_kinds: list[str] = [] fit_weight_values: list[np.ndarray] = [] + #: Each fit's weight kind, gate calibration and fold groups, in fit order. + fit_gates: list[tuple[str, str, np.ndarray | None]] = [] - def __init__(self, *, n_estimators: int, seed: int) -> None: + def __init__( + self, *, n_estimators: int, seed: int, gate_calibration: str = "in_sample" + ) -> None: assert n_estimators > 0 assert seed >= 0 + self.gate_calibration = gate_calibration def fit( self, @@ -144,14 +159,19 @@ def fit( targets: list[str], *, weights: str, + groups: np.ndarray | None = None, ) -> _FakeFittedQRF: assert predictors resolved = frame.resolve_weights("person") assert resolved.kind.value == weights assert (resolved.values > 0).all() + assert groups is None or len(groups) == len(resolved.values) self.fit_weight_kinds.append(resolved.kind.value) self.fit_weight_values.append(resolved.values.copy()) - return _FakeFittedQRF(tuple(targets), resolved.kind.value) + self.fit_gates.append((resolved.kind.value, self.gate_calibration, groups)) + return _FakeFittedQRF( + tuple(targets), resolved.kind.value, self.gate_calibration + ) def _dead_support( diff --git a/test_support/microcosm_build/uk_uc_reporter_redraw.py b/test_support/microcosm_build/uk_uc_reporter_redraw.py index f561b7f2b4..fcee2f0523 100644 --- a/test_support/microcosm_build/uk_uc_reporter_redraw.py +++ b/test_support/microcosm_build/uk_uc_reporter_redraw.py @@ -76,6 +76,9 @@ class _StubFittedQRF: def __init__(self, record: dict[str, object]) -> None: self.record = record + def gate_outcomes(self) -> dict[str, str]: + return {"universal_credit_reported_amount": "cross_fitted"} + def predict_from_uniforms( self, table: pd.DataFrame, *, quantiles, sign_uniforms ) -> pd.DataFrame: @@ -91,11 +94,15 @@ def predict_from_uniforms( class _StubQRF: - def __init__(self, record: dict[str, object], *, seed: int) -> None: + def __init__( + self, record: dict[str, object], *, seed: int, gate_calibration: str + ) -> None: record["seed"] = seed + record["gate_calibration"] = gate_calibration self.record = record - def fit(self, table, predictors, targets, *, weights): + def fit(self, table, predictors, targets, *, weights, groups): + self.record["fit_groups"] = np.asarray(groups).copy() self.record["fit_table"] = table.copy() self.record["fit_index"] = table.index.tolist() self.record["fit_predictors"] = list(predictors) @@ -108,8 +115,8 @@ class _StubQRFFactory: def __init__(self) -> None: self.record: dict[str, object] = {} - def __call__(self, *, seed: int): - return _StubQRF(self.record, seed=seed) + def __call__(self, *, seed: int, gate_calibration: str): + return _StubQRF(self.record, seed=seed, gate_calibration=gate_calibration) def _frame(*, child_only: bool = False):