Skip to contents

Front door

One fitter; the model is chosen by the family object.

tobs()
Fit a hierarchical latent-state observation model
tobs_data()
Convert long-format data to a site x visit observation object
tobs_format()
Format occupancy data from matrices/lists
tobs_format_ms()
Format multi-species occupancy data
tobs_check_id()
Check model identifiability
tobs_terms icar bym2 car_proper gp multiscale_gp spde svc re temporal latent spatial
Structured terms inside a tobs() formula
tobs_get()
Extract one species' fit from a batched occu_cover fit.
print(<tobs_family>)
Print method for tobs_family

Occupancy families

occu()
Single-season occupancy family
dyn_occu()
Dynamic (multi-season) occupancy family
int_occu()
Integrated occupancy family
dyn_int_occu()
Multi-season integrated occupancy family
ms_occu()
Multispecies (community) single-season occupancy family
ms_dyn_occu()
Community (multispecies) dynamic occupancy family
ms_int_occu()
Community (multispecies) integrated occupancy family
jsdm()
Joint species distribution family (no detection process)
t_occu()
Multi-season occupancy with a temporal (AR1) year effect (tPGOcc)
fp_occu()
Multistate false-positive occupancy family
fp_occu_laplace()
Maximum-likelihood fit of the multistate false-positive occupancy model
royle_nichols()
Royle-Nichols occupancy family
occu_ttd()
Time-to-detection occupancy family
occu_multi()
Multi-species co-occurrence occupancy family
occu_categorical()
Presence + nominal class hurdle family
occu_priors()
Weakly-informative priors for occupancy Laplace fits

Abundance, distance and removal families

abun()
N-mixture abundance family
ms_abun()
Multispecies N-mixture family
dyn_abun()
Open-population (Dail-Madsen) N-mixture family
dyn_abun_laplace()
Maximum-likelihood fit of the Dail-Madsen open N-mixture
count()
Count / relative-abundance GLMM family (no detection process)
ms_count()
Multispecies (community) relative-abundance GLMM family
distance()
Binned distance-sampling family
distance_laplace()
Laplace fit of the binned distance-sampling abundance model
ms_distance()
Community (multispecies) binned distance-sampling family
distsamp_open()
Open-population distance-sampling family
gdistremoval()
Joint distance + removal sampling family
removal()
Removal-sampling family
removal_laplace()
Laplace fit of the removal-sampling abundance model
double_observer()
Double-observer abundance family
nmix_laplace()
Laplace fit of the Royle (2004) N-mixture model
nmix_laplace_bym2()
BYM2 Royle (2004) N-mixture model via nested Laplace
nmix_laplace_car_proper()
Proper CAR Royle (2004) N-mixture model via nested Laplace
nmix_laplace_icar()
Spatial Royle (2004) N-mixture model via nested Laplace
nmix_laplace_re()
Community / multispecies N-mixture by Laplace
nmix_site_marginal()
Per-site N-mixture marginal as a composable random-effect callback

Cover families

cover()
Cover hurdle family (vegetation cover, MOTIVATE pattern)
occu_cover()
Joint occupancy-detection + cover hurdle family
occu_cover_inputs()
Build occu_cover() model inputs from a long, plot-level frame
ms_occu_cover()
Community (multispecies) joint occupancy-detection + cover family
occu_multiscale_cover()
Three-level (multiscale) occupancy + cover hurdle family
cover_priors()
Weakly-informative priors for cover-hurdle Laplace fits
occu_aggregation_scan()
Suggest spatial and temporal aggregation for an identifiable occupancy model
plot(<tobs_aggregation_scan>)
Plot an occupancy aggregation scan

Fit accessors

S3 methods on tobs_fit.

