% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_correction_query.R
\name{make_suffstats}
\alias{make_suffstats}
\title{Extract sufficient-statistic means from a REM risk-set data frame}
\usage{
make_suffstats(rem_formula, data, drop_strata = TRUE)
}
\arguments{
\item{rem_formula}{Survival formula whose RHS terms are the covariates.}

\item{data}{Risk-set data frame (expanded counting-process format)
with an \code{occurred} column.}

\item{drop_strata}{If \code{TRUE} (default), drop strata columns from the model
matrix before computing means.}
}
\value{
A data frame with columns \code{occurred} plus one column per covariate.
}
\description{
Returns a data frame with one row per value of \code{occurred} (0/1), containing
the mean of each REM covariate.  Used as input to \code{\link[=make_behavior_queries]{make_behavior_queries()}}.
}
\examples{
data(edgelist)
el  <- prepare_edgelist(edgelist)
fit <- fit_rem(el[1:100, ],
  survival::Surv(time1, occurred) ~ Repetition + survival::strata(time2),
  n_nonevents = 30L, method = "clogit")
# make_suffstats operates on the expanded risk-set data frame; see fit_rem
}
