View source: R/getLVcorrMat_AHM2_8--.R
getLVcorrMat | R Documentation |
Compute pairwise residual correlation in occurrence or abundance in a Joint Species Distribution Model (JSDM) with latent variables.
getLVcorrMat
computes the correlation matrix in residual occurrence or abundance in an latent-variable multi-species occupancy or N-mixture model which has been fit using MCMC (eg, in JAGS or WinBUGS). See Tobler et al. (2019) and Kéry & Royle (2021) chapter 8.
getEcorrMat
computes the correlation matrix for the coefficients of the observed environmental covariates.
getLVcorrMat(lv.coef, type=c("occupancy", "Nmix"), stat=mean)
getEcorrMat(beta, stat=mean)
lv.coef |
MCMC chains for the coefficients of the latent variables, typically from the |
beta |
MCMC chains for the coefficients of the environment variables (excluding the intercept), typically from the |
type |
Indication of whether the model fit was for occupancy data (with a probit link) or an N-mixture model based on count data. |
stat |
The function used to summarize the MCMC chains for the correlations; if |
The relevant correlation matrix, species x species; if stat = NULL
, an array, iterations x species x species, with the MCMC chains.
Mathias Tobler.
Tobler, M. et al. (2019) Joint species distribution models with species correlations and imperfect detection. Ecology, 100(8), e02754.
Kéry, M. & Royle, J.A. (2021) Applied Hierarchical Modeling in Ecology AHM2 - 8.4.2 and 8.5.4.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.