% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generate_sets_datagen.R
\name{generate_recipe_sets}
\alias{generate_recipe_sets}
\title{Generate simulated datasets across scenario combinations (TXT/CSV/RDS/RData)}
\usage{
generate_recipe_sets(
  base_recipe,
  vary = list(),
  out_dir,
  formats = c("txt", "csv", "rds", "rdata"),
  n_reps = 1L,
  seed_base = NULL,
  filename_template = "sc{scenario_id}_r{rep}"
)
}
\arguments{
\item{base_recipe}{A recipe list (use \code{validate_recipe()} if needed).}

\item{vary}{Named list; keys are dotted paths inside the recipe (e.g., \code{"n"},
\code{"censoring.target"}, \code{"event_time.effects.treatment"}).}

\item{out_dir}{Directory to write datasets and \code{manifest.rds} (created if missing).}

\item{formats}{Character vector subset of \code{c("txt","csv","rds","rdata")}.}

\item{n_reps}{Integer; number of replicates per scenario.}

\item{seed_base}{Optional integer retained in the manifest as per-replicate
provenance metadata computed as \code{seed_base + scenario_id*1000 + rep}.
It does not set the random-number generator.}

\item{filename_template}{Base filename (no extension) with placeholders:
\code{"{scenario_id}"}, \code{"{rep}"} and any dotted path used in \code{vary}.}
}
\value{
Invisibly returns the manifest \code{data.frame} and writes \code{manifest.rds}.
}
\description{
Builds a grid of scenarios from a base recipe and a named list of variations,
simulates one or more replicates per scenario, and writes the datasets to files
in a target folder as \code{.txt} (tab), \code{.csv}, \code{.rds}, and/or \code{.RData}.
A manifest is written as \code{manifest.rds}. The recipe specification does not
include an analysis horizon; specify \code{L} later in downstream analysis functions.
}
\examples{
covs <- list(list(name="x", type="continuous", dist="normal", params=list(mean=0, sd=1)))
rec <- recipe_quick_aft(60, "aft_lognormal",
         baseline=list(mu=2.7, sigma=0.6), treat_effect=-0.2,
         covariates=covs, target_censoring=0.2)
out <- file.path(tempdir(), "rmst_checks")
dir.create(out, showWarnings = FALSE, recursive = TRUE)
man <- generate_recipe_sets(rec, vary=list(n=c(60,80)), out_dir=out,
         formats=c("csv","rds"), n_reps=1, seed_base=123)
}
