Simulation Code from Cartwright (2009) DOI: 10.1111/j.1365-294X.2009.04180.x