Skip to contents

Returns the marginal distributions sandtablR calibrates against, read from the file generated by data-raw/tdsc_reference.R and cached for the session.

Usage

sdt_reference(
  which = c("all", "published", "design", "defaults", "meta"),
  version = c("2.0", "1.0")
)

Arguments

which

Which part to return: "all", "published", "design", "defaults" or "meta".

version

Which evaluated version of the exercise the published marginals should come from: "2.0" (the current exercise, the default) or "1.0" (its predecessor). Ignored for parts other than "published", which are common to both.

Value

A named list.

Details

The list separates three things that are easy to conflate:

  • published — marginals attributed to the TDSC tabletop evaluation (Achatz et al. 2023, doi:10.1007/s00068-022-02217-1 ). These are what the package reports and tests as "reference". Both evaluated versions of the exercise are carried; see version.

  • design — the exercise as specified in that paper's Methods: duration, card count, team roles, and the nine-area board. Published, but structural rather than distributional.

  • defaults — modelling choices made by sandtablR where the source does not pin a value (service times, routing probabilities, and so on). They are not attributed to the paper.

Calibration tests use published only. Mixing the two would test the package against its own assumptions.

See also

sdt_vocabularies for the levels these marginals range over.

Examples

sdt_reference("published")$triage_mix
#>    red yellow  green 
#>  0.444  0.236  0.319 
sdt_reference("published", version = "1.0")$triage_mix
#>    red yellow  green 
#>  0.434  0.217  0.350 

# What the two versions did differently, side by side.
rbind(
  `2.0` = sdt_reference("published", "2.0")$end_state,
  `1.0` = sdt_reference("published", "1.0")$end_state
)
#>     triage   ed diagnostics   or recovery icu_imc ward not_seen
#> 2.0   0.08 0.16        0.04 0.11     0.01    0.23 0.35     0.00
#> 1.0   0.15 0.17        0.06 0.09     0.01    0.20 0.31     0.03

sdt_reference("design")$duration
#> [1] 90
sdt_reference("meta")$doi
#> [1] "10.1007/s00068-022-02217-1"