biodiverse / ubms

Fit models to data from unmarked animals using Stan. Uses a similar interface to the R package 'unmarked', while providing the advantages of Bayesian inference and allowing estimation of random effects.

Home Page:https://biodiverse.github.io/ubms/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ubms: Unmarked Bayesian Models with Stan

R build status CRAN status

ubms is an R package for fitting Bayesian hierarchical models of animal occurrence and abundance. The package has a formula-based interface compatible with unmarked, but the model is fit using MCMC with Stan instead of using maximum likelihood. Currently there are Stan versions of unmarked functions occu, occuRN, colext, occuTTD, pcount, distsamp, and multinomPois. These functions follow the stan_ prefix naming format established by rstanarm. For example, the Stan version of the unmarked function occu is stan_occu.

Advantages compared to unmarked:

  1. Obtain posterior distributions of parameters and derived parameters
  2. Include random effects in parameter formulas (same syntax as lme4)
  3. Assess model fit using WAIC and LOO via the loo package

Disadvantages compared to unmarked:

  1. MCMC is slower than maximum likelihood
  2. Not all model types are supported
  3. Potential for convergence issues

Installation

ubms is on CRAN:

install.packages("ubms")

Alternatively, the latest development version can be installed from Github:

# install.packages("devtools")
devtools::install_github("hmecology/ubms")

Package Overview

A detailed vignette for the package is available here.

About

Fit models to data from unmarked animals using Stan. Uses a similar interface to the R package 'unmarked', while providing the advantages of Bayesian inference and allowing estimation of random effects.

https://biodiverse.github.io/ubms/

License:GNU General Public License v3.0


Languages

Language:R 87.1%Language:Stan 6.5%Language:C++ 3.8%Language:TeX 2.0%Language:Makefile 0.4%Language:CSS 0.1%