MyNixOS website logo
Description

Flexible Occupancy Estimation with Stan.

Fit occupancy models in 'Stan' via 'brms'. The full variety of 'brms' formula-based effects structures are available to use in multiple classes of occupancy model, including single-season models, models with data augmentation for never-observed species, dynamic (multiseason) models with explicit colonization and extinction processes, and dynamic models with autologistic occupancy dynamics. Formulas can be specified for all relevant distributional terms, including detection and one or more of occupancy, colonization, extinction, and autologistic depending on the model type. Several important forms of model post-processing are provided. References: Bürkner (2017) <doi:10.18637/jss.v080.i01>; Carpenter et al. (2017) <doi:10.18637/jss.v076.i01>; Socolar & Mills (2023) <doi:10.1101/2023.10.26.564080>.
flocker logo

flocker: flexible occupancy estimation in R

R-CMD-check CoverageStatus

The flocker R package enables users to fit flexible occupancy models using the extended lme4 formula syntax provided by R package brms. Also included are functions to format data for occupancy modeling and functions for model post-processing, including posterior predictions, the posterior distribution of the latent true occupancy state, and model comparison. flocker is under active development: development priorities include better integrated functionality for posterior predictive checking and full cross-validation.

Compared to existing R packages for fitting occupancy models, flocker is substantially more flexible in the variety of models that can be fit, and contains advanced functionality for model comparison and checking.

Getting started

To get started, check out our tutorial vignette, available here and our introductory paper, available here. For installation instructions, see below.

Installation

Install the latest CRAN release of flocker with

install.packages("flocker")

Install the current development version of flocker with

# install.packages("remotes")
remotes::install_github("jsocolar/flocker")

flocker requires a working version of either rstan or cmdstan, which are interfaces to Stan, a state-of-the-art the probabilistic programming language. We recommend using cmdstan if possible. To do so, first install R package cmdstanr with

install.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))

You must additionally install cmdstan itself. We strongly recommend using cmdstanr to manage the cmdstan installation:

cmdstanr::install_cmdstan()

Both rstan and cmdstan require a working C++ toolchain, which has posed occasional complications for Stan users. See here for rstan focused advice on installing the toolchain, and see here for cmdstan focused advice. If you encounter toolchain issues that you are unable to troubleshoot, ask for help at https://discourse.mc-stan.org/.

Bugs, features, contributions

To request a feature or report a bug (much appreciated!) please open an issue at the GitHub repository. To contribute to flocker (very much appreciated!) have a look at existing open issues, or open a new issue to discuss.

Citing flocker

When using flocker, please cite the companion manuscript:

  • Socolar, J.B. & Mills, S.C. (2023). "Introducing flocker: an R package for flexible occupancy modeling via brms and Stan." https://doi.org/10.1101/2023.10.26.564080

Additionally, please consider citing Stan and R package brms.

AI generated
Metadata

Version

1.0-0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows