Skip to contents

Plot species-specific intercepts for occupancy and detection, by default back-transformed to the original scale.

Usage

plot_intercepts(
  fit,
  back_transform = TRUE,
  by_region = FALSE,
  species = NULL,
  regions = NULL,
  ...
)

Arguments

fit

A fitted model object from occARU().

back_transform

logical. If TRUE (default), intercepts are back-transformed to the natural scale via inv_logit() for occupancy and exp() for detection rates. If FALSE, values are left on the scale of the link functions (logit for occupancy and log for detection).

by_region

logical. Whether to plot intercepts by region, if multiple regions were included.

species

character. Vector of species to plot. If NULL (default), all species are plotted. Must be one of attr(occARU_data, "species").

regions

character. Vector of regions to plot. If NULL (default), all regions are plotted. Must be one of attr(occARU_data, "regions").

...

Additional arguments passed to ggdist::stat_pointinterval().

Value

A ggplot object with occARU-specific attributes attached:

plot_data

The tibble used to produce the plot.