si_predict {simodels} | R Documentation |
Predict spatial interaction based on pre-trained model
Description
Predict spatial interaction based on pre-trained model
Usage
si_predict(
od,
model,
constraint_production,
constraint_attraction,
constraint_total,
output_col = "interaction",
...
)
Arguments
od |
A data frame representing origin-destination data, e.g. as created by
|
model |
|
constraint_production |
Character representing column in |
constraint_attraction |
Character representing column in |
constraint_total |
Single number representing the total interaction. This argument, when set, ensures that the sum of the interaction calculated will equal the value given. |
output_col |
Character string containing the name of the new output
column. |
... |
Arguments passed to |
Value
An sf data frame
See Also
si_calculate
Examples
od = si_to_od(si_zones, si_zones, max_dist = 4000)
m = lm(od$origin_all ~ od$origin_bicycle)
od_updated = si_predict(od, m)