combine_strat_model_output: Reduces the Dimensionality of a Stratified Model

View source: R/combine_strat_model_output.R

combine_strat_model_outputR Documentation

Reduces the Dimensionality of a Stratified Model

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

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")


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