Behavioral aspects of the decision to migrate