Calculate the proportion of individuals with disease, or the proportion of nodes with individuals with disease, or the proportion of individuals with disease in each node.
prevalence(model, type = c("pop", "bnp", "wnp"), i = NULL, ...)# S4 method for SIR
prevalence(model, type = c("pop", "bnp", "wnp"), i = NULL,
...)
# S4 method for SISe
prevalence(model, type = c("pop", "bnp", "wnp"), i = NULL,
...)
# S4 method for SISe3
prevalence(model, type, i, age = 1:3, ...)
# S4 method for SISe3_sp
prevalence(model, type, i, age = 1:3, ...)
# S4 method for SISe_sp
prevalence(model, type = c("pop", "bnp", "wnp"),
i = NULL, ...)
The model
to calculated the prevalence from.
The type of prevalence measure to calculate:
'pop'
(default) calcalates the proportion of the
individuals in the population that have disease (model
specific) at each time point in tspan
, 'bnp'
calculates the between-node prevalence, and 'wnp'
calculates the within-node prevalence.
Indices specifying the nodes to include in the
calculation of the prevalence. Default is NULL
, which
includes all nodes.
Additional arguments affecting the measure
For models with age categories, the age category to include in the calculation. Default is that all age categories are included.
Vector when type equals 'pop'
or 'bnp'
but
matrix when type equals 'wnp'
.