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
)

Arguments

df

A data frame with variables stratified using numeric labels.

strat

An integer specifying the number of stratifications to reduce.

compartments

A character vector specifying the unique population compartments.

hold_out_var

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

Value

A dataframe of model output that has its dimensionality reduced

See also

combine_to_age_model

Examples


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