Estimation of effect size under nonrandom sampling