combine_to_age_model: Combine an Infectious Disease Model To a Demographic Model

View source: R/combine_to_age_model.R

combine_to_age_modelR Documentation

Combine an Infectious Disease Model To a Demographic Model

Description

Similarly to combine_strat_model_output this functions reduces the dimension of model output into just the demographic components.

Usage

combine_to_age_model(
  df,
  age_com = NULL,
  compartments = NULL,
  hold_out_var = NULL,
  total_pop = TRUE
)

Arguments

df

A dataframe of model output.

age_com

Integer indicating the number of age compartments.

compartments

A character vector of the disease model compartments to combine.

hold_out_var

A character vector specifying the variables to keep unchanged. Defaults to NULL

total_pop

A logical indicating whether to calculate the total population. Defaults to true.

Value

A dataframe which summarises the demographic process of a model.

See Also

combine_strat_model_output

Examples


df <- data.frame(S1 = c(1,2), S2 = c(1, 3), E1 = c(4, 1), E2 = c(3, 4), time = c(1, 2))

combine_to_age_model(df, age_com = 2, hold_out_var = "time")

idmodelr documentation built on Sept. 2, 2022, 5:06 p.m.