This problem has received a great deal of attention in
econometrics, where it is called sample selection bias.
There it appears mostly because data are collected
through surveys. Very often people that respond to
a survey are self-selected, so they do not constitute a
random sample of the general population. In Nobelprize
winning work, Heckman (1979) has developed a
procedure for correcting sample selection bias. The
key insight in Heckman’s work is that if we can estimate
the probability that an observation is selected
into the sample, we can use this probability estimate
to correct the model. The drawback of his procedure
is that it is only applicable to linear regression models,
commonly used in econometrics