% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.R
\name{sim_count_panel}
\alias{sim_count_panel}
\title{Simulate Count Panel Data with Staggered Treatment}
\usage{
sim_count_panel(
  n = 500L,
  nperiods = 6L,
  prop_treated = 0.5,
  n_cohorts = 3L,
  true_rr = 1.5,
  base_rate = 5,
  overdispersion = FALSE,
  seed = NULL
)
}
\arguments{
\item{n}{Integer. Number of units. Default 500.}

\item{nperiods}{Integer. Number of time periods. Default 6.}

\item{prop_treated}{Numeric. Proportion of units ever treated. Default 0.5.}

\item{n_cohorts}{Integer. Number of treatment cohorts. Default 3.}

\item{true_rr}{Numeric or vector. True rate ratio for each cohort.
Default 1.5 (50 percent increase in count).}

\item{base_rate}{Numeric. Baseline Poisson rate. Default 5.}

\item{overdispersion}{Logical. Add overdispersion (negative binomial).
Default FALSE.}

\item{seed}{Integer. Random seed.}
}
\value{
Long-format data frame with columns: id, period, y, g, D, x1.
}
\description{
Generates simulated panel data with a count outcome (Poisson-distributed)
and staggered treatment adoption. Treatment effect is multiplicative
(rate ratio) on the count scale.
}
\examples{
dat <- sim_count_panel(n = 400, nperiods = 6, true_rr = 1.8)
summary(dat$y)

}
