slidingWake: Auxiliary Function to Iterate Through Sliding Spatiotemporal...

View source: R/mwa.R

slidingWakeR Documentation

Auxiliary Function to Iterate Through Sliding Spatiotemporal Windows

Description

Method iterates through all spatial and temporal window sizes specified and counts dependent events with a given spatial window and for a given temporal window (symmetrically in forward and backward direction in time). For performance reasons, the iterative counting is done in Java using the rJava interface.

IMPORTANT: The size of the Java heap space has to be set before first calling the package via library(mwa) since JVM size cannot change once it has been initialized. This also implies that R has to be restarted if another library was already using a JVM in order for the heap space option to have any effect. To set the heap space to 1 GB, for example, use options(java.parameters = "-Xmx1g") (512 MB is the default size).

Usage

slidingWake(data, t_unit, t_window, spat_window, treatment, control,
            dependent, matchColumns, estimationControls)

Arguments

data

data.frame containing the observations.

t_unit

String specifying the temporal units to be used.

t_window

specification of temporal windows in t_units.

spat_window

specification of spatial windows in kilometers.

treatment

vector of Strings identifying which type of events serve as treatments.

control

vector of Strings identifying which type of events serve as controls.

dependent

vector of Strings identifying which type of events are affected by treatment.

matchColumns

vector of Strings indicating the columns to match on.

estimationControls

vector of Strings indicating additional control dimensions to be included in the estimation.

Details

See the description of matchedwake for details.

Value

Returns a data.frame. See “wakes” in the description of matchedwake for details.

Author(s)

Sebastian Schutte and Karsten Donnay.

References

Schutte, S., Donnay, K. (2014). “Matched wake analysis: Finding causal relationships in spatiotemporal event data.” Political Geography 41:1-10.

See Also

matchedwake, slideWakeMatch


mwa documentation built on April 26, 2022, 5:07 p.m.