You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is intended as a design discussion for helper functions in {scenarios}.
These functions are intended to be used within comparisons objects, but could also be made available to users for more ad hoc use.
are_comparable(): Function that takes two or more scenario class objects as input and checks which pair-wise comparisons are possible. This depends on whether the same function was called, and whether the parameter list has the same elements (throw warnings if the parameter list is identical).
Should check whether some user specified parameters are identical among scenarios (e.g. if comparing different R0 in the same population, do not allow comparison where demography is different; such as when demographic groups have different age limits). Could be used for only two objects, in which case it should return a single boolean; otherwise, a boolean matrix of whether any pair of scenarios are comparable.
select_comparable(): Function that takes two or more scenario class objects as input, as well as an optional string or integer specifying which should be considered the ‘baseline’ object. Runs are_comparable() and returns only those scenarios which are comparable as a list; the ‘baseline’ object is returned as the first element of the list. If no ‘baseline’ is specified, the first object is assumed to be the baseline with a warning or message to the user.
make_scenario_names(): Function to make informative names for scenario objects, based on their parameter combinations, and/or other user-specified name components.
read_scenario() / write_scenario(): Functions to read in and save a scenario specification from or to a file (structured Excel, JSON, YAML).
More helper functions as required.
The text was updated successfully, but these errors were encountered:
This issue is intended as a design discussion for helper functions in
{scenarios}
.These functions are intended to be used within
comparisons
objects, but could also be made available to users for more ad hoc use.are_comparable()
: Function that takes two or morescenario
class objects as input and checks which pair-wise comparisons are possible. This depends on whether the same function was called, and whether the parameter list has the same elements (throw warnings if the parameter list is identical).scenarios
(e.g. if comparing different R0 in the same population, do not allow comparison where demography is different; such as when demographic groups have different age limits). Could be used for only two objects, in which case it should return a single boolean; otherwise, a boolean matrix of whether any pair of scenarios are comparable.select_comparable()
: Function that takes two or morescenario
class objects as input, as well as an optional string or integer specifying which should be considered the ‘baseline’ object. Runsare_comparable()
and returns only those scenarios which are comparable as a list; the ‘baseline’ object is returned as the first element of the list. If no ‘baseline’ is specified, the first object is assumed to be the baseline with a warning or message to the user.make_scenario_names()
: Function to make informative names forscenario
objects, based on their parameter combinations, and/or other user-specified name components.read_scenario()
/write_scenario()
: Functions to read in and save a scenario specification from or to a file (structured Excel, JSON, YAML).The text was updated successfully, but these errors were encountered: