% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/description-rmst-datasets.R
\name{describe_generation}
\alias{describe_generation}
\title{Summarize a generated dataset and its simulation mechanism}
\usage{
describe_generation(set)
}
\arguments{
\item{set}{A single element from \code{\link[=load_recipe_sets]{load_recipe_sets()}}, i.e. \code{list(data=<df>, meta=<list>)}.}
}
\value{
A list of data frames:
\itemize{
\item \code{header}: \code{n}, \code{L} (analysis horizon; stored as attr \code{"tau"}), \code{model},
\code{event_rate}, \code{achieved_censoring}.
\item \code{baseline}: flattened baseline parameters.
\item \code{effects}: coefficients for intercept/treatment and covariates (and formula terms if used).
\item \code{treatment}: assignment mechanism and knobs.
\item \code{censoring}: censoring mode/target/admin time.
\item \code{covariates}: each generated covariate with its distribution and parameters.
\item \code{files}: paths to on-disk files (csv/rds/rdata) when available.
}
}
\description{
Given one element returned by \code{\link[=load_recipe_sets]{load_recipe_sets()}} (a list with \code{data} and
a rich \code{meta} list), this builds tidy tables describing the data-generating
process: model family, baseline parameters, linear predictor coefficients
(intercept / treatment / covariates), treatment assignment, and censoring.
}
\examples{
covs <- list(covar_continuous("x", mean = 0, sd = 1))
rec <- recipe_quick_aft(
  n = 20, model = "aft_lognormal",
  baseline = list(mu = 2.7, sigma = 0.6),
  treat_effect = -0.2, covariates = covs,
  target_censoring = 0.2, seed = 123
)
out <- file.path(tempdir(), "rmst_describe_generation")
generate_recipe_sets(rec, out_dir = out, formats = "rds", n_reps = 1)
sets <- load_recipe_sets(file.path(out, "manifest.rds"))
spec <- describe_generation(sets[[1]])
spec$header
spec$baseline
spec$effects
spec$treatment
spec$censoring
spec$covariates
spec$files
}
