% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{ssc_min_eigenvalue}
\alias{ssc_min_eigenvalue}
\title{Compute Smallest Eigenvalue of the SSC Design Matrix}
\usage{
ssc_min_eigenvalue(Y, D, S = NULL)
}
\arguments{
\item{Y}{Numeric matrix (\eqn{N \times T_{total}}) of outcomes.}

\item{D}{Binary matrix (\eqn{N \times T_{total}}) of treatment indicators.}

\item{S}{Number of post-treatment periods (or \code{NULL} for all).}
}
\value{
A scalar: the smallest eigenvalue.
}
\description{
A diagnostic function that builds the SSC design matrix
\eqn{\sum_s A_s' \hat M A_s} and returns its smallest eigenvalue.
This matrix must be positive definite for SSC estimates to exist.
}
\details{
A positive value means the SSC estimator is well-defined; a value
near zero warns that identification is weak.
}
\examples{
set.seed(1)
N <- 10; Ttot <- 8
Y <- matrix(rnorm(N * Ttot), N, Ttot)
D <- matrix(0L, N, Ttot)
D[1:3, 5:Ttot] <- 1L   # units 1-3 treated from period 5
ssc_min_eigenvalue(Y, D, S = 2)

}