print(<tobs_fit>)
Print method for tobs_fit
summary(<tobs_fit>)
Summary for tobs_fit, with skewness column when simplified Laplace is used
coef(<tobs_fit>)
Coefficients for a tobs_fit
coef(<tobs_batch>)
Per-species coefficients from a batched occu_cover fit.
print(<tobs_batch>)
Print a batched multi-response occu_cover fit.
tidy(<tobs_fit>)
Coefficient table for a tobs_fit
glance(<tobs_fit>)
One-row model summary for a tobs_fit
fitted(<tobs_fit>)
Fitted values (occupancy and detection probabilities)
residuals(<tobs_fit>)
Residuals from occupancy model
ranef(<tobs_fit>)
Random-effect estimates (BLUPs) for a tobs_fit
logLik(<tobs_fit>)
Log-likelihood of a tobs fit
nobs(<tobs_fit>)
Number of observations
update(<tobs_fit>)
Update and refit a tobs model
predict(<tobs_fit>)
Predict from occupancy model
predict(<cover_fit>)
Predict cover from a cover_fit
predict(<occu_categorical_fit>)
Predict from an occu_categorical fit
simulate(<tobs_fit>)
Simulate replicate datasets from the posterior
`$`(<tobs_fit>)
Access spOccupancy-compatible fields from tobs fits
tobs_predict_spatial()
Predict the state process at new spatial locations
tobs_marginal_effect()
Compute marginal effect of a covariate
tobs_richness()
Estimate species richness from community model
tobs_associations()
Residual species-association matrices from a spatial-factor community fit
nobs(<tobs_multiarm_fit>) coef(<tobs_multiarm_fit>) vcov(<tobs_multiarm_fit>) confint(<tobs_multiarm_fit>) logLik(<tobs_multiarm_fit>) glance(<tobs_multiarm_fit>) tidy(<tobs_multiarm_fit>) summary(<tobs_multiarm_fit>) plot(<tobs_multiarm_fit>) fitted(<tobs_multiarm_fit>) residuals(<tobs_multiarm_fit>)
S3 methods for multi-arm fits

Diagnostics and model comparison

check_model(<tobs_fit>)
Comprehensive model checking
pit_residuals(<tobs_fit>)
PIT residuals for a tobs fit
ppc()
Posterior predictive check
sbc(<tobs_fit>)
Simulation-based calibration for a fitted tobs model
test_dispersion(<tobs_fit>) test_zero_inflation(<tobs_fit>) test_outliers(<tobs_fit>)
Goodness-of-fit tests for a tobs fit
waic(<tobs_fit>) loo(<tobs_fit>) dic(<tobs_fit>) cpo(<tobs_fit>) pointwise_loglik(<tobs_fit>)
Model criteria for occupancy / cover models
tobs_stack() print(<tobs_stack>) fitted(<tobs_stack>) predict(<tobs_stack>)
Stack fitted models into a LOO-weighted ensemble
convergence() converged()
Convergence record for a fitted model

Simulation

simulate_abun()
Simulate Royle (2004) N-mixture abundance data
simulate_count()
Simulate count / relative-abundance GLMM data
simulate_cover()
Simulate cover-hurdle data (lognormal positive part)
simulate_cover_joint()
Simulate cover-hurdle data with a shared BYM2 spatial field
simulate_distance()
Simulate binned distance-sampling abundance data
simulate_distsamp_open()
Simulate an open-population distance-sampling data set
simulate_double_observer()
Simulate a double-observer abundance data set
simulate_dyn_abun()
Simulate Dail-Madsen open N-mixture data
simulate_dyn_int_occu()
Simulate a multi-season integrated occupancy data set
simulate_dyn_occu()
Simulate temporal (multi-season) occupancy data
simulate_fp_occu()
Simulate multistate false-positive occupancy data
simulate_gdistremoval()
Simulate a joint distance + removal data set
simulate_int_occu()
Simulate integrated (multi-source) occupancy data
simulate_jsdm()
Simulate joint species distribution (presence/absence) data
simulate_ms_abun()
Simulate community (multispecies) N-mixture abundance data
simulate_ms_count()
Simulate community relative-abundance (count / continuous) data
simulate_ms_distance()
Simulate community (multispecies) binned distance-sampling data
simulate_ms_dyn_occu()
Simulate temporal multi-species occupancy data
simulate_ms_int_occu()
Simulate integrated multi-species occupancy data
simulate_ms_occu()
Simulate multi-species occupancy data
simulate_ms_occu_cover()
Simulate community (multispecies) joint occupancy-cover data
simulate_ms_occu_cover_spatial()
Simulate a reduced-rank spatial-factor community occu_cover data set (K = 1)
simulate_occu()
Simulate single-species occupancy data
simulate_occu_categorical()
Simulate from an occu_categorical model
simulate_occu_cover()
Simulate joint occupancy-detection + cover data
simulate_occu_multi()
Simulate a multi-species co-occurrence occupancy data set
simulate_occu_multiscale_cover()
Simulate a three-level occupancy + cover hurdle data set
simulate_occu_ttd()
Simulate a time-to-detection occupancy data set
simulate_removal()
Simulate removal-sampling abundance data
simulate_royle_nichols()
Simulate Royle-Nichols occupancy data
simulate_t_occu()
Simulate multi-season occupancy with an AR1 year effect (tPGOcc)

Data and utilities

foray_counts
Repeated point-count abundance survey (synthetic)
meadow_cover
Grassland vegetation-cover panel (synthetic)
peatland_occu
Peatland occupancy survey (synthetic)
summary(<tobs_data>)
Summarise occupancy data
plot(<tobs_data>)
Plot detection history patterns
within_between()
Within / between (Mundlak) decomposition for longitudinal data