Estimate a population model and generate a synthetic dataset from it
Source:R/model-estimate.R
synpmx_model.RdA single call for synpmx_model_estimate() followed by
synpmx_model_generate(). Use the two separately to look at the fit before
generating from it. The result carries the fit's model_fingerprint() as its
pmx_fitted_model attribute, which is what generation read; the candidate
table, the starting values and the other diagnostics are only on the fit
itself.
Arguments
- data
Source PMX event data.
- roles
Explicit column roles from
pmx_roles(), includingnominal_time.- n_subjects
Number of synthetic subjects. Defaults to the source count.
- seed
Seed, used for both stages.
- ...
Passed to
synpmx_model_estimate(), includingmin_category_patients(default 3). Set it to 1 to retain all observed categorical baseline levels.