define_calibration_fn | R Documentation |
Define a function to be passed to the fn_values
argument of calibrate_model()
.
define_calibration_fn(
type,
strategy_names,
element_names,
cycles,
groups = NULL,
aggreg_fn = sum
)
type |
Type of model values ( |
strategy_names |
Names of strategies. |
element_names |
Names of states (for counts) or of state values (for values). |
cycles |
Cycles of interest. |
groups |
Optional grouping of values (values in a
same group have the same |
aggreg_fn |
A function to aggregate values in a same group. |
A numeric vector.
example("run_model")
f <- define_calibration_fn(
type = c("count", "count", "value"),
strategy_names = c("I", "I", "II"),
element_names = c("A", "B", "ly"),
cycles = c(3, 5, 9),
groups = c(1, 1, 2),
aggreg_fn = mean
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.