A General View of Estimation for Two Phases of Selection with Applications to Two-Phase Sampling and Nonresponse