DI: Dynamic interaction index

Description Usage Arguments Details Value References See Also Examples

View source: R/DI.R

Description

The function DI measures dynamic interaction between two moving objects. It calculates the local level di statistic for movement displacement, direction, and overall. DI can compute time- and/or distance-based weighting schemes following Long and Nelson (2013).

Usage

1
DI(traj1, traj2, tc = 0, local = FALSE, rand = 99, alpha = 1)

Arguments

traj1

an object of the class ltraj which contains the time-stamped movement fixes of the first object. Note this object must be a type II traj object. For more information on objects of this type see help(ltraj).

traj2

same as traj1.

tc

time threshold for determining simultaneous fixes – see function: GetSimultaneous.

local

logical value indicating whether a dataframe (local = TRUE) containing the IAB index for each simultaneous fix should be returned (with a local permutation test), or (if local = FALSE - the default) the global index along with associated global permutation test.

rand

number of permutations to use in the local permutation test.

alpha

value for the α parameter in the formula for di_d (default = 1).

Details

This function can be used for calculating the dynamic interaction (DI) statistic as described in Long and Nelson (2013). The DI statistic can be used to measure the local level of dynamic interaction between two moving objects. Specifically, it measures dynamic interaction in movement direction and displacement.

Value

If local=FALSE (the default) DI returns the numeric value of the DI index (along with DI_theta and DI_d), and the associated p-value from a permutation test (see IAB). If local=TRUE DI returns a dataframe that contains the localized di values (see Long and Nelson 2013). The columns for di, di.theta, and di.d represent dynamic interaction overall, in direction (azimuth), and in displacement, respectively for each segment. A localized p-value for a one sided test for positive interaction (and z-score) is computed based on rand permutations of the segments. The pkey columns can be used to match the simultaneous segments to the original trajectory (see IAB).

References

Long, J.A., Nelson, T.A. 2013. Measuring dynamic interaction in movement data. Transactions in GIS. 17(1): 62-77.

See Also

GetSimultaneous, Cr, IAB

Examples

1
2
3
4
5
6
data(deer)
deer37 <- deer[1]
deer38 <- deer[2]
#tc = 7.5 minutes
DI(deer37, deer38, tc = 7.5*60)
df <- DI(deer37, deer38, tc = 7.5*60, local = TRUE)

wildlifeDI documentation built on June 16, 2021, 5:07 p.m.