Enhance SSN undocumented type imputation #264
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #246
Implement ASEC Undocumented Algorithm (paper)
Algorithm Logic: Process of Elimination
Target Implementation
Modify the existing
add_ssn_card_type()function to apply these conditions before the random refinement step, ensuring that people meeting any of these conditions are assigned to code 3 ("OTHER_NON_CITIZEN") rather than potentially remaining as code 0 ("NONE"/undocumented).The 14 Conditions
Condition 1: Pre-1982 Arrivals
PEINUSYRcodes 1-7 (Before 1950 through 1980-1981)Condition 2: Eligible Naturalized Citizens
PRCITSHP == 4,A_AGE >= 18,PEINUSYR(for years in US),A_MARITL,A_SPOUSECondition 3: Medicare Recipients
MCARE == 1Condition 4: Federal Retirement Benefits
PEN_SC1 == 3ORPEN_SC2 == 3(Federal government pension)Condition 5: Social Security Disability
RESNSS1 == 2ORRESNSS2 == 2(disabled adult or child)Condition 6: Indian Health Service Coverage
IHSFLG == 1Condition 7: Medicaid Recipients (State-specific adjustments needed)
CAID == 1,GESTFIPS(for state-specific rules)Condition 8: CHAMPVA Recipients
CHAMPVA == 1Condition 9: Military Health Insurance
MIL == 1Condition 10: Government Employees
PEIO1COWcodes 1-3 (federal/state/local gov) ORA_MJOCC == 11(military)Condition 11: Social Security Recipients
SS_YN == 1Condition 12: Housing Assistance (State-specific adjustments needed)
HPUBLIC == 1ORHLORENT == 1,GESTFIPSCondition 13: Veterans/Military Personnel
PEAFEVER == 1ORA_MJOCC == 11Condition 14: SSI Recipients
SSI_YN == 1,RESNSSI1/RESNSSI2(to verify recipient)Additional Steps
Family Correlation Adjustment (80%)
Random Refinement (30%)