dbernppACmovement_exp {nimbleSCR} | R Documentation |
Bernoulli point process for activity center movement (exponential kernel)
Description
Density and random generation functions of the Bernoulli point process for activity center movement between occasions based on a bivariate exponential distribution.
Usage
dbernppACmovement_exp(
x,
lowerCoords,
upperCoords,
s,
lambda = -999,
rate,
baseIntensities,
habitatGrid,
numGridRows,
numGridCols,
numWindows,
log = 0
)
rbernppACmovement_exp(
n,
lowerCoords,
upperCoords,
s,
lambda = -999,
rate,
baseIntensities,
habitatGrid,
numGridRows,
numGridCols,
numWindows
)
Arguments
x |
Vector of x- and y-coordinates of a single spatial point (typically AC location at time t+1) scaled to the habitat (see ( |
lowerCoords , upperCoords |
Matrices of lower and upper x- and y-coordinates of all habitat windows. One row for each window. Each window should be of size 1x1 (after rescaling if necessary). |
s |
Vector of x- and y-coordinates of the isotropic multivariate exponential distribution mean (AC location at time t). |
lambda |
Rate parameter of the isotropic bivariate exponential distribution. Soon deprecated, use argument "rate" instead. |
rate |
Rate parameter of the isotropic multivariate exponential distribution. |
baseIntensities |
Vector of baseline habitat intensities for all habitat 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. |
numWindows |
Number of habitat windows. This value (positive integer) can be used to truncate |
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. |
Details
The dbernppACmovement_exp
distribution is a NIMBLE custom distribution which can be used to model and simulate
movement of activity centers between consecutive occasions in open population models.
The distribution assumes that the new individual activity center location (x)
follows an isotropic exponential normal centered on the previous activity center (s) with rate (lambda).
Value
dbernppACmovement_exp
gives the (log) probability density of the observation vector x
.
rbernppACmovement_exp
gives coordinates of a randomly generated spatial point.
Author(s)
Wei Zhang and Cyril Milleret
References
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
Examples
# 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)
s <- c(1, 1) # Currrent activity center location
rate <- 0.1
baseIntensities <- c(1:4)
habitatGrid <- matrix(c(1:4), nrow = 2, byrow = TRUE)
numRows <- nrow(habitatGrid)
numCols <- ncol(habitatGrid)
numWindows <- 4
# The log probability density of moving from (1,1) to (1.2, 0.8)
dbernppACmovement_exp(x = c(1.2, 0.8),
lowerCoords = lowerCoords,
upperCoords = upperCoords,
s = s,
rate = rate,
baseIntensities = baseIntensities,
habitatGrid = habitatGrid,
numGridRows = numRows,
numGridCols = numCols,
numWindows = numWindows,
log = TRUE)