Description Usage Arguments Details Value Author(s) References Examples

View source: R/get.rate.matrix.R

Creates a CTMC rate matrix from rasters and parameter estimates (perhaps from a GLM analysis).

1 2 3 | ```
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

1 2 3 | ```
## For example code, do
##
## > help(ctmcMove)
``` |

```
Loading required package: raster
Loading required package: sp
Loading required package: Matrix
Loading required package: fda
Loading required package: splines
Attaching package: 'fda'
The following object is masked from 'package:graphics':
matplot
Loading required package: gdistance
Loading required package: igraph
Attaching package: 'igraph'
The following object is masked from 'package:raster':
union
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
Attaching package: 'gdistance'
The following object is masked from 'package:igraph':
normalize
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.