Factors related to similarity, rejection and religious affiliation