Skip to content

Fix the inverted EDUCQUAL to highest_education mapping - #460

Open
juaristi22 wants to merge 2 commits into
mainfrom
fix/educqual-inversion
Open

Fix the inverted EDUCQUAL to highest_education mapping#460
juaristi22 wants to merge 2 commits into
mainfrom
fix/educqual-inversion

Conversation

@juaristi22

Copy link
Copy Markdown
Collaborator

Fixes #459.

The EDUCQUAL_MAP read the FRS highest-qualification codeframe upside down: code 1 was mapped to NOT_COMPLETED_PRIMARY and codes 17–21 to TERTIARY, but the frame starts at 1 = Doctorate and descends. highest_education feeds live model logic (maintenance loan system assignment, DSA course eligibility, student loan plan assignment).

This cherry-picks the existing correction from feat/impute-below-threshold-borrowers (8f95629, authorship preserved) onto main, now verified two independent ways:

  • The official data dictionary: FRS 2023-24, UK Data Service SN 9367, DOI 10.5255/UKDA-SN-9367-2, adult table — every label in the corrected map matches verbatim (1 = Doctorate or MPhil, 17 = A-Level or equivalent, 18/19 = Welsh/Scottish Baccalaureate, 36–49 the GCSE band, 83–85 entry level). Code 87, carried by ~13% of adults, has no value label in the dictionary and falls to the UPPER_SECONDARY default.
  • Disclosure-safe aggregates from the 2023-24 tab (28,590 adults): code 1 is 1.8% of adults with the highest mean weekly earnings (~£744); codes 18/19 have fewer than 10 respondents each; the GCSE band carries the population mass. Under the inverted map the weighted TERTIARY share came out near 10%; the corrected frame gives ~28%.

Under the corrected map the weighted highest_education composition of the base FRS moves from {TERTIARY 9.9%, POST_SECONDARY 21.3%} to {TERTIARY 28.1%, POST_SECONDARY 8.4%} — expect downstream shifts in student-support and education-conditioned outputs on the next data build.

The microcosm migration adopted the same corrected frame as a signed difference in PolicyEngine/microcosm#703, so landing this keeps the two pipelines aligned.

Test suite: 484 passed, 107 skipped (licensed-data tests skip without staged inputs), no failures.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EDUCQUAL mapping is inverted against the current FRS codeframe

2 participants