This repository contains instructions and example code for loading and analyzing data from the Agency for Healthcare Research and Quality's Medical Expenditure Panel Survey (MEPS) Household Component (HC). Quick reference guides are also provided for convenience.
Example code for loading and analyzing MEPS data in R, SAS, and Stata is available in the following folders. These folders also include example exercises from recent MEPS workshops. In addition, the SAS folder contains exercises from older workshops (1996-2006):
Note to User: All code provided in this repository is intended as an example for loading and analyzing MEPS data. AHRQ cannot certify the quality of your analysis. It is the user's responsibility to verify the accuracy of the results.
The Agency for Healthcare Research and Quality (AHRQ) conducts several workshops throughout the year. These workshops provide extended knowledge about MEPS data, practical information about usage of MEPS public use data files and an opportunity to construct analytic files with the assistance of AHRQ staff. The workshops are designed for health services researchers who have a background or interest in using national health surveys. For questions regarding MEPS Workshops, please contact Anita Soni at [email protected]. Information on upcoming workshops is posted on the MEPS website. Check back regularly for updates.
The agenda, presentation slides, and programming exercises for the most recent workshop are available in the MEPS-workshop repository.
The Medical Expenditure Panel Survey, which began in 1996, is a set of large-scale surveys of families and individuals, their medical providers (doctors, hospitals, pharmacies, etc.), and employers across the United States. The MEPS Household Component (MEPS-HC) survey collects information from families and individuals pertaining to medical expenditures, conditions, and events; demographics (e.g., age, ethnicity, and income); health insurance coverage; access to care; health status; and jobs held. Typically, each surveyed household is interviewed five times (rounds) over a two-year period:
The MEPS-HC is designed to produce national and regional estimates of the health care use, expenditures, sources of payment, and insurance coverage of the U.S. civilian noninstitutionalized population. The sample design of the survey includes weighting, stratification, clustering, multiple stages of selection, and disproportionate sampling.
IMPORTANT! Starting with some 2017 files, SAS Transport formats for most of the MEPS Public Use Files were converted from the SAS XPORT to the SAS CPORT engine. Importing XPORT and CPORT files into SAS requires different procedures. In addition, CPORT data files cannot be read directly into R or Stata; alternative file formats must be used. More details are available in the sub-folders for each programming language.
Data from the Household Component of MEPS are available for download as public use files. For data years 2018 and later, .zip files for multiple file formats are available, including ASCII (.dat), SAS transport (.ssp), SAS V9 (.sas7bdat), Stata (.dta), and Excel (.xlsx). Prior to 2017, ASCII (.dat) and SAS transport (.ssp) files are provided for all datasets. The following table summarizes the various file formats available by data year:
|SAS V9 (.sas7dat)
|2017||Full-year consolidated (HC-201)||X||X||X|
|2017||All other 2017 files||X||X|
|2018||All other 2018 files||X||X||X|
|2019 and later||Pooled linkage (HC-036)
BRR replicates (HC-036BRR)
|2019 and later||All other 2019 files||X||X||X|
1 Additional programming statements with column widths, types, and names are required to read ASCII files. SAS and Stata programming statements are available for all data files. R programming statements are available for most files from data years 2018 and later.
2 SAS CPORT files cannot be read into R or Stata.
Zip files of each data format can be downloaded from the web page for each MEPS public use file.
The complex survey design of MEPS requires special methods for analyzing MEPS data. These tools are available in many common programming languages. Failure to account for the survey design can result in biased estimates. Details and examples of using the appropriate survey methods are provided in the R, SAS, and Stata folders. Additional examples comparing these three languages can be found in the quick reference guide meps_programming_statements.md.
When analyzing MEPS data, it is the user's responsibility to ensure that sample sizes and precision are adequate for the user's purposes. Please refer to AHRQ's guidelines for specific recommendations.
When analyzing multiple years of MEPS data, it is important to note that MEPS variable names may differ across years. Here are just a few examples:
The MEPS-HC Variable Explorer Tool can be used to search variables and labels across the years of the most commonly used MEPS public-use files. For detailed information on variables in a specific file, refer to the documentation and codebook that is provided with each data file.
In addition to the Household Component (MEPS-HC), MEPS is comprised of two additional components: The MEPS Medical Provider Component (MEPS-MPC) and the MEPS Insurance Component (MEPS-IC). The MEPS-MPC survey collects information from providers of medical care that supplements the information collected from persons in the MEPS-HC sample in order to provide the most accurate cost data possible. The MEPS-IC survey collects information from employers in the private sector and state and local governments on the health insurance coverage offered to their employees. It also includes information on the number and types of private health insurance plans offered, benefits associated with these plans, annual premiums and contributions to premiums by employers and employees, copayments and coinsurance, by various employer characteristics (for example, State, industry and firm size). Summary data tables, chartbooks, and publications for the MEPS-IC are available on the MEPS website.
Special permissions are required to access datasets from the MPC and IC components. Access to the MEPS-MPC data can be requested from the AHRQ data center. For MEPS-IC data, researchers with approved projects can access the data at one of the Federal Statistical Research Data Centers. If you would like to use MEPS-IC data, please contact AHRQ so that we can assist you with your request.
You can contact us by e-mail, mail, or telephone:
MEPS Project Director
Medical Expenditure Panel Survey
Agency for Healthcare Research and Quality
5600 Fishers Lane
Rockville, MD 20857