Plot effect sizes for all species in a community (multi-species) occupancy model. Currently only supports continuous covariates, not categorical covariates.
# 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",
scales = "free_y",
community_lines = FALSE,
...
)
A list of ggplot objects (one list item per covariate).
commOccu
object
mcmc.list. Output of fit
called on a commOccu
object
character. Submodel to get plots for. Can be "det"
or "state"
logical. Order species in plot by median effect (TRUE) or by species name (FALSE)
logical. Combine multiple plots into one plot (via facets)?
character. Directory to save plots to (optional)
numeric. Probability mass to include in the uncertainty interval (two values named "outer" and "inner", in that order). Second value (= inner interval) will be plotted thicker.
character. Whether to color estimates by "significance"
(of the effect estimates), or "Bayesian p-value"
(of the species). Currently allows only "significance"
.
character. Passed to facet_grid
. Can be "free"
to scale x axes of effect estimates independently, or "free_y" to scale all x axes identically.
logical. Add faint vertical lines to the plot indicating median community effect (solid line) and its confidence interval (first value from level
).
additional arguments for ggsave
- only relevant if outdir
is defined.
Users who wish to create their own visualizations can use the data stored in the ggplot output. It is accessed via e.g. output$covariate_name$data