fhui28 / CBFM

Spatio-temporal joint species distribution modeling using community-level basis functions
13 stars 2 forks source link

CBFM (Community-level basis function models)

CRAN status Lifecycle: experimental

CBFM is an R package for spatial and spatio-temporal joint species distributing modeling of multivariate abundance data, based on the idea of using community-level (species-common) basis functions. It offers an alternative and connected (but by no means necessarily superior) approach to the popular spatio-temporal generalized linear latent variable model (GLLVM) method.

As the name suggests, community-level basis function models (CBFMs) is built on the idea of fixed-rank kriging (FRK), where spatially- and/or temporally-indexed basis functions are included to account for spatio-temporal correlations within and between species. In doing so, CBFMs bear a lot of similarity to and thus can be set up as a type of (big) generalized additive model or GAM. This in turns allows CBFMs to be estimated in a computationally efficient and scalable manner, by adapting some of the existing machinery available for fitting and performing inference with GAMs.

The main manuscript introducing CBFMs as a method is available at here.

Installation

Currently, CBFM is available and can be installed from github with the help of devtools package using:

devtools::install_github("fhui28/CBFM")

Alternatively, or if the above does not work, you may download a (supposedly) stable release of CBFM by choosing the latest release on the right hand side of this Github webpage, and install it manually on your machine.

Getting started

For getting started with CBFM though, please have a read of the manuscript available here. We also recommend installing it and reading the help file for the main CBFM function.

Some broad introductions to joint species distribution modeling, especially using GLLVMs, please see So Many Variables: Joint Modeling in Community Ecology, How to make more out of community data? A conceptual framework and its implementation as models and software, and the textbook Joint Species Distribution Modelling, with Applications in R.

Note there are also some excellent existing \texttt{R} packages to fit joint species distribution models using GLLVMs, including: Hmsc, GLLVM, sjSDM, and VAST, among others. All of these have some capacity to handle spatio-temporal multivariate abundance data using spatio-temporal GLLVMs, or variations thereof.

If you find any bugs and issues...

If you find something that looks like a bug/issue, please let us know report it, so that we can resolve it and continue to improve this project (interest and time pending). To report a bug/issue, please make use of the Github issues and post it up there. As much as possible, please include in the issue: 1. A description of the bug/issue; 2. Paste-able code along with some comments that reproduces the problem e.g., using the reprex package. If you also have an idea of how to fix the problem (Francis tends to make a lot of mistakes in my code, so some may be easy amendments!), then that is also much appreciated. 3. Required data files etc...

Thanks heaps!

Finally, please note Github issues is a place to post any bugs/issues/unusual behavior in relation to the package. Please try to refrain from posting any feature requests of general statistical modeling questions. They will very likely be ignored and/or deleted without prior consent. You are probably better off emailing one of the package maintainers instead. Much appreciated!