powered by
Compares the structure, equations, and simulation settings of two stockflow models, and computes a nonlinearity score for each.
stockflow
compare_models(sfm1, sfm2)
An object of class compare_stockflow (a list) containing:
compare_stockflow
labels
Names of the two model objects (captured expressions).
added
Variables present in sfm2 but not sfm1.
sfm2
sfm1
removed
Variables present in sfm1 but not sfm2.
type_changed
Variables with different types.
eqn_changed
Variables with different equations.
sim_settings_diff
Simulation settings that differ.
properties
Per-model counts and nonlinearity scores.
A stock-and-flow model of class stockflow.
simulate(), summary()
simulate()
summary()
sfm1 <- stockflow("SIR") sfm2 <- stock(sfm1, "susceptible", eqn = 0.5) compare_models(sfm1, sfm2)
Run the code above in your browser using DataLab