synthetic.pop: Compute synthetic population trajectories from model...

Description Usage Arguments Details Value Examples

View source: R/main.R

Description

Compute synthetic population trajectories from model parameters

Usage

1
2
synthetic.pop(pars, runs = 100, popsize = 1000, maxAge = 70,
  rngseed = NULL)

Arguments

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

Details

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.

Value

a matrix of integers 0-4, rows 'runs*popsize' x columns 'maxAge'

Examples

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)

denvax documentation built on Dec. 2, 2019, 1:09 a.m.