% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rem.R
\name{compute_seq_stat_means}
\alias{compute_seq_stat_means}
\title{Compute sufficient-statistic means for a sequence without fitting a REM}
\usage{
compute_seq_stat_means(
  edgelist,
  rem_formula,
  base_riskset = NULL,
  covariates = NULL
)
}
\arguments{
\item{edgelist}{Prepared edgelist (output of \code{\link[=prepare_edgelist]{prepare_edgelist()}}).}

\item{rem_formula}{Survival formula — used to identify covariate columns.}

\item{base_riskset}{Precomputed base risk set; constructed from \code{edgelist}
if \code{NULL}.}

\item{covariates}{Optional exogenous covariate list from \code{\link[=rem_covariates]{rem_covariates()}}.}
}
\value{
Named numeric vector: mean of each REM covariate across events.
}
\description{
Builds covariate values only for the realized events in \code{edgelist}
(n_nonevents = 0L) and returns their column means.  Much faster than
\code{\link[=fit_rem]{fit_rem()}} since no Cox model is fitted and the risk set contains exactly
one row per event.  Use to measure convergence in sufficient-statistic space
rather than coefficient space.
}
\examples{
data(edgelist)
el <- prepare_edgelist(edgelist)
compute_seq_stat_means(
  el[1:100, ],
  survival::Surv(time1, occurred) ~ Repetition + RecRecencyLog +
    survival::strata(time2)
)
}
