Package: raretrans 1.0.5

Raymond Tremblay

raretrans: Bayesian Priors for Matrix Population Models

Provides functions to correct biased transition and fertility estimates in population projection matrices caused by small sample sizes. Small or short-term studies frequently produce structural zeros (biologically possible transitions never observed) and structural ones (transitions estimated at 100% survival, stasis, or mortality that are biologically implausible). Both distort matrix structure and bias estimates of population growth. Implements a multinomial-Dirichlet Bayesian prior for transition probabilities and a Gamma-Poisson prior for reproduction, allowing analysts to incorporate prior biological knowledge and regularise estimates from rare or unobserved events. Includes functions to compute marginal posterior credible intervals for all transition probabilities (transition_CrI()), visualise those intervals as point-range plots (plot_transition_CrI()), and display the full posterior beta density for each matrix entry (plot_transition_density()). Methods are described in Tremblay et al. (2021) <doi:10.1016/j.ecolmodel.2021.109526>.

Authors:Raymond Tremblay [aut, cre, cph], Andrew Tyre [aut, cph], Maria-Eglee Perez [aut], Sasha Tenhumberg [ctb]

raretrans_1.0.5.tar.gz
raretrans_1.0.5.zip(r-4.7-any)raretrans_1.0.5.zip(r-4.6-any)raretrans_1.0.5.zip(r-4.5-any)
raretrans_1.0.5.tgz(r-4.6-any)raretrans_1.0.5.tgz(r-4.5-any)
raretrans_1.0.5.tar.gz(r-4.7-any)raretrans_1.0.5.tar.gz(r-4.6-any)
raretrans_1.0.5.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
raretrans/json (API)

# Install 'raretrans' in R:
install.packages('raretrans', repos = c('https://atiretoo.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/atiretoo/raretrans/issues

Pkgdown/docs site:https://atiretoo.github.io

Datasets:
  • L_elto - Transition and recruitment data for _Lepanthes eltoroensis_

On CRAN:

Conda:

6.24 score 24 scripts 388 downloads 9 exports 17 dependencies

Last updated from:b1f2e5c426. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK146
source / vignettesOK226
linux-release-x86_64OK146
macos-release-arm64OK146
macos-oldrel-arm64OK217
windows-develOK91
windows-releaseOK94
windows-oldrelOK89
wasm-releaseOK135

Exports:fill_fertilityfill_transitionsget_state_vectorplot_transition_CrIplot_transition_densityrdirichletrun_appsim_transitionstransition_CrI

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglifecycleR6RColorBrewerrlangS7scalesvctrsviridisLitewithr

05 Effect of prior information on transition probabilities and fertility
Borrowing strength | The matrix | Ignore the problem | Fill in including constraints on transitions | Fill in using uninformative priors on fertility | Effects of informative priors | Interactive Exploration | Obtaining credible intervals on vital rates and $\lambda$ | References

Last update: 2026-05-15
Started: 2017-07-16

03 Working with a single population and transition
Part I: Obtaining the projection matrix | Step 1: Load and munge the single population data for L. elto | Step 2: Obtain starting number of individuals per stage | Part 2: Using priors to incorporate rare transitions | Use uninformative priors | Transition matrix | Fertility matrix | Other options for argument returnType | Incorporate informative priors | Part 3: Obtain Credible Intervals | Obtain CI for indvidual matrix entries | Credible intervals on $\lambda$

Last update: 2026-04-11
Started: 2018-06-08

06 Matrices of animal populations
Snail kites | Background | Study design and data sources | Survival values | Why a Beta distribution? | Moment matching: from mean and SD to $\alpha$ and $\beta$ | Interpreting the effective sample size | Comparing Beta and normal priors | Reproductive rates | Components of reproduction | Nest success as a Beta variable | Young per successful nest | Comparing prior sources | Interpretation | Building the matrices | Propagating uncertainty to $\lambda$ | Connection to raretrans | Literature cited

Last update: 2026-04-03
Started: 2020-07-24

02 Introduction to raretrans
Overview | Biased estimates from small samples | The example population: Chamaedorea elegans | Providing the stage-population vector N | Part 1: Observed matrix and its limitations | Part 2: Adding priors with fill_transitions() | Uniform (non-informative) prior | Informative (expert) prior | Adjusting prior weight | Part 3: Adding priors for fecundity with fill_fertility() | Combined posterior matrix | Part 4: Other return types | Augmented fate matrix (TN) | Full projection matrix A | Alpha and beta vectors (fertility) | Part 5: Simulating matrices and credible intervals on $\lambda$ | Part 6: Credible intervals on individual transition probabilities | Computing credible intervals with transition_CrI() | Visualising credible intervals with plot_transition_CrI() | Visualising the full posterior density with plot_transition_density() | Summary | References

Last update: 2026-03-27
Started: 2026-03-25

01 Quick start: credible intervals for transition probabilities
What this vignette shows | The data | Build the input matrices | Compute credible intervals | Visualise | Including the dead fate | Excluding the dead fate | Next steps | Reference

Last update: 2026-03-25
Started: 2026-03-25

04 Credible intervals for transition probabilities: Cypripedium calceolus
Introduction | The Cypripedium calceolus transition matrix (matU) | Computing credible intervals | Visualising with plot_transition_CrI() | Including the dead fate (default) | Excluding the dead fate | Effect of prior weight | Visualising full posterior densities | With uninformative prior | Effect of prior weight on densities | Summary | References

Last update: 2026-03-25
Started: 2026-03-25