Deriving Target Selection Rules from Endogenously Selected Samples