simulate_conflict_events: Simulate dyadic conflict events between moving actors

View source: R/simulate.R

simulate_conflict_eventsR Documentation

Simulate dyadic conflict events between moving actors

Description

Generates a synthetic dataset of dyadic interaction events with the qualitative structure PALS is designed for: a set of armed-group-like actors, each following a slowly drifting spatial trajectory, that interact preferentially with nearby actors. Useful for examples, tests, and the package vignette. The geographic frame approximates Nigeria, echoing the application in Kim, Liu and Desmarais (2023).

Usage

simulate_conflict_events(
  n_actors = 30,
  n_events = 2000,
  years = 2000:2016,
  drift = 0.18,
  jitter = 0.25,
  decay = 2,
  bbox = c(2.7, 14.7, 4, 13.9),
  seed = NULL
)

Arguments

n_actors

Number of actors (default 30).

n_events

Number of dyadic events (default 2000).

years

Integer vector of years to span (default 2000:2016).

drift

Standard deviation (decimal degrees per year) of each actor's directional drift; larger values make actors more mobile (default 0.18).

jitter

Standard deviation (decimal degrees) of event-location noise around the midpoint of the two actors' current locations (default 0.25).

decay

Spatial interaction scale (degrees): partners are chosen with probability proportional to exp(-distance / decay), so nearby actors interact more (default 2).

bbox

Bounding box c(lon_min, lon_max, lat_min, lat_max) for actor home locations (default approximately Nigeria).

seed

Optional integer seed for reproducibility.

Value

A pal_events object with columns actor1, actor2, time, lon, lat.

Examples

ev <- simulate_conflict_events(n_actors = 12, n_events = 400, seed = 42)
ev
summary(ev)


palsr documentation built on July 1, 2026, 5:07 p.m.