Skip to contents

Creates a plot of the normalized posterior distributions of the growth rates. The distributions are renormalized so that their highest peak is at 1. Optionally, the prior distribution can be included in the plot.

Usage

plot_normalized_growth_rate_posteriors(
  x,
  add_prior = F,
  legend_labels = NULL,
  legend_title = "group",
  colors = NULL
)

Arguments

x

A bipod object that contains a 'fit' field.

add_prior

Logical value indicating whether to plot the prior distribution along with the posterior distributions. (default is FALSE)

legend_labels

Vector of labels for each unique fitted parameter. (default is NULL, in which case 'rho' is used)

legend_title

Title for the legend. (default is 'group')

colors

Colors to use for the different growth rate posteriors. (default is NULL, which uses the default group colors)

Value

A ggplot2 object containing the posterior density plots of the growth rates and optionally the prior density plot.