threemc_aggregate | R Documentation |
Aggregate by area, year, age and type (weighted by population), and convert to a percentage/probability.
threemc_aggregate(
.data,
fit,
areas,
populations,
age_var = c("age", "age_group"),
type = c("probability", "incidence", "prevalence"),
area_lev,
N = 100,
prev_year = 2008,
probs = c(0.025, 0.5, 0.975),
...
)
.data |
|
fit |
|
areas |
|
populations |
|
age_var |
Determines whether you wish to aggregate by discrete ages or age groups (0-4, 5-9, 10-14, and so on). |
type |
Determines which aspect of MC in the regions in question you wish to aggregate for. Can be one of "probability", "incidence" or "prevalence". |
area_lev |
PSNU area level for specific country. |
N |
Number of samples to be generated, Default: 100 |
prev_year |
If type == "prevalence", choose year to compare prevalence with. |
probs |
Percentiles to provide quantiles at. Set to NULL to skip computing quantiles. |
... |
Further arguments to internal functions. |
data.frame
with samples aggregated by aggr_cols
and
weighted by population.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.