Using spatially explicit data, we estimate a cereal yield response function using a recently developed estimator for spatial error models when endogenous sample selection is of concern. Our results suggest that yields across Sub-Saharan Africa will decline with projected climatic changes, and that failing to control for sample selection and spatially correlated errors leads to biased estimates of some climate impacts. We also find evidence that the estimated elasticities are essentially no different from those of simpler models ignoring those features in the data. Simulation experiments indicate the extent to which improvements in irrigation can ameliorate the effects of climate change. © Oxford University Press and Foundation for the European Review of Agricultural Economics 2013.