get.rate.matrix {ctmcmove} | R Documentation |
Creates a CTMC rate matrix from rasters and parameter estimates (perhaps from a GLM analysis).
get.rate.matrix(object, stack.static, stack.grad, normalize.gradients = FALSE, grad.point.decreasing = TRUE, directions=4, zero.idx=integer(), coef)
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' |
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.
An n-by-n Matrix of CTMC rate values.
Ephraim M. Hanks
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
## For example code, do ## ## > help(ctmcMove)