Convenience wrapper that produces, for each treated wave, the population-
average effect, the single-year age profile, age-at-interview groups and
cohort-aligned groups, and the placebo estimates for each placebo date, in
one tidy data frame with a type column.
Usage
cdd_design(
data,
outcome,
onset,
waves,
placebos = list(),
ages = 20:70,
b = 5,
groups = data.frame(label = c("20-30", "30-44", "45-59", "60-74"), mid = c(25, 37, 52,
67), hw = c(5, 7, 7, 7)),
lo = 20,
hi = 70,
profile = TRUE,
...
)Arguments
- data
A data frame of repeated cross-sections.
- outcome
Name of the outcome column. Categorical outcomes are expanded into one linear probability equation per level unless
continuous = TRUE.- onset
Onset year of the shock. Pre-shock waves are those strictly before it.
- waves
Treated waves.
- placebos
List of
c(onset, wave)placebo pairs (may be empty).- ages
Integer vector of target ages.
- b
Age half-width for the single-year profile (groups use their own
hw).- groups
Group definition, see
cdd_groups().- lo, hi
Population-average age range.
- profile
Logical; estimate the single-year age profile.
- ...
Further arguments passed to
cdd().