# 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)
Run the code above in your browser using DataLab