In more conventional analytic surveys, we sample the response variates y through a sampling design that is dependent on the covariate x. The x values are assumed known for all the units in the population. However, contrary to these situations, there are areas of statistical application when the values of the response variable are known for all the individuals but not the values of covariate (for example, in epidemiology and reliability). Here we sample the x values, and the sampling design used depends on the response variate y. The problem that we study is the same as usual-namely, inference regarding dependence of the response y on the covariate x. Some work in this direction has already been done. In this article we use estimating function theory to establish optimum estimation for the parameter of interest. This optimality holds conditionally when the response variable is fixed as well as unconditionally. We demonstrate that here for response-dependent sampling stratification plays the same role as in conventional surveys; that is, balancing on or eliminating nuisance parameters. As a special case, for the logistic model we establish a version of the conjecture that ''the prospective score is equal to the retrospective score.'' In simulation studies, the above-mentioned optimal estimation performs much better than the estimation in more common use.