R/combine_strat_model_output.R
combine_strat_model_output.Rd
Reduces the dimensions of stratified model output. Default behaviour is to remove stratification for all variables. However, variables to reduce the dimensions of can be selected, as can variables to preserve with there structure intact.
combine_strat_model_output(
df,
strat = NULL,
compartments = NULL,
hold_out_var = NULL
)
A data frame with variables stratified using numeric labels.
An integer specifying the number of stratifications to reduce.
A character vector specifying the unique population compartments.
A character vector specifying the variables to keep unchanged. Defaults to NULL
A dataframe of model output that has its dimensionality reduced
combine_to_age_model
df <- data.frame(S1 = NA, S2 = NA, S3 = NA, time = NA)
combine_strat_model_output(df, 3, compartments = "S", hold_out_var = "time")
#> time S
#> 1 NA NA