Skip to content

flocker

1.1-0Package record

Flexible Occupancy Estimation with Stan

0packages depend
3.1Kdownloads / year
93.6%test coverage
13/13flavors OK

Overview

About

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.

Changes in 1.1-0
  • Added the twolevel_single model family for single-season occupancy models in which groups of closure units may themselves be structurally absent. Users specify the grouping factor with level2_group, may supply a separate table of group-level predictors with level2_covs, and model group-level occupancy with f_meta.
  • Refactored the data-augmented model as a special case of the general two-level model, with shared data formatting, likelihood, fitting, and post-processing machinery.
  • Breaking change for augmented models: every species supplied in the original obs array must have at least one detection. Never-observed pseudospecies must instead be added through n_aug.
  • Breaking change for augmented models: get_Z() now returns a list containing unit states for species-site combinations and level2 states for species. Generic two-level models use the same return structure. Joint samples from the two levels are mutually consistent.
Show all changes in 1.1-0Hide the rest of the changes in 1.1-0
  • Two-level outputs from get_Z(), log_lik_flocker(), and loo_flocker() now retain user-supplied group names. Augmented models similarly retain supplied species names and assign stable names to augmented pseudospecies.
  • Improved the numerical stability of two-level log-likelihood calculations by evaluating occupancy mixtures in log space.
  • Corrected backward smoothing and backward sampling of latent states from multiseason models so that both use the appropriate transition probabilities and future-data likelihoods.
  • Corrected history-conditioned get_Z() calculations for augmented models and when using new_data, including rep-constant models. Augmented group-level probabilities now marginalize over unit occupancy and incorporate the fitted group-level occupancy probability.
  • Fixed expansion of user-supplied unit and event covariates in simulate_flocker_data() so that values are shared across species at each unit or visit, and allowed make_flocker_data() to accept data-frame observation inputs as documented.
  • Fixed reconstruction of maximally ragged observation and covariate arrays, including multiseason data with a final season that is unobserved in every series, and made post-processing robust when exactly one posterior draw is requested.
  • Fitted models and formatted data objects are now tagged with the version of flocker that created them. Two-level packing metadata is stored separately from the underlying brmsfit data.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 15.3 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-10-20
  • ERROR12 OK, 1 ERROR2026-09-04
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
Show 6 earlier changesHide 6 earlier changes
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK13 OK2026-05-10
  • WARNING12 OK, 1 WARNING2026-05-09
  • OK14 OK2026-04-22
  • ERROR13 OK, 1 ERROR2026-04-18
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.1-0
READMEYes · 348 wordsVignettesYes · 5 · dynamicNEWSYes · 100% structured · mentions 1.1-0Citation fileNoWebsiteYes · pkgdown

The repository also keeps web-only articles.

Description cites a JSS article
Help pages
21
Examples that run
50%8 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran) · 7 never run
Exported functions with examples
84%
Documented parameters
100%
Return-value docs
95%
Help pages citing references
0%

Downloads

3.1K
CRAN downloads in the past year
Rank #8,280 · ~8/day · ~257/mo
Daily download trend is not available in this view yet.
40930 days
1.1K90 days
3.1K1 year
Compare downloads with other packages →
Also on112 r2u2 autocran

Repository

33Stars
7Forks
8Open issues
2Open PRs
0Releases
615Commits
7Commit identities
615 commits · Last activity 2026-10-16 · 0% stars, 30d · Default branch at 1.1-1, ahead of CRAN 1.1-0 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
95%
Median days to close, 50 most recently updated closed issues
36
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-07-29 · 312026-08-08 · 33
PracticesBeta

9 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/jsocolar/flocker on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-10-16 · The repository has a site deploy workflow

Coverage (1)
Coverage reporting
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 1 practice
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
14 external dependencies (excludes base and recommended)

Installing flocker adds 73 packages (35 with compiled code, 75 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.

Depends (1)
R >= 4.1.0
Imports (10)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (3)
Author, Maintainer since 1.0-0 (2024), Copyright holder
Releases (3)

Pick two releases to compare their code metrics.

  • 1.1-0Latest
    record
    2026-10-16 · current release · diff ↗ ·
    added 1 export
    make_flocker_data_twolevel_single
    ·
    listed once in CRAN's queue
    Seen in one reading of CRAN's incoming queue, at 2026-10-16 02:28 UTC, so it stayed less than the time between readings.
  • 1.0-2
    record
    2026-06-22 · diff ↗ ·
    added 1 export
    example_flocker_model_single
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 1.0-0
    record
    2024-02-05
  • R
    R 4.3.0 released · 2023-04-21
Across CRAN, the median accepted release of the past year spent 26 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2024-02-05
Total releases
3 / 2 yrs
License
BSD_3_clause + file LICENSE OSI
Minimum R
≥ 4.1.0
Bundled data
3.8 KB / 1 file
Download size
6.1 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("flocker")
Socolar, J. B., Bürkner, P., & Mills, S. C. (2026). flocker: Flexible Occupancy Estimation with Stan (Version 1.1-0) [Computer software]. https://doi.org/10.32614/CRAN.package.flocker

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for flocker version 1.1-0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy