| djsdm | R Documentation |
Density function for a joint species distribution model.
djsdm(x, psi, log = FALSE)
x |
Numeric vector or matrix. Binary values of species occurrence. If matrix, then a vector of probability densities is returned with an element for each record of the matrix. Matrix records represent sites, and matrix fields represent species. |
psi |
Numeric vector or matrix. Probabilities of site occupancy. Matrix records represent sites, and matrix fields represent species. If vector, then |
log |
Logical scalar. If |
Computes the probability density of a joint species distribution model. The probability of observing a community is calculated as the product of the probabilities of observing each species. Observations for each species are Bernoulli-distributed, and species-specific probability densities are computed with stats::dbinom.
Numeric vector of probability densities.
Wilkinson DP, Golding N, Guillera‐Arroita G, Tingley R, and McCarthy MA. 2021. Defining and evaluating predictions of joint species distribution models. Methods in Ecology and Evolution, 12(3): 394-404. DOI: 10.1111/2041-210X.13518
stats::dbinom for density of the binomial distribution.
mlWAIC for computing widely applicable information criteria for joint species distribution models.
# Define species occurrence.
x<-c(1,0,0,1)
# Define occupancy probabilities.
psi<-c(0.886,0.391,0.139,0.991)
# Compute log probability density.
djsdm(x=x,psi=psi,log=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.