Skip to contents

Compare density distributions of observed, predicted, and simulated growth increments.

Usage

plot_growth_density(
  data,
  obj,
  report = NULL,
  simulate = NULL,
  nsim = 10,
  type = 1,
  ncut = 4
)

Arguments

data

a list containing model data including tag-recapture observations.

obj

a fitted TMB model object used for simulation.

report

a list of model report values; computed from obj if NULL.

simulate

an optional list of simulated values, such as obj$simulate(par = obj$env$last.par.best), used as the first simulation draw.

nsim

an integer specifying the number of simulations to draw.

type

an integer specifying plot type: 1 = by sex, 2 = by sex and time at liberty, 3 = by sex and release size.

ncut

an integer specifying the number of quantile bins for faceting.

Value

a ggplot object.