Learn R Programming

idmodelr (version 0.4.0)

combine_strat_model_output: 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
)

Value

A dataframe of model output that has its dimensionality reduced

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

See Also

combine_to_age_model

Examples

Run this code

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

Run the code above in your browser using DataLab