get.rate.matrix {ctmcmove} | R Documentation |
Create a CTMC rate matrix from rasters and parameter estimates.
Description
Creates a CTMC rate matrix from rasters and parameter estimates (perhaps from a GLM analysis).
Usage
get.rate.matrix(object, stack.static, stack.grad,
normalize.gradients = FALSE, grad.point.decreasing = TRUE,
directions=4, zero.idx=integer(), coef)
Arguments
object |
A fitted GLM or GAM object used to fit the CTMC movement model |
stack.static |
A rasterStack object, where each layer in the stack is a location-based covariate. |
stack.grad |
A rasterStack object, where each layer in the stack is a directional gradient-based covariate |
normalize.gradients |
Logical. Default is FALSE. If TRUE, then all gradient covariates are normalized by dividing by the length of the gradient vector at each point. |
grad.point.decreasing |
Logical. If TRUE, then the gradient covariates are positive in the direction of decreasing values of the covariate. If FALSE, then the gradient covariates are positive in the direction of increasing values of the covariate (like a true gradient). |
directions |
Integer. Either 4 (indicating a "Rook's neighborhood" of 4 neighboring grid cells) or 8 (indicating a "King's neighborhood" of 8 neighboring grid cells). |
zero.idx |
Integer vector of the indices of raster cells that are not passable and should be excluded. These are cells where movement should be impossible. Default is zero.idx=integer(). |
coef |
A vector of coefficents to use in place of those in 'object' |
Details
This function takes the covariate rasters in stack.static (motility covariates) and stack.grad (gradient covariates) and creates a CTMC rate matrix defining movement between all neighboring raster grid cells. It is NOT possible to include an autocovariate here ("crw" in ctmc2glm). If such was included in the original fitted model, then the crw term is set equal to zero.
Value
An n-by-n Matrix of CTMC rate values.
Author(s)
Ephraim M. Hanks
References
Hanks, E. M.; Hooten, M. B. & Alldredge, M. W. Continuous-time Discrete-space Models for Animal Movement. The Annals of Applied Statistics, 2015, 9, 145-165
Examples
## For example code, do
##
## > help(ctmcMove)