Skip to contents

Creates a plot of the fit over the input data for a model with two populations. The plot can display the fit for each population separately and optionally include posteriors for key parameters.

Usage

plot_two_pop_fit(
  x,
  CI = 0.95,
  f_posteriors = TRUE,
  t_posteriors = TRUE,
  r_posteriors = TRUE,
  split_process = TRUE,
  resistant_color = "steelblue",
  sensitive_color = "indianred"
)

Arguments

x

A bipod object. Must contain a 'two_pop_fit' field.

CI

Numeric value representing the confidence interval for the growth rate to plot. (default is 0.95)

f_posteriors

.

t_posteriors

.

r_posteriors

.

split_process

Logical value indicating whether to plot the dynamics of the two populations separately. (default is FALSE)

resistant_color

.

sensitive_color

.

Value

A ggplot2 object showing the fit over the input data.