R/simulate_cross_sectional.R
simulate_cross_sectional.RdSimulates multiple cohorts in a cross-sectional framework.
simulate_cross_sectional( parTab, n_indiv, buckets = 12, strainIsolationTimes, samplingTimes, antigenicMap, ageMin = 5, ageMax = 80, attackRates, group = 1, sampleSensoring = 0, titreSensoring = 0 )
| parTab | the full parameter table controlling parameter ranges and values |
|---|---|
| n_indiv | number of individuals to simulate |
| strainIsolationTimes | vector of strain circulation times |
| samplingTimes | possible sampling times for the individuals |
| antigenicMap | the raw antigenic map with colnames x_coord, y_coord and inf_times |
| ageMin | minimum age to simulate |
| ageMax | maximum age to simulate |
| attackRates | a vector of attackRates to be used in the simulation |
| group | which group index to give this simulated data |
| titreSensoring | what proportion of titres are randomly missing? |
a list with: 1) the data frame of titre data as returned by simulate_group; 2) a matrix of infection histories as returned by simulate_infection_histories; 3) a vector of ages