% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estimators.R
\name{binary_did_probit}
\alias{binary_did_probit}
\title{Binary Outcome DiD: Probit Estimator}
\usage{
binary_did_probit(
  data,
  yname,
  tname,
  idname,
  treat_period,
  control_period,
  dname = NULL,
  gname = NULL,
  xformla = ~1,
  se_type = c("robust", "cluster", "analytical"),
  cluster_var = NULL
)
}
\arguments{
\item{data}{A data frame (long format).}

\item{yname}{Character. Binary outcome variable name.}

\item{tname}{Character. Time period variable name.}

\item{idname}{Character. Unit ID variable name.}

\item{treat_period}{Numeric. The treatment (post) period.}

\item{control_period}{Numeric. The pre-treatment baseline period.}

\item{dname}{Character. Treatment indicator variable name (optional).}

\item{gname}{Character. Cohort variable name (optional).}

\item{xformla}{One-sided formula for covariates. Default \code{~1}.}

\item{se_type}{Character. SE type: \code{"robust"} (default),
\code{"cluster"}, or \code{"analytical"}.}

\item{cluster_var}{Character. Clustering variable (if \code{se_type = "cluster"}).}
}
\value{
A list of class \code{binary_did_probit}.
}
\description{
Estimates 2x2 DiD with binary outcome using probit regression.
Parallel trends assumed on the probit (inverse-normal) scale.
}
\examples{
dat <- sim_binary_panel(n = 500, nperiods = 4, prop_treated = 0.5)
dat2 <- dat[dat$period \%in\% c(2, 3), ]
res <- binary_did_probit(dat2, "y", "period", "id", 3, 2, gname = "g")
print(res)
}
