Simulate a reduced manuscript-style MBMM dataset
Source:R/simulation-demo.R
mbmm_simulate_manuscript_demo.RdThis public simulation preserves the main manuscript structure while replacing private empirical biomarker and visit-pattern inputs with fully synthetic analogues.
Usage
mbmm_simulate_manuscript_demo(
n_subjects = 50,
prevalence = 0.3,
beta_true = -1.5,
p_abortive = 0.4,
n_bank_donors = 8L,
productive_parameter_bank = NULL,
visit_schedules = mbmm_demo_visit_schedules(),
sigma_obs = 0.5,
lod = 100,
productive_min_detect = 1L,
productive_max_tries = 50L,
seed = NULL
)Arguments
- n_subjects
Number of subjects.
- prevalence
Target marginal productive-infection prevalence for the realized synthetic biomarker distribution.
- beta_true
True standardized biomarker effect in the logistic gate. Negative values represent protection.
- p_abortive
Probability that a nonproductive subject receives an abortive/transient pattern rather than a purely near-background trajectory.
- n_bank_donors
Number of productive subjects assigned the complete visit schedule and flagged as bank eligible.
- productive_parameter_bank
Optional data frame of productive ODE parameters. When omitted, a synthetic public bank is generated from
mbmm_example_eclipse_prior.- visit_schedules
Named list of public visit schedules.
- sigma_obs
Observation-noise SD on the log10 scale.
- lod
Natural-scale assay limit of detection.
- productive_min_detect
Minimum number of detections requested for a productive trajectory.
- productive_max_tries
Maximum attempts used to obtain that minimum.
- seed
Optional random seed.
Value
A list with:
subject_dataSubject-level covariates and truth.
truthAlias of
subject_data.observationsLong-format observations.
obs_listNamed per-subject observation data frames.
covariatesData frame containing
idandbaseline_antibody.productive_parameter_bankParameter bank used for productive trajectory generation.
settingsGenerating settings.
Details
Productive subjects are generated from
mbmm_example_eclipse_simulate using parameter draws from
mbmm_example_eclipse_prior unless a custom productive parameter
bank is supplied.