% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lrt_stationarity_cat.R
\name{run_stationarity_tests_cat}
\alias{run_stationarity_tests_cat}
\title{Run all stationarity-related tests for categorical AD}
\usage{
run_stationarity_tests_cat(
  y,
  order = 1,
  blocks = NULL,
  homogeneous = TRUE,
  n_categories = NULL,
  test = c("lrt", "score", "mlrt")
)
}
\arguments{
\item{y}{Integer matrix with n_subjects rows and n_time columns. Each entry
should be a category code from 1 to c.}

\item{order}{Antedependence order p. Default is 1.}

\item{blocks}{Optional integer vector of length n_subjects specifying group
membership.}

\item{homogeneous}{Logical. If TRUE (default), parameters are shared across
all groups.}

\item{n_categories}{Number of categories. If NULL, inferred from data.}

\item{test}{Type of test statistic. One of \code{"lrt"} (default),
\code{"score"}, or \code{"mlrt"}.}
}
\value{
A list containing:
\describe{
\item{time_invariance}{Result of test_timeinvariance_cat}
\item{stationarity}{Result of test_stationarity_cat}
\item{table}{Summary data frame}
}
}
\description{
Performs tests for time-invariance and stationarity constraints. For
\code{order = 1}, the stationarity test corresponds to strict stationarity;
for \code{order > 1}, it tests marginal-constancy plus time-invariant
transitions.
Currently supports complete data only.
}
\examples{
\donttest{
y <- simulate_cat(200, 6, order = 1, n_categories = 2)
result <- run_stationarity_tests_cat(y, order = 1)
print(result$table)
}

}
