prevalence,SimInf_pfilter-method {SimInf} | R Documentation |
Extract prevalence from running a particle filter
Description
Extract prevalence from running a particle filter
Usage
## S4 method for signature 'SimInf_pfilter'
prevalence(model, formula, level, index, format = c("data.frame", "matrix"))
Arguments
model |
the |
formula |
A formula that specifies the compartments that
define the cases with a disease or that have a specific
characteristic (numerator), and the compartments that define
the entire population of interest (denominator). The
left-hand-side of the formula defines the cases, and the
right-hand-side defines the population, for example,
|
level |
The level at which the prevalence is calculated at
each time point in |
index |
indices specifying the subset of nodes to include
when extracting data. Default ( |
format |
The default ( |
Value
A data.frame
if format = "data.frame"
, else
a matrix.