dbernppAC | R Documentation |
Density and random generation functions of the Bernoulli point process for the distribution of activity centers.
dbernppAC( x, lowerCoords, upperCoords, logIntensities, logSumIntensity, habitatGrid, numGridRows, numGridCols, log = 0 ) rbernppAC( n, lowerCoords, upperCoords, logIntensities, logSumIntensity, habitatGrid, numGridRows, numGridCols )
x |
Vector of x- and y-coordinates of a single spatial point (i.e. AC location) scaled to the habitat (see ( |
lowerCoords, upperCoords |
Matrices of lower and upper x- and y-coordinates of all habitat windows scaled to the habitat (see ( |
logIntensities |
Vector of log habitat intensities for all habitat windows. |
logSumIntensity |
Log of the sum of habitat intensities over all windows. |
habitatGrid |
Matrix of habitat window indices. Cell values should correspond to the order of habitat windows in
|
numGridRows, numGridCols |
Numbers of rows and columns of the habitat grid. |
log |
Logical argument, specifying whether to return the log-probability of the distribution. |
n |
Integer specifying the number of realisations to generate. Only n = 1 is supported. |
The dbernppAC
distribution is a NIMBLE custom distribution which can be used to model and simulate
the activity center location (x) of a single individual in continuous space over a set of habitat windows defined by their upper and lower
coordinates (lowerCoords,upperCoords). The distribution assumes that the activity center
follows a Bernoulli point process with intensity = exp(logIntensities).
dbernppAC
gives the (log) probability density of the observation vector x
.
rbernppAC
gives coordinates of a randomly generated spatial point.
Wei Zhang
W. Zhang, J. D. Chipperfield, J. B. Illian, P. Dupont, C. Milleret, P. de Valpine and R. Bischof. 2020. A hierarchical point process model for spatial capture-recapture data. bioRxiv. DOI 10.1101/2020.10.06.325035
# Use the distribution in R lowerCoords <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1), nrow = 4, byrow = TRUE) upperCoords <- matrix(c(1, 1, 2, 1, 1, 2, 2, 2), nrow = 4, byrow = TRUE) logIntensities <- log(c(1:4)) logSumIntensity <- log(sum(c(1:4))) habitatGrid <- matrix(c(1:4), nrow = 2, byrow = TRUE) numGridRows <- nrow(habitatGrid) numGridCols <- ncol(habitatGrid) dbernppAC(c(0.5, 1.5), lowerCoords, upperCoords, logIntensities, logSumIntensity, habitatGrid, numGridRows, numGridCols, log = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.