The EDUCQUAL_MAP in datasets/frs.py reads the FRS highest-qualification codeframe upside down: it assigns code 1 to NOT_COMPLETED_PRIMARY and codes 17–21 to TERTIARY, but recent FRS EDUCQUAL is the harmonised frame that starts at 1 = Doctorate and descends. highest_education feeds live model logic (maintenance loan system assignment, DSA course eligibility, student loan plan assignment), so this ships in production today.
Disclosure-safe evidence from the FRS 2023-24 adult tab (28,590 adults; aggregates only):
- code 1: 1.8% of adults, the highest mean weekly earnings of any code (~£744) — consistent with Doctorate/MPhil, absurd for "not completed primary"
- code 2: 10.4% at ~£643 (Masters/postgrad); code 3: 20.7% at ~£559 (first degree)
- codes 18/19 (mapped TERTIARY today): fewer than 10 respondents each — they are the Welsh/Scottish Baccalaureate niche codes, not "second/higher degree"
- the GCSE band (36–82 in the current frame) carries the population mass the inverted map displaces; code 66 (O-level, fewer than 5) is 3.6% at ~£157
Under the current map the weighted TERTIARY share of persons comes out around 10%, implausible for the UK (~28% under the corrected frame).
An unmerged fix with the corrected labels already exists on feat/impute-below-threshold-borrowers (8f95629, "Fix EDUCQUAL mapping - codes were inverted"); the evidence above independently confirms it against the 2023-24 tabs. The microcosm migration has adopted the corrected frame as a signed difference in PolicyEngine/microcosm#703 (workstream E3), so landing the fix here keeps the two pipelines aligned.
🤖 Generated with Claude Code
The
EDUCQUAL_MAPindatasets/frs.pyreads the FRS highest-qualification codeframe upside down: it assigns code 1 to NOT_COMPLETED_PRIMARY and codes 17–21 to TERTIARY, but recent FRS EDUCQUAL is the harmonised frame that starts at 1 = Doctorate and descends.highest_educationfeeds live model logic (maintenance loan system assignment, DSA course eligibility, student loan plan assignment), so this ships in production today.Disclosure-safe evidence from the FRS 2023-24 adult tab (28,590 adults; aggregates only):
Under the current map the weighted TERTIARY share of persons comes out around 10%, implausible for the UK (~28% under the corrected frame).
An unmerged fix with the corrected labels already exists on
feat/impute-below-threshold-borrowers(8f95629, "Fix EDUCQUAL mapping - codes were inverted"); the evidence above independently confirms it against the 2023-24 tabs. The microcosm migration has adopted the corrected frame as a signed difference in PolicyEngine/microcosm#703 (workstream E3), so landing the fix here keeps the two pipelines aligned.🤖 Generated with Claude Code