% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_correction_query.R
\name{make_stat_means}
\alias{make_stat_means}
\title{Compute per-term mean sufficient statistics for realized events}
\usage{
make_stat_means(rem_formula, poss_edges)
}
\arguments{
\item{rem_formula}{Survival formula.}

\item{poss_edges}{Risk-set data frame containing \code{occurred} and \code{Recency}.}
}
\value{
A data frame suitable for passing to \code{\link[=make_behavior_queries]{make_behavior_queries()}}.
}
\description{
Aggregates a risk-set data frame by \code{occurred} and returns means of the REM
covariates, plus the median of \code{Recency} for realized events (if present).
}
\examples{
\dontrun{
data(edgelist)
el  <- prepare_edgelist(edgelist)
f   <- survival::Surv(time1, occurred) ~ Repetition + SndInitiation +
         survival::strata(time2)
# poss_edges is the internal risk-set frame; obtain via fit_rem internals
}
}
