Returns a structured recipe – pseudocode + runnable R code –
explaining how to simulate data from a fitted model. The recipe
is family-aware: it picks the right RNG (rnorm, rbinom,
rpois, rgamma, rnbinom, ...) and lists the draws in the
right order (random effects first, then linear predictor, then
response).
The returned object is an S3 list with pseudocode (character
vector, one element per step) and r_code (single character
string, ready to eval(parse(text = ...))). print() formats it
for the console; knit_print() formats it as a fenced R code
block plus a numbered pseudocode list.
This is a teaching surface: the recipe shows the generative
model, not the inferential machinery. For a real simulation
that round-trips through the fitted-model object's internals
(sampling from posterior, properly propagating uncertainty), the
relevant package's own simulate() / posterior_predict() /
predict() interface is the right tool.