Spatial Capture-Recapture (SCR) Methods Using 'nimble'
Overview
Provides utility functions, distributions, and fitting methods for Bayesian Spatial Capture-Recapture (SCR) and Open Population Spatial Capture-Recapture (OPSCR) modelling using the nimble package (de Valpine et al. 2017 <doi:10.1080/10618600.2016.1172487 >). Development of the package was motivated primarily by the need for flexible and efficient analysis of large-scale SCR data (Bischof et al. 2020 <doi:10.1073/pnas.2011383117 >). Computational methods and techniques implemented in nimbleSCR include those discussed in Turek et al. 2021 doi:10.1002/ecs2.3385; among others. For a recent application of nimbleSCR, see Milleret et al. (2021) doi:10.1098/rsbl.2021.0128.
-- Add dcatState1Alive1Dead(), dcatState1Alive2Dead(), and dcatState2Alive2Dead() to sample state transition based on spatial probabilities.
-- Add sampler_categorical_general() to allow the addition of categorical samplers
-- Add calculateDensity() to calculate the density of individual in each habitat cell.
-- fix bug in the registration of dbernppDetection_normal().
From inst/NEWS in the release
Install
Health
NOTERd filesr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
checkRd: (-1) dcatState1Alive1Dead.Rd:58: Lost braces; missing escapes or markup?
58 | If z_{i,t} = 1, individual i can be recruited (transition to state 2) with probability prob1To2_t, so z_{i,t+1} ~ dcat(1- prob1To2_t, prob1To2_t, 0,0 , 0) where prob1To2_t represent the probability of an unborn individual to be recruited.
| ^
checkRd: (-1) dcatState1Alive1Dead.Rd:58: Lost braces; missing escapes or markup?
58 | If z_{i,t} = 1, individual i can be recruited (transition to state 2) with probability prob1To2_t, so z_{i,t+1} ~ dcat(1- prob1To2_t, prob1To2_t, 0,0 , 0) where prob1To2_t represent the probability of an unborn individual to be recruited.
| ^
checkRd: (-1) dcatState1Alive1Dead.Rd:59: Lost braces; missing escapes or markup?
59 | If z_{i,t} = 2, individual i can die and transition to z_{i,t+1}=3 with probability prob2To3, or survive with probabil
...[truncated]...
ng for a single node, which must in essence follow a categorical distribution. However, the prior distribution need not be \code{nimble}'s \code{dcat} distribution, but rather can be any (potentially user-defined) distribution which has the same support as a standard categorical (\code{dcat}) distribution. Specifically: the distribution must define a discrete random variable, which can only attain values from the set {1, 2, 3, ..., \code{numCategories}}.
| ^NOTEdependencies in R coder-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Namespace in Imports field not imported from: ‘methods’ All declared Imports should be used.
- NOTE13 NOTENow
- NOTE14 NOTE2026-03-10
Documentation
- Help pages
- 42 (2 internal)
- Examples that run
- 90%37 run in a plain check · 4 never run
- Exported functions with examples
- 98%
- Documented parameters
- 85%
- Return-value docs
- 88%
- Help pages citing references
- 45%
- Fit with half-normal plateau detection function and home range size estimation using nimbleSCR package HTML
- Point process Bayesian SCR models with nimbleSCR HTML
- Using nimbleSCR to fit 'point process SCR models' to wolverine (Gulo gulo) non-invasive genetic sampling data HTML
- Using nimbleSCR to simulate and fit Bayesian SCR models HTML
- Wolverine Example HTML
Downloads
Dependencies
Installing nimbleSCR adds 14 packages (7 with compiled code, 12 MB of source tarballs). Heaviest: igraph 4.8 MB, nimble 3.2 MB, vctrs 1.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.2.1Latest2022-11-30 · current release · diff ↗ ·
added 8 exports
calculateDensity, dcatState1Alive1Dead, dcatState1Alive2Dead, dcatState2Alive2Dead, rcatState1Alive1Dead, rcatState1Alive2Dead, rcatState2Alive2Dead, sampler_categorical_general - 0.2.02022-09-02 · diff ↗ ·
removed 3 exports
dbinom_sparseLocalSCR, getLocalTraps, rbinom_sparseLocalSCRadded 7 exports
dbinomLocal_exp, dbinomLocal_normalPlateau, dmultiLocal_normal, getHomeRangeArea, rbinomLocal_exp, rbinomLocal_normalPlateau, rmultiLocal_normal - RR 4.2.0 released · 2022-04-22
- 0.1.32021-10-25 · diff ↗ ·
added 35 exports
calcWindowSizes, dbernppAC, dbernppACmovement_exp, dbernppACmovement_normal, dbernppDetection_normal, dbernppLocalACmovement_exp, dbernppLocalACmovement_normal, dbernppLocalDetection_normal, dnormalizer, dpoisppAC, dpoisppDetection_normal, dpoisppLocalDetection_normal, getMidPointNodes, getWindowCoords, getWindowIndex, integrateIntensityLocal_exp, integrateIntensityLocal_normal, integrateIntensity_exp, integrateIntensity_normal, makeConstantNimbleFunction, marginalVoidProbIntegrand, marginalVoidProbNumIntegration, rbernppAC, rbernppACmovement_exp, rbernppACmovement_normal, rbernppDetection_normal, rbernppLocalACmovement_exp, rbernppLocalACmovement_normal, rbernppLocalDetection_normal, rnormalizer and 5 more - 0.1.2
- RR 4.1.0 released · 2021-05-18
- 0.1.12021-01-07 · diff ↗ ·
added 4 exports
dbinomLocal_normal, getLocalObjects, rbinomLocal_normal, scaleCoordsToHabitatGrid - 0.1.02020-08-20
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2020-08-20
- Total releases
- 6 / 6 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 4.4 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("nimbleSCR")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.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.