| estimate_pals | R Documentation |
Estimates the PALS smoothing parameters by minimizing the mean great-circle (Haversine) distance between observed event locations and the locations predicted from each event's preceding history ("marching forward": every prediction uses only events strictly earlier than the event being predicted).
estimate_pals(
events,
fit_events = NULL,
model = c("four", "one"),
start = NULL,
method = NULL,
aggregate = c("mean", "sum"),
alter_weight = c("normalized", "legacy"),
eps = 0.01,
radius = 6371.0088,
cutoff = c("day", "month", "year"),
control = list()
)
events |
A pal_events object providing the actor histories. |
fit_events |
Optional |
model |
|
start |
Optional numeric starting vector on the optimizer's scale
( |
method |
Optimizer method passed to stats::optim ( |
aggregate |
|
alter_weight, eps, cutoff |
See project_pal. |
radius |
Sphere radius for the Haversine objective (km). |
control |
A list of control parameters for stats::optim. |
An object of class pals_fit with components params (estimated
pals_params), model, objective (minimized mean/sum distance), n_used
(events contributing), convergence, optim (raw optimizer output), events,
settings, and call. Methods: print(), summary(), coef(), predict(),
plot().
project_pals(), predict_event_locations(), bootstrap_pals().
ev <- simulate_conflict_events(n_actors = 10, n_events = 300, seed = 1)
fit <- estimate_pals(ev, model = "one")
fit
coef(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.