ArticleslgStudy

computer science

MCSim

MCSim is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand MCSim rather than just read about it. In short: GNU MCSim is a suite of simulation software. It allows users to design statistical or simulation models, perform Monte Carlo simulations, and Bayesian inference through (tempered) Markov chain Monte Carlo (MCMC) simulations.

MCSim — main illustration
MCSim — illustration

Key takeaways

  • MCSim belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect MCSim to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of MCSim from memory before moving on to harder problems.

Reference excerpt

GNU MCSim is a suite of simulation software. It allows users to design statistical or simulation models, perform Monte Carlo simulations, and Bayesian inference through (tempered) Markov chain Monte Carlo (MCMC) simulations. The latest version allows parallel computing of Monte Carlo or MCMC simulations.

Description GNU MCSim is a simulation and statistical inference tool for algebraic or differential equation systems, optimized for performing Monte Carlo analysis. The software comprises a model generator and a simulation engine:

The model generator facilitates structural model definition and maintenance, while keeping execution time short. The model is coded using a simple grammar, and the generator translates it into source code for C. Starting with version 5.3.0, models coded in Systems Biology Markup Language (SBML) can also be used. The simulation engine is a set of routines that are linked to the model to produce executable code. The result is that simulations of a structural model can be run under a variety of conditions. Internally, the software uses the GNU Scientific Library for some of its numerical calculations.

History The project began in 1991 in Berkeley when Don Maszle and Frederic Y. Bois translated in C and reorganized a program that Bois had developed at Harvard for his PhD thesis. The main motive for the work was to be able to quickly develop and easily maintain physiologically based pharmacokinetic modelling (PBPK) models. However, the syntax was defined with enough generality that many algebraic and first-order ordinary differential equations can be solved. The ability to perform efficient Monte Carlo simulations was added early on, for the research needs of the group. The code was made freely available from a server at UC Berkeley. Discussions with Stuart Beal at University of California, San Francisco (UCSF) School of Pharmacy, led the team to investigate the use of Markov chain Monte Carlo techniques for PBPK models' calibration. The corresponding code was developed by Maszle, during a project in collaboration with Andrew Gelman, then professor at University of California, Berkeley (UC Berkeley) Statistics Department. Additional code written by Ken Revzan allowed the definition and Bayesian calibration of hierarchical (multilevel) statistical models. At the time of these developments (around 1996), those abilities were unique for a freely distributed, easily accessible, very powerful and versatile software. Since then the software has been consistently maintained and extended.

Version history 6.2.0 (3 June 2020) 6.1.0 (19 February 2019) 6.0.1 (5 May 2018) 6.0.0 (24 February 2018) 5.6.6 (21 January 2017) 5.6.5 (27 February 2016) 5.6.4 (30 January 2016) 5.6.3 (1 January 2016) 5.6.2 (24 December 2015) 5.6.1 (21 December 2015) 5.6.0 (16 December 2015) 5.5.0 (17 March 2013) 5.4.0 (18 January 2011) 5.3.1 (3 March 2009) 5.3.0 (12 January 2009) 5.2 beta (29 January 2008) 5.1beta (18 September 2006) 5.0.0 (4 January 2005) 4.2.0 (15 October 2001) 4.1.0 (1 August 1997) 4.0.0 (24 March 1997) 3.6.0 3.3.2

Licensing GNU MCSim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or any later version, at user option.

Platform availability The C source code is provided and can be compiled on any machine with a C compiler. The GNU Scientific Library must be available also on the target platform to use a few extra distributions in statistical models. To use the SBML translation abilities, the LibSBLM library should be installed. Starting with version 6.0.0, the Sundials Cvodes integrator is also used. To take advantage of parallel computation (from version 6.2.0 on) a Message Passing Interface (MPI) library must be installed.

See also List of numerical analysis software

References Bois F., Maszle D., 1997, MCSim: A simulation program, Journal of Statistical Software, 2(9):http://www.stat.ucla.edu/journals/jss/v02/i09. Jonsson F., Johanson G., 2003, The Bayesian population approach to physiological toxicokinetic-toxicodynamic models – An example using the MCSim software, Toxicology Letters 138:143-150. Bois F., 2009, GNU MCSim: Bayesian statistical inference for SBML-coded systems biology models, Bioinformatics, 25:1453-1454, doi: 10.1093/bioinformatics/btp162. Allen B.C., Hack E.C., Clewell H.J., 2007, Use of Markov chain Monte Carlo analysis with a physiologically-based pharmacokinetic model of methylmercury to estimate exposures in u.s. women of childbearing age, Risk Analysis, 27:947-959. Covington T.R., Gentry P.R., et al., 2007, The use of Markov chain Monte Carlo uncertainty analysis to support a Public Health Goal for perchloroethylene, Regulatory Toxicology and Pharmacology, 47:1-18. David R.M., Clewell H.J., et al., 2006, Revised assessment of cancer risk to dichloromethane II. Application of probabilistic methods to cancer risk determinations. Regulatory Toxicology and Pharmacology 45: 55–65. Franks S.J., Spendiff M.K., et al., 2006, Physiologically based pharmacokinetic modelling of human exposure to 2-butoxyethanol, Toxicology Letters 162:164-173. Hack E.C., 2006, Bayesian analysis of physiologically based toxicokinetic and toxicodynamic models, Toxicology, 221:241-248. Hack E.C., Chiu W.A, et al., 2006, Bayesian population analysis of a harmonized physiologically based pharmacokinetic model of trichloroethylene and its metabolites, Regulatory Toxicology and Pharmacology, 46:63-83. Lyons M.A., Yang R.S.H, Mayeno A.N., Reisfeld B. 2008, Computational toxicology of chloroform: reverse dosimetry using Bayesian inference, Markov chain Monte Carlo simulation, and human biomonitoring data, Environmental Health Perspectives, 116:1040-1046. Marino, D. J., H. Clewell, et al., 2006, Revised assessment of cancer risk to dichloromethane: part I Bayesian PBPK and dose-response modeling in mice, Regulatory Toxicology and Pharmacology 45:44-54. Mezzetti M., Ibrahim J.G., et al., 2003, A Bayesian compartmental model for the evaluation of 1,3-butadiene metabolism, Journal of the Royal Statistical Society, Series C, 52:291-305.

External links Official website

Worked examples

Example 1 — a first encounter with MCSim

Start with the simplest possible case. Write down what MCSim claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to MCSim before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about MCSim ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of MCSim

In research
MCSim appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses MCSim in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
MCSim is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free Bayesian statistics software, Free software programmed in C, GNU Project software, so understanding it makes those chapters shorter.
In everyday life
Look for MCSim outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study MCSim in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what MCSim means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain MCSim out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is MCSim in simple terms?

GNU MCSim is a suite of simulation software. It allows users to design statistical or simulation models, perform Monte Carlo simulations, and Bayesian inference through (tempered) Markov chain Monte Carlo (MCMC) simulations.

Why does MCSim matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study MCSim?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on MCSim.

Tags

  • Free Bayesian statistics software
  • Free software programmed in C
  • GNU Project software
  • Mathematical optimization software
  • Numerical software

Keep exploring