% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{example_msm}
\alias{example_msm}
\title{Synthetic Clustered Illness-Death-with-Recovery Data}
\format{
A data frame with 81 rows (one row per mutually-exclusive
  time interval per subject) and 7 columns:
\describe{
  \item{id}{Integer subject identifier (40 subjects, ids 1..40).}
  \item{cluster}{Integer cluster identifier (8 clusters, 5 subjects
    each).}
  \item{treatment}{Binary treatment indicator (0 or 1), balanced
    20/20 across subjects. Treatment 1 has a higher illness hazard
    than treatment 0.}
  \item{Tstart}{Numeric start time of the interval.}
  \item{Tstop}{Numeric end time of the interval.}
  \item{Sstart}{Integer state during the interval: 1 = Healthy,
    2 = Ill, 3 = Dead (absorbing).}
  \item{Sstop}{Integer state at \code{Tstop}, or equal to
    \code{Sstart} on a final, censored row.}
}
}
\source{
Simulated. See \code{data-raw/example_msm.R} in the package
  sources.
}
\usage{
example_msm
}
\description{
A synthetic interval-format multistate dataset used in package
examples, the README, and the vignette. The data are generated from
an illness-death-with-recovery process with cluster-level frailty,
so they exercise the package's headline feature: support for
non-monotone (cyclic) transitions.
}
\details{
The transition structure is
\code{trans_mat(list(c(2, 3), c(1, 3), integer(0)))}, i.e.
Healthy <-> Ill, Healthy -> Dead, Ill -> Dead. Within each subject
rows are temporally and spatially contiguous; censoring is encoded
as \code{Sstart == Sstop} on the final row.

The same data are also shipped as a CSV at
\code{system.file("extdata", "example_data.csv", package = "clusteredMSM")}
for users who prefer to mimic loading their own file.

The generation script lives in \code{data-raw/example_msm.R} and is
fully reproducible (\code{set.seed(2026)}).
}
\examples{
data(example_msm)
head(example_msm)
table(example_msm$Sstart, example_msm$Sstop)
}
\keyword{datasets}
