Unmet Mental Health Need and Employment Outcomes

Unmet Mental Health Need and Employment Outcomes

Darren Littlejohn – Project Showcase

Unmet Mental Health Need and Employment Outcomes

Mini SQL Project | Data Sources: NSDUH (2019–2023) and TEDS-A (2019–2022)


Project Overview

Summary

This SQL-based mini study combines NSDUH population survey data with TEDS-A treatment admissions data to explore how unmet or untreated mental health needs relate to workforce detachment. The analysis demonstrates ETL workflow clarity, SQL analytic structure, and workforce policy relevance through hypothesis-driven modeling across multiple federal datasets.


Project Rationale

This project builds on a long-standing engagement with mental health, informed by professional experience in treatment settings, formal training in psychology, and previously published work with a major publisher (Atria / Beyond Words, 2009/2018) on addiction and mental health. Subsequent publications included a non-fiction public health book based on an academic literature review of neurophysiology and addiction.

With a transition into data analytics and a growing focus on the healthcare vertical, the need was obvious to revisit these datasets from a new perspective—one that integrates domain knowledge with modern analytical tooling. The guiding objective was to identify a question that is both substantively meaningful and analytically strong enough to showcase technical skill.


Why It Matters

  • Workforce mental health loss is measurable through unmet need and co-occurring disorder prevalence across systems
  • Quantifying this link supports economic policy, treatment funding, and workforce retention strategies
  • Establishing reproducible SQL and ETL workflows provides a transparent foundation for integrated behavioral health analytics

Phase 1 — NSDUH 2019 (Analysis Presented)

Primary Hypothesis (NSDUH)

Adults reporting unmet need for mental health treatment have higher odds of being unemployed or out of the labor force than adults without unmet need, controlling for age, sex, race/ethnicity, and education.

Operationalization (NSDUH):

  • Exposure: AMHTXND2 = 1
  • Outcome: IRWRKSTAT ∈ {Unemployed, Not in labor force}
  • Covariates: AGE2, IRSEX, NEWRACE2, IREDUHIGHST2, survey weights (ANALWT_C), design (VESTR, VEREP)
  • Estimand: Adjusted odds ratio of unemployment/OLF comparing AMHTXND2=1 vs 0

Data Source

  • NSDUH 2019 public-use file
  • Civilian, noninstitutionalized U.S. population aged 12+

ETL Documentation — Phase 1

Extract

Documented PowerShell commands and SQL scripts used to import NSDUH 2019 into PostgreSQL.

Transform

Manual variable subsetting in Excel, CSV export, PostgreSQL import, column renaming, and validation.

Load

PostgreSQL analysis-ready table.


Variable Mapping (NSDUH 2019)

Original Renamed Description
AMHTXND2 unmet_need Unmet need for mental health treatment
IRWRKSTAT employment_status Employment status
AGE2 age_group Age category
IRSEX sex Sex
NEWRACE2 race_ethnicity Race/ethnicity
IREDUHIGHST2 education_level Education
FILEDATE survey_date Survey date
ANALWT_C person_weight Survey weight
VESTR variance_stratum Variance stratum
VEREP variance_replicate Variance replicate

Exploratory Data Analysis

Population Definition

Overall sample and analytic subset.

Demographics

  • Age groups
  • Sex
  • Race / Ethnicity
  • Education level
  • Employment status

Frequencies, Counts, and Percentages

  • Percent of total
  • Percent of row
  • Tableau calculation logic

Statistical Interpretation

Contingency Tables

Full-time Part-time Unemployed
No Unmet Need 9050 3467 969
Unmet Need 1402 691 201

Chi-Square Interpretation

Employment status is not independent of unmet mental-health need. The chi-square confirms the relationship is statistically significant.


Interpretation of Preliminary Findings

• When people do not have unmet need, most are in full-time work.
• When people do have unmet need, the rate of unemployment and part-time work increases relative to their group size.

The findings reflect patterns within the 2019 NSDUH sample only.


Modeling Constraints

The initial logistic regression attempt failed due to categorical coding and model-structure violations. Multinomial logistic regression is deferred until Phase 2.


Phase 2 — NSDUH Multi-Year Integration (2019–2023)

Purpose

Combine all NSDUH years into a single harmonized dataset suitable for modeling.


Schema Drift and Harmonization

Later NSDUH years introduce:

  • Age header changes
  • Weight naming changes
  • Unmet need shifting to multiple service variables (2022–2023)

Data Refinement and Table Standardization (2019–2023)

Workflow Summary:

  1. Open raw .tab file in Excel
  2. Filter required headers
  3. Copy to clean worksheet
  4. Save as CSV
  5. Import into PostgreSQL
  6. Validate row counts

Variables Extracted (NSDUH 2019–2023)

AMHTXND2, IRWRKSTAT, AGE2 / CATAGE, IRSEX, NEWRACE2, IREDUHIGHST2, FILEDATE, ANALWT_C, VESTR, VEREP


Post-2021 Unmet Need Reconstruction (2022–2023)

Raw tables created (nsduh_2022_raw, nsduh_2023_raw) and unmet need reconstructed using:

  • MHTRTPY
  • MHTSHLDTX
  • MHTSKTHPY

Header Normalization and Type Enforcement

  • Column renames
  • Date conversions
  • Integer enforcement
  • Validation queries

Phase 3 — TEDS-A Integration (Future)

Secondary Hypothesis (TEDS-A)

Among treatment admissions, clients with a reported mental health problem have higher odds of being unemployed or not in the labor force at admission.


TEDS-A Variable Mapping

Original Renamed
ADM_YR admission_year
CASEID case_id
STFIPS state_fips
EMPLOY employment_status
PSYPROB mental_health_problem
AGE age_group
SEX sex
RACE race
ETHNIC ethnicity
EDUC education_level

Integrated Cross-Dataset Hypothesis

Signals of unmet or untreated mental health need at the population level correspond with higher unemployment at point of treatment.


Business Insight (Pending)

To be completed after Phase 2 and Phase 3 modeling and visualization.


Project Structure Summary

Phase 1 proves the relationship.
Phase 2 makes it longitudinal.
Phase 3 makes it systemic.

https://github.com/darrenlittlejohn/sql_mini_mentalhealth