combine_strat_model_output: Reduces the Dimensionality of a Stratified Model

Description Usage Arguments Value See Also Examples

View source: R/combine_strat_model_output.R

Description

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.

Usage

1
2
3
4
5
6
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

1
2
df <- data.frame(S1 = NA, S2 = NA, S3 = NA, time = NA)
combine_strat_model_output(df, 3, compartments = "S", hold_out_var = "time")

idmodelr documentation built on July 1, 2020, 7:40 p.m.