Set the $SIMULATION record of a NONMEM control stream
set_simulation_record.RdWorks on the model code rather than on a Pharmpy model object, because
Pharmpy cannot parse TRUE=PRIOR (see set_simulation_clean()) and because
the uncertainty_engine = "nwpri" path of run_sim() only varies the seed
and the subproblem count between chunks — a string edit on an otherwise
finished control stream.
Arguments
- code
NONMEM model code (single string or character vector of lines).
- seed
random seed number
- n
number of simulation subproblems to run
- true_prior
emit
TRUE=PRIOR, i.e. have NONMEM draw a new parameter vector from the model's$PRIORrecord for every subproblem (seeadd_nwpri_prior()). DefaultFALSE.