Vaccinating behaviour guided by imitation and aspiration