This repository contain the Mathematica and R code from Fung and Keenan 2013