Code (written by Duy Vu) for Vu DQ, Asuncion AU, Hunter DR, Smyth P (2011), Dynamic Egocentric Models for Citation Networks: