Skip to main content
U.S. flag
Health and Human Services Logo

An official website of the Department of Health & Human Services

menu-iconMore mobile-close-icon
mobile-back-btn-icon Back
  • menu-iconMenu
  • mobile-search-icon
AHRQ: Agency for Healthcare Research and Quality
  • Search All AHRQ Sites
  • Careers
  • Contact Us
  • Español
  • FAQs
  • Email Updates
MEPS Home Medical Expenditure Panel Survey
Font Size:
Contact MEPS FAQ Site Map  
S
M
L
XL
 

Linkage File for 2024 MEPS and 2022-2023 NHIS Public Use Files


1.0Overview

The Medical Expenditure Panel Survey (MEPS) Household Component (HC) uses the National Health Interview Survey (NHIS) as its sampling frame. Each year a new MEPS-HC panel is established by drawing the sample from the previous year's NHIS responding sample. The MEPS-HC design is based on an overlapping panel design, and two consecutive panels are overlapped in 2024 MEPS full year (FY) file. Details of the 2024 panel design are provided in the documentation for the 2024 Full Year Consolidated Data File.1

Due to the 2019 NHIS redesign, from each household only one adult and one child (if any children live in the household) were included in the NHIS sample.2 As a result, potentially only one adult and one child (if any), in each MEPS household could be linked to the previous data year's NHIS public use file. However, prior to the 2019 NHIS redesign, all persons in an NHIS household were included in the NHIS PUF that made it possible to potentially link nearly all persons in a MEPS panel.3

As illustrated in Figure 1 below, the 2024 MEPS full-year public use files (PUFs) cover the calendar year and contain data from Rounds 3, 4, and 5 of MEPS Panel 28 (which uses the 2021 NHIS as its sampling frame), and Rounds 1, 2, and 3 of MEPS Panel 29 (which uses the 2023 NHIS as its sampling frame). Therefore, MEPS Panels 28 and 28 can be linked to 2022 and 2023 NHIS PUFs respectively.

Figure 1. Mapping of MEPS Year, Panels, and Rounds to NHIS Years

This image illustrates that 2024 data was collected in Rounds 3, 4, and 5 of Panel 28; Rounds 1, 2, and 3 of Panel 29.

PUFs containing NHIS data for a given calendar year are available from the National Center for Health Statistics (NCHS).

Users who need to augment the MEPS data with information from NHIS can do so with the linkage file described in the following sections.


2.0Linkage File Description

The MEPS and NHIS linkage file, NHMEP24X.DAT, allows the data user to merge any of the person-level 2024 MEPS full-year public use data files with the 2022 and 2023 NHIS person-level PUFs (Sample Adult and Sample Child).

The NHIS person identifiers changed in 2019. Prior to 2019, each family (FMX) has been considered a separate case, and unique person identifiers have been Household Serial Number (HHX), Family Sequence Number (FMX), and Person Sequence Number (FPX). Beginning in 2019, only a sample adult and, where available, a sample child were included from each household. Therefore, the identifiers in 2019 and later are HHX and record type (RECTYPE) that specifies sample adult, sample child, or not sampled for NHIS.

The linkage file contains 19,140 person-level records and six variables. In the linkage file, a record exists for each of the MEPS 2024 full-year persons. Each record contains the MEPS sample person ID (DUPERSID) and the corresponding NHIS sample person IDs (HHX and RECTYPE). The linkage file can be linked to any of the person-level MEPS 2024 full-year public use data files using the variable DUPERSID. The linkage file can be linked to the NHIS 2022 or 2023 sample adult and sample child data files by HHX, RECTYPE, and SRVY_YR.

When a MEPS sample person does not link to NHIS, HHX is set to 9999999, SRVY_YR is set to 9999, RECTYPE is set to 99, and LINKFLAG is set to 0.


3.0Linkage File Record Counts

Of the 9,013 MEPS Panel 28 persons, 4,417 persons link to the 2022 NHIS data; 4,938 of the 10,127 Panel 29 persons link to the 2023 NHIS data. A total of 9,785 persons in the two panels do not link to either 2022 or 2023 NHIS data. These unlinked cases include newborns; newly in-scope persons; a small number of cases where the NHIS identified a household as responding, but when fielded in MEPS it was determined to actually be a nonresponding household; and household members who are neither the sample adult nor sample child. Table 1 below summarizes the linkages.

Table 1. Linkage File Record Counts

2024 MEPS Full-Year Data Total 2024 MEPS Persons Linked to 2022 or 2023 NHIS PUF
(total observations in NHIS PUF)
Not Linked to NHIS
Panel 28 persons (2022 NHIS) 9,013 4,417 (35,115) 4,596
Panel 29 persons (2023 NHIS) 10,127 4,938 (37,214) 5,189
Total 19,140 9,355 (72,329) 9,785


4.0Linkage File Record Layout

Table 2 is the record layout for the person-level MEPS-NHIS linkage file (NHMEP24X.DAT).

Table 2. Layout for the Person-Level MEPS-NHIS Linkage File

Variable Columns Type Label and value range*
DUPERSID 1 - 10 Character MEPS encrypted person ID (range = 2810003101 - 2930423102)
HHX 11 - 17 Character NHIS household serial number (range = H000014 - H073132)
LINKFLAG 18 - 18 Numeric Linkage status between MEPS and NHIS (1 or 0)
PANEL 19 - 20 Numeric MEPS panel number (28 or 29)
SRVY_YR 21 - 24 Numeric NHIS survey year (2022 or 2023)
RECTYPE 25 - 26 Numeric Record Type (10 or 20)

* Values may be missing based on NHIS survey year or linkage status.

Below is the input statement to convert the linkage file (NHMEP24X.DAT) to a SAS dataset.

DATA XX.NHMEP23X;
  INFILE "C:\TEMP\MEPS\NHMEP24X.DAT";
  INPUT DUPERSID $1-10 HHX $11-17 LINKFLAG 18 PANEL 19-20 SRVY_YR 21-24 RECTYPE 25-26;
RUN;

5.0Linking Instructions for SAS Users

The following is one way of adding NHIS person-level variables to the MEPS person-level file. Input files are MEPS HC-256 (2024 Full-Year Population Characteristic File), the 2022 NHIS sample adult and sample child data files, the 2023 NHIS sample adult and sample child data files, and the linkage file NHMEP24X.DAT.

  1. Create seven SAS datasets as follows:

    • Convert MEPS HC-256 (ASCII, SAS transport file, or SAS V9 file) to a SAS dataset named FY2023 (n =19,140).
    • Convert the linkage file NHMEP24X.DAT to a SAS dataset named NHMEP24X (n =19,140).
    • Convert the 2022 NHIS Sample Adult file to a SAS dataset named NHIS2022A (n = 27,651). Make sure the SAS dataset includes HHX, RECTYPE, SRVY_YR, and other variables that are to be added to the MEPS full-year dataset.
    • Convert the 2022 NHIS Sample Child file to a SAS dataset named NHIS2022C (n = 7,464). Make sure the SAS dataset includes HHX, RECTYPE, SRVY_YR, and other variables that are to be added to the MEPS full-year dataset.
    • Convert the 2023 NHIS Sample Adult file to a SAS dataset named NHIS2023A (n = 29,522). Make sure the SAS dataset includes HHX, RECTYPE, SRVY_YR, and other variables that are to be added to the MEPS full-year dataset.
    • Convert the 2023 NHIS Sample Child file to a SAS dataset named NHIS2023C (n = 7,692). Make sure the SAS dataset includes HHX, RECTYPE, SRVY_YR, and other variables that are to be added to the MEPS full-year dataset.


  2. Sort FY2024 by DUPERSID. Concatenate NHIS2022A, NHIS2022C, NHIS2023A, and NHIS2023C into one dataset named NHISALL (n = 72,329). Sort NHISALL by HHX, RECTYPE and SRVY_YR.
  3. Merge FY2024 (n = 19,140) with NHMEP24X (n = 19,140) by DUPERSID. Name the output dataset MEPS (n = 19,140). Then sort MEPS by HHX, RECTYPE and SRVY_YR.
  4. Merge MEPS(n = 19,140) with NHISALL (n = 72,329) by HHX, RECTYPE and SRVY_YR. Keep records only in MEPS (n = 19,140). Name the output dataset MEPS24NH (n = 19,140).

Sample SAS Code for Adding NHIS Variables to the MEPS Dataset.

LIBNAME MEPS "C:\TEMP\MEPS"; /*MEPS 2024 Full-Year PUF, MEPS-NHIS Link, output file*/
LIBNAME NHIS "C:\TEMP\NHIS"; /*NHIS 2022 and 2023 Sampled Adult and Child Files*/

PROC FORMAT;
  VALUE AGE
  .='.'
  0-HIGH='>=0';
RUN;

PROC SORT DATA=MEPS.FY2024;
  BY DUPERSID;
RUN;

