(Based on code of Anna Neufeld at the University of Washington)

Introduction

This tutorial demostrates how to apply the Bayesian Melding method to results from a microsimulation model in order to access uncertainty around deterministic simulation results.

Download or clone this repository using for example (from the command line):

git clone https://github.com/hanase/BMlabsRostock2019 BMlabs

Here, we assume we have a microsimulation model for projecting the number of housing units in US states, starting from 2010 and projecting to 2030. We run the model several times under different input conditions. We have observed data for 2017 which we use to assess the model uncertainty and propagate it into 2030.

Required packages

Most of the analysis will be done using basic R. Towards the end we will use the ggplot2 package which can be installed via:

install.packages("ggplot2")

Notation

Prerequisites

Load Example Data

We have a dataset of the number of housing units in 2017 for US states from the Census Bureau (ACS).

Uncertainty at present time

Uncertainty in projections

Multiple indicators

In a situation when there are more than one indicators on which basis we want to assess the uncertainty and compute weights, one can proceed as follows:

  1. For each indicator \(l\) with \(l = 1,\dots,L\), compute the bias \(a_l\), variance \(\sigma^2_{il}\) and the weight \(w'_{il}\) as above.

  2. For each run \(i\) compute its weight as \(w_i = \prod_l w'_{il}\).

  3. The posterior distribution for indicator \(l\) is defined as \[\pi(\Psi_{kl}) = \sum_{i=1}^I w_iN(a_l b_l^a + \Psi_{ikl}, \sigma_{il}^2b_l^v)\]

References

Ševčíková, H., Raftery, A.E., Waddell, P. (2007). Assessing uncertainty in urban simulations using Bayesian melding. Transportation Research, Vol. 41B, Issue 6, 652-669.

Ševčíková, H., Raftery, A.E., Waddell, P. (2011). Uncertain benefits: Application of Bayesian melding to the Alaskan Way Viaduct in Seattle. Transportation Research Part A, 45, 540-553.

Ševčíková, H., Simonson, M., Jensen, M. (2015). Assessing and Integrating Uncertainty into Land Use Forecasting. Journal of Transport and Land Use, 8(3).