% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sequence-consensus-groups.R
\name{compare_sequence_groups}
\alias{compare_sequence_groups}
\title{Compare sequence groups descriptively}
\usage{
compare_sequence_groups(
  data,
  group_col,
  sequence_id_col = "sequence_id",
  order_col = "sequence_order",
  state_col = "state",
  reference = NULL,
  metrics = c("state", "transition", "length"),
  include_self = TRUE,
  transition_separator = " -> ",
  zero_policy = c("missing", "infinite")
)
}
\arguments{
\item{data}{Long-format sequence data.}

\item{group_col}{Grouping column that is constant within sequence.}

\item{sequence_id_col, order_col, state_col}{Sequence columns.}

\item{reference}{Optional reference group. When supplied, each other
group is reported as \code{group_1} and the reference as \code{group_2}; differences
and ratios are therefore other-minus-reference and other/reference. When
omitted, all pairwise group contrasts are returned.}

\item{metrics}{Any of \code{"state"}, \code{"transition"}, and \code{"length"}.}

\item{include_self}{Include self-transitions.}

\item{transition_separator}{Separator used in reported transition labels. It
must not occur inside an observed state label.}

\item{zero_policy}{Ratio policy when the reference value is zero.}
}
\value{
A list of class \code{gp3_sequence_group_comparison} containing group
summaries and pairwise descriptive contrasts.
}
\description{
Produces descriptive state, transition and sequence-length comparisons.
No hypothesis tests or causal interpretations are produced.
}
\examples{
sequences <- data.frame(
  sequence_id = rep(c("s1", "s2", "s3", "s4"), each = 4L),
  sequence_order = rep(1:4, times = 4L),
  state = c("A", "B", "C", "D", "A", "B", "C", "C",
            "D", "C", "B", "A", "D", "C", "A", "A"),
  group = rep(c("g1", "g2"), each = 8L),
  stringsAsFactors = FALSE
)
compare_sequence_groups(sequences, group_col = "group")

}
