Learn R Programming

camtrapR (version 2.2.0)

plot_coef,commOccu-method: Plot effect sizes of covariates in community occupancy model

Description

Plot effect sizes for all species in a community (multi-species) occupancy model. Currently only supports continuous covariates, not categorical covariates.

Usage

# S4 method for commOccu
plot_coef(
  object,
  mcmc.list,
  submodel = "state",
  ordered = TRUE,
  combine = FALSE,
  outdir,
  level = c(outer = 0.95, inner = 0.75),
  colorby = "significance",
  ...
)

Arguments

object

commOccu object

mcmc.list

mcmc.list. Output of fit called on a commOccu object

submodel

Submodel to get plots for. Can be "det" or "state"

ordered

logical. Order species in plot by median effect (TRUE) or by species name (FALSE)

combine

logical. Combine multiple plots into one (via facets)?

outdir

Directory to save plots to (optional)

level

Probability mass to include in the uncertainty interval (two values, second value - inner interval - will be plotted thicker)

colorby

Whether to color estimates by "significance" (of the effect estimates), or "Bayesian p-value" (of the species)

...

additional arguments for ggsave

Value

list of ggplot objects