DATA NHISALL;
  SET NHIS.NHIS2022A (KEEP=HHX RECTYPE SRVY_YR AGEP_A RENAME=(AGEP_A=AGE_P) /*other NHIS variables*/)
    NHIS.NHIS2022C (KEEP=HHX RECTYPE SRVY_YR AGEP_C RENAME=(AGEP_C=AGE_P) /*other NHIS variables*/)
    NHIS.NHIS2023A (KEEP=HHX RECTYPE SRVY_YR AGEP_A RENAME=(AGEP_A=AGE_P) /*other NHIS variables*/)
    NHIS.NHIS2023C (KEEP=HHX RECTYPE SRVY_YR AGEP_C RENAME=(AGEP_C=AGE_P) /*other NHIS variables*/);
   FORMAT _ALL_;

RUN;

PROC SORT DATA=NHISALL;
  BY HHX RECTYPE SRVY_YR;
RUN;

DATA MEPS;
  MERGE MEPS.FY2024 MEPS.NHMEP24X (KEEP=DUPERSID HHX RECTYPE SRVY_YR LINKFLAG);
  BY DUPERSID;
RUN;

PROC SORT DATA=MEPS;
  BY HHX RECTYPE SRVY_YR;
RUN;

DATA MEPS.MEPS24NH;
  MERGE MEPS (IN=A) NHISALL;
  BY HHX RECTYPE SRVY_YR;
  IF A;
RUN;

TITLE1 "MEPS 2024 FY data with NHIS variables";
PROC FREQ DATA=MEPS.MEPS24NH;
  TABLES LINKFLAG*SRVY_YR*AGE_P/LIST MISSING;
  FORMAT AGE_P AGE.;
RUN;



Sample Stata Code for Adding NHIS Variables to the MEPS Dataset

cd "c:temp"

log using stata24.log, replace

use "meps\h256", clear
rename *, lower
sort dupersid

tempfile fy2024
save `fy2024', replace

use "nhis\nhis2022a", clear
append using "nhis\nhis2022c"
append using "nhis\nhis2023a"
append using "nhis\nhis2023c"

rename *, lower
sort hhx rectype srvy_yr
tempfile nhisall
save `nhisall', replace

infix str dupersid 1-10 str hhx 11-17 linkflag 18 panel 19-20 srvy_yr 21-24 rectype 25-26 using "meps\nhmep24x.dat", clear
sort dupersid
tempfile link
save `link', replace

use `fy2024'
merge 1:1 dupersid using `link'
drop _merge
sort hhx rectype srvy_yr
tempfile meps
save `meps', replace

merge m:1 hhx rectype srvy_yr using `nhisall'
keep if _merge != 2 /*drop cases where a record was found in the NHIS PUFs but not in MEPS*/
keep dupersid hhx rectype srvy_yr linkflag /*edit this line to add any other desired nhis variables*/
save "meps\meps24nh", replace

describe
tab srvy_yr linkflag, missing

log close


6.0Further Information

For any questions regarding the linkage file, please contact Anita Soni at Anita.Soni@ahrq.hhs.gov. MEPS public use data files can be downloaded free of charge from the MEPS website at https://meps.ahrq.gov. NHIS public use data files can be obtained by contacting NCHS by telephone (301‑458‑4636) or through their website, https://www.cdc.gov/nchs.


Footnotes

1 https://meps.ahrq.gov/data_stats/download_data/pufs/h256/h256doc.shtml

2 For details of the 2019 redesign, see https://www.cdc.gov/nchs/nhis/about/2019-questionnaire-redesign.html.

3 A small number of persons may not be linkable between NHIS and MEPS because they may have left or joined the household between when NHIS was fielded and when MEPS was fielded.

MEPS HOME . CONTACT MEPS . MEPS FAQ . MEPS SITE MAP . MEPS PRIVACY POLICY . ACCESSIBILITY . VIEWERS & PLAYERS . COPYRIGHT
Back to topGo back to top
Back to Top Go back to top

Connect With Us

Facebook X You Tube LinkedIn

Sign up for Email Updates

To sign up for updates or to access your subscriber preferences, please enter your email address below.

Agency for Healthcare Research and Quality

5600 Fishers Lane
Rockville, MD 20857
Telephone: (301) 427-1364

  • Careers
  • Contact Us
  • Español
  • FAQs
  • Accessibility
  • Disclaimers
  • EEO
  • Electronic Policies
  • FOIA
  • HHS Digital Strategy
  • HHS Nondiscrimination Notice
  • Inspector General
  • Plain Writing Act
  • Privacy Policy
  • Viewers & Players
  • U.S. Department of Health & Human Services
  • The White House
  • USA.gov