% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/recipe_sim_datagen.R
\name{simulate_from_recipe}
\alias{simulate_from_recipe}
\title{Simulate a dataset from a validated recipe (list-only)}
\usage{
simulate_from_recipe(recipe, seed = NULL)
}
\arguments{
\item{recipe}{A validated recipe list (use \code{validate_recipe()}).}

\item{seed}{Optional integer retained as recipe/provenance metadata; it does
not set the random-number generator. Call \code{set.seed()} before this
function for reproducible simulation.}
}
\value{
A data.frame with columns \code{time}, \code{status}, \code{arm} (if treatment present),
plus covariates. Attribute \code{"achieved_censoring"} is attached.
}
\description{
Simulate a dataset from a validated recipe (list-only)
}
\examples{
covs <- list(list(name="x", type="continuous", dist="normal", params=list(mean=0, sd=1)))
rec <- recipe_quick_aft(120, "aft_lognormal",
        baseline=list(mu=2.2, sigma=0.5), treat_effect=-0.2,
        covariates=covs, target_censoring=0.25)
set.seed(11)
dat <- simulate_from_recipe(rec)
}
