Learn R Programming

ctmcmove (version 1.2.1)

path2ctmc: Function to turn a discrete-time continuous-space path into a CTMC path.

Description

This function takes a movement path defined by xyt values (not necessarily equally spaced in time), and converts it into a CTMC path (a continuous-time discrete-space path on grid cells in a raster).

Usage

path2ctmc(xy, t, rast,print.iter=FALSE)

Arguments

xy
A matrix of x,y locations at T time points.
t
A vector of T times associated with the T locations in "xy".
rast
A raster object or raster stack object that will define the discrete-space grid cells for the CTMC movement path.
print.iter
Logical. If true, then the progress stepping through each observed location in "xy" and "t" will be output in the terminal.

Value

  • ecA vector of the sequential grid cells (the embedded chain) in the CTMC movement path
  • rtA vector of residence times in each sequential grid cell in the CTMC movement path
  • trans.timesA vector of times in which the movement path enters the grid cell in "ec".

Details

This takes a xyt path and turns it into a list of the embedded chain and residence times of a continuous time Markov chain walk on the graph. "Diagonal" transitions are fixed with linear interpolation.

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

Run this code
## For example code, do
##
## > help(ctmcMove)

Run the code above in your browser using DataLab