| pal_distance | R Documentation |
Builds the dyadic distance covariate used to model interaction likelihood: the Haversine distance between the two actors' Projected Actor Locations.
pal_distance(
events,
dyads,
params,
transform = c("none", "log"),
offset = 0.01,
alter_weight = c("normalized", "legacy"),
eps = 0.01,
cutoff = c("day", "month", "year")
)
events |
A pal_events object. |
dyads |
A |
params |
A pals_params or fitted estimate_pals object. |
transform |
|
offset |
Offset added before logging (default |
alter_weight, eps, cutoff |
See project_pal. |
dyads augmented with pal_distance (and, for transform = "log",
pal_log_distance).
ev <- simulate_conflict_events(n_actors = 8, n_events = 200, seed = 1)
fit <- estimate_pals(ev, model = "one")
dy <- data.frame(actor1 = "G01", actor2 = "G02",
time = as.Date("2012-12-01"))
pal_distance(ev, dy, fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.