acs_micro

A 0.3% stratified random sample of individual-level American Community Survey records for 2008–2021 (about 69,800 people ages 18–60), carrying the same Medicaid-expansion adoption years as the aggregated medicaid panel. Because it holds individual survey weights and real covariates, it is the dataset for demonstrating repeated cross-section analysis, survey weighting, and propensity-score weighting with the stacked estimator — none of which the collapsed state panel can support.

Codebook

Variable Type Description
state character Two-letter state abbreviation
year integer Calendar year (2008–2021)
perwt numeric ACS person weight (survey sampling weight)
statefip integer State FIPS code
adopt_year integer Year the state adopted Medicaid expansion (NA if never adopted)
uninsured integer Health insurance status: 1 = uninsured, 0 = insured
female integer Sex: 1 = female, 0 = male
age integer Age in years (18–60)

The sample preserves the state-by-year distribution of the full ACS microdata while staying small enough to ship with the package.

Source and citation

American Community Survey via IPUMS USA (https://usa.ipums.org/); sample drawn from the full ACS microdata for adults ages 18–60.

Steven Ruggles, Sarah Flood, Matthew Sobek, Daniel Backman, Annie Chen, Grace Cooper, Stephanie Richards, Renae Rodgers, and Megan Schouweiler. IPUMS USA: Version 15.0. Minneapolis, MN: IPUMS, 2024. doi:10.18128/D010.V15.0

Method reference: Wing, C., Freedman, S., & Hollingsworth, A. (2024). Stacked Difference-in-Differences. Working paper.

The data

library(stacked)
data(acs_micro, package = "stacked")
head(acs_micro)
   state year perwt statefip adopt_year uninsured female age
1:    AL 2008   116        1         NA         0      1  19
2:    AL 2008   121        1         NA         1      0  46
3:    AL 2008    93        1         NA         1      0  49
4:    AL 2008   135        1         NA         0      1  20
5:    AL 2008    94        1         NA         0      0  23
6:    AL 2008   242        1         NA         0      1  51
dim(acs_micro)
[1] 69820     8

Preview

source("../assets/style-web.R")

d <- copy(acs_micro)
agg <- d[, .(uninsured = weighted.mean(uninsured, perwt)), by = year][order(year)]

p_preview <- ggplot(agg, aes(year, uninsured)) +
  geom_line(color = highlight_color, linewidth = 0.7) +
  geom_point(shape = shp_primary, size = pt_size, stroke = pt_stroke,
             fill = highlight_color, color = border_color) +
  labs(title = "Weighted uninsured share by year",
       subtitle = "Survey-weighted fraction uninsured, adults 18–60",
       x = "Year") +
  base_theme

Download

Load it

data(acs_micro, package = "stacked")
stacked use acs_micro, clear