sdtoolkit is a package for the R statistical programming language to perform scenario discovery using the PRIM algorithm

When to use

The package provides interactive functions for scenario discovery, stepping the user through the use of PRIM. PRIM identifies "boxes" in parameter space with "interesting" scenarios, i.e. bounds on parameters where scenarios meets some pre-defined criteria.

PRIM operates on a sample of scenarios, where each scenario is defined by a set of parameter values. Data needs to be provided with performance statistics for each scenario, along with criteria for determining whether the scenario is "interesting", e.g performance is unsatisfactory.

The R software environment needs to be installed, which is commonly used with the RStudio editor.

See PRIM for discussion of advantages and disadvantages relative to other scenario discovery methods.

How

The main function in the package is sdprim, which steps through a series of questions and provides interactive visualisations of the boxes identified. This particularly addresses the trade-off between boxes including a higher proportion of the ‘interesting’ model scenarios available through parameter space (coverage), vs higher proportion of ‘interesting’ cases relative to non-interesting ones (density).

Selected examples

  • Boxes are shown in a simple flood demonstration problem answering the question "Will regular flooding of ecological assets occur?". Code using sdtoolkit is provided.
  • Resources

  • Home page on the Comprehensive R Archive network (CRAN), with reference manual
  • Bryant BP, Lempert RJ (2010) Thinking inside the box: A participatory, computer-assisted approach to scenario discovery. Technological Forecasting and Social Change, 77(1), 34–49. doi:10.1016/j.techfore.2009.08.002