nonlinear_bounds: Nonparametric Bounds for Binary Outcomes in Staggered DiD

View source: R/bounds.R

nonlinear_boundsR Documentation

Nonparametric Bounds for Binary Outcomes in Staggered DiD

Description

Computes sharp nonparametric bounds on the ATT for binary outcomes in staggered difference-in-differences designs, following the partial identification approach. These bounds require NO functional form assumptions on the outcome model - only an assumption about the direction or magnitude of selection.

The key insight for binary outcomes: Since Y is binary (0 or 1), the ATT is bounded by:

  • Lower bound: counterfactual never exceeds observed (pessimistic)

  • Upper bound: counterfactual never falls below observed (optimistic)

Under a Manski-style no-assumptions bound, plus refinements using the parallel trends assumption as a restriction.

Usage

nonlinear_bounds(
  data,
  yname,
  tname,
  idname,
  gname,
  xformla = ~1,
  control_group = c("nevertreated", "notyetreated"),
  bound_type = c("pt_only", "manski", "pt_monotone"),
  alpha = 0.05
)

Arguments

data

A long-format panel data frame.

yname

Character. Name of binary outcome variable (0/1).

tname

Character. Name of time period column.

idname

Character. Name of unit identifier.

gname

Character. Name of treatment cohort column.

xformla

One-sided formula for covariates. Default ~ 1.

control_group

Character. "nevertreated" (default) or "notyetreated".

bound_type

Character. Type of bound:

  • "manski": No-assumptions Manski bounds (widest)

  • "pt_monotone": Tighten using parallel trends + monotone treatment response

  • "pt_only": Use only parallel trends restriction

alpha

Numeric. Significance level for confidence intervals on bounds.

Value

A data frame of sharp bounds (lb, ub) for ATT(g,t), with bootstrap confidence intervals.

References

Manski, C. F. (1990). Nonparametric bounds on treatment effects. American Economic Review, 80(2), 319-323.

Callaway, B. (2021). Bounds on distributional treatment effect parameters. Journal of Econometrics, 222(2), 1084-1111.

Examples

set.seed(5)
dat    <- sim_binary_panel(n = 300, nperiods = 6)
bounds <- nonlinear_bounds(dat, "y", "period", "id", "g")
print(bounds)


NonlinearDiD documentation built on May 6, 2026, 1:06 a.m.