Description Usage Arguments Details Value Examples
Compute synthetic population trajectories from model parameters
1 2 | synthetic.pop(pars, runs = 100, popsize = 1000, maxAge = 70,
rngseed = NULL)
|
pars, |
a list with elements 'f_H', 'f_L', and 'p_H'; see serofit return value |
runs, |
the number of different serotype timelines to simulate |
popsize, |
the number of individuals to sample for each run |
maxAge, |
the length of each lifetime |
rngseed, |
an optional seed for the random number generator |
Using fitted parameters for a two-risk, constant force of infection model, simulate a dengue annual exposures model for the requested number of serotype series ('runs') and individuals ('popsize'). The resulting matrix is a collection of integers, 0-4. 0 indicates no infection, 1-4 infection by the corresponding serotype.
a matrix of integers 0-4, rows 'runs*popsize' x columns 'maxAge'
1 2 3 4 5 | require(denvax);
data(morrison2010) # has counts by age
fit <- with(morrison2010, serofit(sero=Seropositive, N=Number, age.min=Age))
m2010pop <- synthetic.pop(fit, runs = 10, popsize = 10) # small sample size for example run time
head(m2010pop)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.