powered by
Similarly to combine_strat_model_output this functions reduces the dimension of model output into just the demographic components.
combine_strat_model_output
combine_to_age_model( df, age_com = NULL, compartments = NULL, hold_out_var = NULL, total_pop = TRUE )
A dataframe which summarises the demographic process of a model.
A dataframe of model output.
Integer indicating the number of age compartments.
A character vector of the disease model compartments to combine.
A character vector specifying the variables to keep unchanged. Defaults to NULL
A logical indicating whether to calculate the total population. Defaults to true.
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")
Run the code above in your browser using DataLab