Last data update: 2014.03.03

R: Dynamic interaction index
DIR Documentation

Dynamic interaction index

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

DI(traj1, traj2, tc = 0, alpha = 1, local = FALSE, TimeWeight = FALSE,
  DistWeight = FALSE)

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.

alpha

value for the α parameter in the formula for di_d.

TimeWeight

whether or not to compute the weights for time-based weighting.

DistWeight

whether or not to compute the weights for distance-based weighting.

local

logical, whether or not to perform local analysis.

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

The function DI returns the DI index (along with DI_theta and DI_d), or if local = TRUE, a dataframe that contains the localized di values (see Long and Nelson 2013). The columns for di, di.theta, and di.d representdynamic interaction overall, in direction (azimuth), and in displacement respectively. If time- and/or distance-based weighting is selected, the corresponding weights are included as additional columns t.weight and d.weight, respectively. Please see Long and Nelson (2013) for a more detailed description.

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

Examples

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)

Results