ctmc2glm: Convert a "ctmc" object into Poisson glm format.

Description Usage Arguments Value Examples

View source: R/ctmc2glm.R

Description

Transforms a "ctmc" object and covariate rasters into data suitable for analysis using Poisson GLM software (like glm in R).

Usage

1
ctmc2glm(ctmc, stack.static, stack.grad, crw = TRUE, normalize.gradients = FALSE, grad.point.decreasing = TRUE)

Arguments

ctmc

A "ctmc" object (output from "path2ctmc").

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

crw

Logical. If TRUE (default), an autocovariate is created for each cell visited in the CTMC movement path. The autocovariate is a unit-length directional vector pointing from the center of the most recent grid cell to the center of the current grid cell.

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).

Value

z

Response variable (either zero or 1) for analysis using GLM software.

X

Matrix of predictor variables for analysis using GLM software. Created from the location-based and gradient-based covariates.

tau

Offset for each row in a Poisson GLM with log link.

t

Vector of the time each raster grid cell was entered

Examples

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

ctmcMove documentation built on May 2, 2019, 5:55 p.m.