wave_dependencies: Multiple Wave Inputs vs Outputs

View source: R/multiwaveplot.R

wave_dependenciesR Documentation

Multiple Wave Inputs vs Outputs

Description

Given multiple waves of points, produce input-output plots for each pair.

Usage

wave_dependencies(
  waves,
  targets,
  output_names = names(targets),
  input_names = names(waves[[1]])[!names(waves[[1]]) %in% names(targets)],
  p_size = 1.5,
  l_wid = 1.5,
  normalize = FALSE,
  zero_in = TRUE,
  wave_numbers = ifelse(zero_in, 0, 1):(length(waves) - ifelse(zero_in, 1, 0)),
  ...
)

Arguments

waves

The list of data.frame objects, one for each set of outputs at that wave.

targets

The target values of the outputs.

output_names

The outputs to plot, if not all are wanted.

input_names

The inputs to plot, if not all are wanted.

p_size

Control for the point size on the plots: smaller is better for many plots.

l_wid

Control for line width of superimposed targets.

normalize

If true, plotting is done with target bounds equal size.

zero_in

Is a wave 0 included in the waves list?

wave_numbers

Which waves to plot

...

Optional parameters (not to be used directly)

Details

It can be useful to consider what the dependencies between the input values and output values are, to investigate the suitability of the chosen input ranges (i.e. if widening an input range could result in the targets being matchable). This function provides those plots.

For each output-input pair, a points plot is produced with the input value on the x-axis and the output value on the y-axis. The target bounds are superimposed as horizontal lines. The points themselves are coloured by which wave of history matching they came from.

These can show dependencies between specific outputs and inputs and, if points are clustering at the far left or right edge of a plot, can give an indication that the input ranges are unsuitable for matching the target.

Value

A grid of ggplot objects.

See Also

Other visualisation tools: behaviour_plot(), diagnostic_wrap(), effect_strength(), emulator_plot(), hit_by_wave(), output_plot(), plot_actives(), plot_lattice(), plot_wrap(), simulator_plot(), space_removed(), validation_pairs(), wave_points(), wave_values()

Examples

 wave_dependencies(SIRMultiWaveData, SIREmulators$targets, l_wid = 0.8, p_size = 0.8)
 wave_dependencies(SIRMultiWaveData, SIREmulators$targets, c('nS', 'nI'), c('aIR', 'aSI'))
 
     # For many plots, it may be helpful to manually modify the font size
     wave_dependencies(SIRMultiWaveData, SIREmulators$targets) +
      ggplot2::theme(text = ggplot2::element_text(size = 5))
 

hmer documentation built on June 22, 2024, 9:22 a.m.