The basic epidemiological model in the package is a SEEIIR model, which is a version of the SEIR model, but with both the Exposed and Infected split into two different groups. This results in a more realistic gamma distributed waiting time both between the exposed and infected state and the infected and recovered states.
We also need to keep track of who is vaccinated or not. When a Susceptible is vaccinated there is a certain probability that the person becomes recovered (and vaccinated), or stays susceptible (but vaccinated). This is dependent on the efficacy of the vaccine that season. Once one is in any of the other states, we assume that the vaccine does not influence the progress of the infection. As a result an infected who is vaccinated, will stay infected, but is now also tracked as being vaccinated.
Finally we divide the population into different age groups and risk groups. Different age groups and risk groups will be vaccinated at different rates. Infections between age groups happens according to the a contact matrix. The contact matrix governs the number of contacts between and within people of different age groups.
The main function implementing the epidemiological model is the infectionODEs
function. This function requires a number of parameters and we will explain all these parameters below.
infectionODEs(population, initial_infected, vaccine_calendar, contact_matrix,
susceptibility, transmissibility, infection_delays, interval)
The size of the population size part of each age group and risk group.
library(fluEvidenceSynthesis)
data(demography) # Population divided by age (0 years old, 1 years old, etc.)
# Separate into non elderly (<65) and elderly population
ag <- stratify_by_age(demography, limits=c(65)) # c( 43670500, 8262600 )
# Separate in risk groups. In this case we assume one additional (high) risk groups and that respectively
# 1 percent of non elderly and 40% of elderly are in this risk group. It is possible to
# define an additional risk group (e.g. pregnant women) if desired
population <- stratify_by_risk(ag, matrix(c(0.01,0.4),nrow=1),
labels = c("LowRisk", "HighRisk")) # c( 43233795, 4957560, 436705, 3305040 )
The resulting vector holds the low risk population by age group (43233795, 4957560) followed by the high risk (436705, 3305040).
The number of people infected at the beginning of the season, again separated into age groups and risk groups.
The vaccination calendar for a given the year. See the vaccination vignette for a more in depth explanation of this object. Here we will assume a constant percentage being vaccinated for four months. The elderly and high risk groups are vaccinated at the highest rate, with no vaccination for the low risk, younger group.
Contact rates between the different age groups.
library(fluEvidenceSynthesis)
data(polymod_uk)
data(demography)
# Polymod data is subdivided in seven age groups
poly <- polymod_uk[,c(1,2,3,9)]
poly[,3] <- rowSums(polymod_uk[,3:8])
contacts <- contact_matrix(as.matrix(poly), demography, c(65))
pander(contacts)
1.212e-07 | 4.501e-08 |
4.501e-08 | 8.152e-08 |
Different parameter values in the epidemiological model. We assume susceptibility is different for the different age groups, while transmissibility is the same for each age group. Infection_delays are the average time going from exposed to infected and from infected to recovered.
Interval is the time we want to integrate over. For example if we have a data point each week, then we want to model all the people infections during that week, giving us an interval of 7 days.
odes <- infectionODEs( population, initial.infected, vaccine_calendar, contacts,
susceptibility, transmissibility, infection_delays, 7 )
pander(head(odes))
Time | LowRisk [0,65) | LowRisk [65,+) | HighRisk [0,65) | HighRisk [65,+) |
---|---|---|---|---|
2010-09-06 | 5820 | 721.5 | 58.79 | 481 |
2010-09-13 | 8888 | 169.7 | 89.78 | 113.1 |
2010-09-20 | 13996 | 266.9 | 141.4 | 177.9 |
2010-09-27 | 22011 | 419.8 | 222.3 | 279.9 |
2010-10-04 | 34551 | 658.7 | 348.9 | 439.1 |
2010-10-11 | 54060 | 1019 | 543.7 | 679.3 |
fraction.infected <- odes %>%
gather(Group, Incidence, -Time) %>%
mutate(fraction = Incidence/population[Group])
ggplot( data=fraction.infected ) + geom_line( aes(x=Time, y=fraction, colour = Group) ) +
ylab( "Fraction infected" )
You can look up how to adapt the underlying transmission model to your own needs in the adapting-the-transmission-model vignette or learn how to use your model for parameter inference, which is explained in more detail in the inference vignette.