Skip to contents

Joins two enriched parameter data frames for side-by-side comparison. Both inputs should be prepared using the standard pipeline: get_parameters() |> apply_table_spec() |> add_summary_info(). Can also be chained by passing an existing hyperion_comparison object as params1 to add another model comparison.

Usage

compare_with(
  params1,
  params2,
  labels = c("Model 1", "Model 2"),
  reference_model = NULL
)

Arguments

params1

Enriched parameter data frame from model 1

params2

Enriched parameter data frame from model 2

labels

Model labels used in table headers. For an initial 2-model comparison, supply length 2 (default: c("Model 1", "Model 2")). For chained comparisons (params1 is already a hyperion_comparison): length 1 appends a label for the new model; length 2 renames the previous latest label to labels[1] and appends labels[2] for the new model.

reference_model

Character string specifying which model to use as reference for percent change calculations. Must match a model already in the comparison by run_name or label (file extensions are ignored). When NULL (default), percent change is calculated relative to the previous model in the chain.

Value

Data frame with class hyperion_comparison containing joined parameter data with suffixed columns and comparison attributes.