Samples n personas with attributes drawn independently from the
supplied margins, and renders each persona's text from a template.
Independence across attributes is a deliberate simplification: the
attributes are sampled marginally, not jointly. For instrument
pretesting this rarely matters; for anything resembling estimation it
does, and panel_calibrate() will tell you. When you hold microdata and want
the joint distribution preserved, use panel_from_data().
Arguments
- margins
A named list; each element a named probability vector, e.g.
list(age = c("18-34" = .3, "35-64" = .45, "65+" = .25)). Probabilities are renormalized if they do not sum to 1.- n
Panel size.
- persona_template
Text with
{attribute}placeholders rendered per persona.NULLbuilds a plain "attribute: value" persona.
