| predict_event_locations | R Documentation |
For each dyadic target (a pair of actors at a time), predicts the interaction location as the mean of the two actors' Projected Actor Locations. Optionally scores the prediction against an observed location.
predict_event_locations(
events,
targets,
params,
alter_weight = c("normalized", "legacy"),
eps = 0.01,
cutoff = c("day", "month", "year")
)
events |
A pal_events object supplying the histories. |
targets |
A |
params |
A pals_params or fitted estimate_pals object. |
alter_weight, eps, cutoff |
See project_pal. |
targets augmented with pred_lon, pred_lat, and (if observed lon/lat
were supplied) error_km, the Haversine distance between predicted and observed
locations. Predictions are NA when both actors lack usable history.
ev <- simulate_conflict_events(n_actors = 10, n_events = 300, seed = 1)
fit <- estimate_pals(ev, model = "one")
tg <- ev[ev$time > as.Date("2012-01-01"), ]
head(predict_event_locations(ev, tg, fit))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.