
Monte Carlo Node Specifications for the Animal Import Example
Source:R/data_imports.r
imports_mctable.RdA configured Monte Carlo node table for the illustrative animal-import risk assessment. It defines input nodes, probability distributions, source columns, transformations, and sensitivity-analysis ranges.
Format
A data frame with 7 rows and 7 columns:
- mcnode
Name of the Monte Carlo input node.
- description
Description of the represented parameter.
- mc_func
Random-number generation function.
NAidentifies a deterministic input.- from_variable
Alternative source column used to create the node, where applicable.
- transformation
Transformation applied to source values, where applicable.
- sensi_variation
Expression defining variation for one-at-a-time sensitivity analysis.
- sample_space
Sampling range or distribution arguments used for sample-design sensitivity analysis.
Details
h_prev and w_prev use uniform distributions, test_sensi uses a PERT
distribution, and animals_n uses a normal distribution. farms_n is
deterministic. The test_origin_unk and test_origin nodes demonstrate
how categorical source data can be transformed into model inputs.
Examples
imports_mctable
#> mcnode
#> 1 h_prev
#> 2 w_prev
#> 3 test_sensi
#> 4 farms_n
#> 5 animals_n
#> 6 test_origin_unk
#> 7 test_origin
#> description
#> 1 Herd prevalence
#> 2 Within herd prevalence
#> 3 Test sensitivity
#> 4 Number of farms exporting animals
#> 5 Number of animals exported per farm
#> 6 Unknown probability of the animals being tested in origin (true = unknown)
#> 7 Probability of the animals being tested in origin
#> mc_func from_variable
#> 1 runif <NA>
#> 2 runif <NA>
#> 3 rpert <NA>
#> 4 <NA> <NA>
#> 5 rnorm <NA>
#> 6 <NA> test_origin
#> 7 <NA> <NA>
#> transformation
#> 1 <NA>
#> 2 <NA>
#> 3 <NA>
#> 4 <NA>
#> 5 <NA>
#> 6 value == 'unknown'
#> 7 ifelse(value == 'always', 1, ifelse(value == 'sometimes', 0.5, ifelse(value == 'never', 0, NA)))
#> sensi_variation
#> 1 pmin(1, pmax(0, value * 1.5))
#> 2 pmin(1, pmax(0, value * 1.5))
#> 3 pmin(1, pmax(0, value * 1.5))
#> 4 value * 1.5
#> 5 value * 1.5
#> 6 ifelse(value == 'unknown', 'always', value)
#> 7 pmin(1, pmax(0, value * 1.5))
#> sample_space
#> 1 min = 0.02, max = 0.7
#> 2 min = 0.15, max = 0.6
#> 3 min = 0.8, mode = 0.875, max = 0.91
#> 4 min = 5, max = 10
#> 5 min = 82, max = 176
#> 6 <NA>
#> 7 min = 0, max = 1