Updated analysis scripts to support paper 4.