Crystal field and valence change effects in anomalous rare-earth compounds