# 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
sd <- 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_normal(c(1.2, 0.8), lowerCoords, upperCoords, s, sd, baseIntensities,
habitatGrid, numRows, numCols, numWindows, log = TRUE)
Run the code above in your browser using DataLab