“mc2d”, an R package for two-dimensional Monte-Carlo simulations
Résumé
The need for use of quantitative methods for characterizing variability and uncertainty in risk assessment has received increasing attention in recent years, while few software packages are able to deal with it. Moreover, models and sensitivity analysis methods are getting more and more sophisticated, and consequently the available software packages might not be flexible enough to deal with new methods. We developed, initially for our own use, “mc2d”, a specific R package to build and study two-dimensional Monte-Carlo simulations. R is an open-source integrated suite of software facilities for data manipulation, calculation and graphical display extended by a large collection of packages where up-to-date statistical methods are implemented. “mc2d” is an additional set of integrated functions specifically written to: i) build distributions: with additional specific distributions and tools to choose and fit distributions on available data, to estimate and model uncertainty on the parameters by bootstrap, to build correlation structure between parameters, etc.; ii) build models: the package transfers easily variability and uncertainty along a mathematical model; iii) study the model: through ad-hoc summaries and graphics, sensitivity analyses (rank correlation on the variability or the uncertainty dimension, ANOVA), etc. The R environment allows a flexible use of any methods implemented in the basic distribution or any additional package. Less “user friendly” than some of the commercially available programs, “mc2d” is suitable for users with intermediate experience with R. A training session performed in France demonstrated that students with no prior experience with R are able to develop their own models in few days. The presentation will provide an overview of “mc2d,” illustrated by an example in the food safety domain. “mc2d” is available on request to the authors.