jSDM-package {jSDM} | R Documentation |
joint species distribution models
Description
jSDM
is an R package for fitting joint species distribution models (JSDM) in a hierarchical Bayesian framework.
The Gibbs sampler is written in 'C++'. It uses 'Rcpp', 'Armadillo' and 'GSL' to maximize computation efficiency.
Package: | jSDM |
Type: | Package |
Version: | 0.2.1 |
Date: | 2019-01-11 |
License: | GPL-3 |
LazyLoad: | yes |
Details
The package includes the following functions to fit various species distribution models :
function | data-type |
jSDM_binomial_logit | presence-absence |
jSDM_binomial_probit | presence-absence |
jSDM_binomial_probit_sp_constrained | presence-absence |
jSDM_binomial_probit_long_format | presence-absence |
jSDM_poisson_log | abundance |
-
jSDM_binomial_probit
:
Ecological process:where
if n_latent=0
andsite_effect="none"
probit if n_latent>0
andsite_effect="none"
probit if n_latent=0
andsite_effect="fixed"
probit and
if n_latent>0
andsite_effect="fixed"
probit if n_latent=0
andsite_effect="random"
probit if n_latent>0
andsite_effect="random"
probit and
-
jSDM_binomial_probit_sp_constrained
:
This function allows to fit the same models than the functionjSDM_binomial_probit
except for models not including latent variables, indeedn_latent
must be greater than zero in this function. At first, the function fit a JSDM with the constrained species arbitrarily chosen as the first ones in the presence-absence data-set. Then, the function evaluates the convergence of MCMCchains using the Gelman-Rubin convergence diagnostic (
). It identifies the species (
) having the higher
for
. These species drive the structure of the latent axis
. The
corresponding to this species are constrained to be positive and placed on the diagonal of the
matrix for fitting a second model. This usually improves the convergence of the latent variables and factor loadings. The function returns the parameter posterior distributions for this second model.
-
jSDM_binomial_logit
:
Ecological process :where
if n_latent=0
andsite_effect="none"
logit if n_latent>0
andsite_effect="none"
logit if n_latent=0
andsite_effect="fixed"
logit if n_latent>0
andsite_effect="fixed"
logit if n_latent=0
andsite_effect="random"
logit and
if n_latent>0
andsite_effect="random"
logit and
-
jSDM_poisson_log
:
Ecological process :where
if n_latent=0
andsite_effect="none"
log if n_latent>0
andsite_effect="none"
log if n_latent=0
andsite_effect="fixed"
log if n_latent>0
andsite_effect="fixed"
log if n_latent=0
andsite_effect="random"
log and
if n_latent>0
andsite_effect="random"
log and
-
jSDM_binomial_probit_long_format
:
Ecological process:such as
and
, where
if n_latent=0
andsite_effect="none"
probit if n_latent>0
andsite_effect="none"
probit if n_latent=0
andsite_effect="fixed"
probit and
if n_latent>0
andsite_effect="fixed"
probit if n_latent=0
andsite_effect="random"
probit if n_latent>0
andsite_effect="random"
probit and
Author(s)
Ghislain Vieilledent <ghislain.vieilledent@cirad.fr>
Jeanne Clément <jeanne.clement16@laposte.net>
Frédéric Gosselin <frederic.gosselin@inrae.fr>
References
Chib, S. and Greenberg, E. (1998) Analysis of multivariate probit models. Biometrika, 85, 347-361.
Warton, D. I.; Blanchet, F. G.; O'Hara, R. B.; O'Hara, R. B.; Ovaskainen, O.; Taskinen, S.; Walker, S. C. and Hui, F. K. C. (2015) So Many Variables: Joint Modeling in Community Ecology. Trends in Ecology & Evolution, 30, 766-779.
Ovaskainen, O., Tikhonov, G., Norberg, A., Blanchet, F. G., Duan, L., Dunson, D., Roslin, T. and Abrego, N. (2017) How to make more out of community data? A conceptual framework and its implementation as models and software. Ecology Letters, 20, 561-576.