Plot predictor coefficients
plot_coefficients.RdPlots coefficients of continuous, categorical, or ordinal predictors on occupancy or detection submodels.
Arguments
- fit
A fitted model object from
fit_model().- submodel
character. Predictors of submodel to plot. One of"detection"(default) or"occupancy".- component
character. Whether to plot"site"(default) or"survey"predictors. If"survey",submodelmust be"detection".- type
character. Type of predictors to plot. One of"continuous"(default),"categorical", or"ordinal".- level
character. For multi-species models, whether to plot species-specific ("species", default) or mean coefficients ("mean").- facet_by
character. Whether to useggplot2::facet_wrap()orggh4x::facet_grid2()to facet by"predictor"(default) or"species". Only used iflevelis"species".- species
character. Vector of species to plot. IfNULL(default), all species are plotted. Must be one ofattr(occARU_data, "species").- restricted
logical. IfTRUE(default), plots coefficients with orthogonal projection of the detection random site or survey effects, e.g., \(\boldsymbol{\iota}(\boldsymbol{I} - \boldsymbol{P_{X_2}})\), where \(\boldsymbol{I} - \boldsymbol{P_{X_2}}\) is the orthogonal complement of the column space of the site or survey design matrix. IfFALSE, recovers coefficients without orthogonal projection, \(\boldsymbol{\beta} - \boldsymbol{\iota} \boldsymbol{X_2}^+\), where \(\boldsymbol{X_2}^+\) is the pseudo-inverse of the design matrix. Only used for site predictors ifsubmodelis"detection", or if survey random effects were also projected withproject_kappa = TRUEinfit_model().- ordinal_categories
logical. IfFALSE(default), plots coefficients associated with maximum category (full effect). IfTRUE, plots realised coefficient associated with each ordered category, where the first is used as the reference.- ...
Additional arguments passed to
ggdist::stat_pointinterval().