Learn R Programming

occumb: Site Occupancy Modeling for Environmental DNA Metabarcoding

occumb is an R package that provides functionalities for the application of community site occupancy modeling for environmental DNA (eDNA) metabarcoding.

This package allows users to fit the model with a fully Bayesian approach using conventional formulas in R. This enables the analysis of the detectability of species at different stages of the workflow of eDNA metabarcoding and the inference of species site occupancy while accounting for false negatives. It also provides functionality for model-based inference to assist in the optimization of the study design.

See the package vignette to learn how to use the package and the original paper for details of the model and inference. The subsequent paper provides an overview of the occumb package and an example of its application to the eDNA metabarcoding of aquatic insects.

Installation

You need first install JAGS following the instructions on the JAGS homepage.

You can then install the latest stable version of the package from CRAN:

install.packages("occumb")

or the GitHub repository:

remotes::install_github("fukayak/occumb", ref = "main")

Contact information

Questions and bug reports can be emailed to Keiichi Fukaya (fukaya.keiichi@nies.go.jp).

Credits

The development of occumb would not have been possible without, among others, Martyn Plummer's JAGS and Ken Kellner's jagsUI R package, because the main functionality of occumb for model fitting via Markov chain Monte Carlo (MCMC) relies on these libraries. Taku Kadoya encouraged us to develop this package. Koji Makiyama, Shinya Uryu, and Kentaro Matsuura contributed to package testing. Mito Ikemoto and Kentaro Uehira provided valuable feedback through package trials and documentation reviews. Funding was provided by Japan Society for the Promotion of Science (KAKENHI; Nos. 20K06102 and 23H02240).

Copy Link

Version

Install

install.packages('occumb')

Monthly Downloads

478

Version

1.2.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Keiichi Fukaya

Last Published

July 16th, 2025

Functions in occumb (1.2.1)

get_posterior

Extract posterior samples or summary of parameters from a model-fit object.
gof

Goodness-of-fit assessment of the fitted model.
eval_util_R

Expected utility for regional species diversity assessments.
fish

Fish eDNA metabarcoding dataset
list_cond_L

Conditions for local assessment under certain budget and cost values.
list_cond_R

Conditions for regional assessment under certain budget and cost values.
eval_util_L

Expected utility for local species diversity assessments.
occumb

Model-fitting function.
occumbData

Constructor for occumbData data class.
predict,occumbFit-method

Predict method for occumbFit class.
summary,occumbData-method

Summary method for occumbData class.
plot,occumbFit-method

Plot method for occumbFit class.
plot,occumbGof-method

Plot method for occumbGof class.
fish_raw

Fish eDNA metabarcoding dataset
summary,occumbFit-method

Summary method for occumbFit class.