The Coase quote comes from the third G. Warren Nutter Lecture -- "How Should Economists Choose?" -- which Coase delivered at the American Enterprise Institute for Public Policy Research, Washing­ton, D.C., on November 18, 1981.

But its not the full quote,

I remarked earlier on the tendency of economists to get the result their theory tells them to expect. In a talk I gave at the University of Virginia in the early 1960s, at which Warren Nutter was, I think, present, I said that if you torture the data enough, nature will always confess, a saying which, in a somewhat altered form, has taken its place in the statistical literature. Kuhn puts the point more elegantly and makes the process sound more like a seduction: "nature undoubtedly responds to the theoretical predispositions with which she is approached by the measuring scientist."

A little before this quote Coase had said,

Other studies take the form of a test of the theory espoused by the author: there is a model, then regressions, followed by conclusions. In almost all cases it will be found that the statistical results confirm the theory. Sometimes it does happen that some of the expected relationships are not statistically significant, but they will usually be found to be in the right direction. And when results are obtained that do not square with the theory, which occasionally happens, these results are not usually treated as invalidating the theory but are left as something calling for further study. I would not claim that such studies have never led the investigators to modify their theories, but such cases appear to be rather uncommon. Some articles, of course, involve the testing of alternative theories, and this means that some theories are bound to come out worse. But I doubt whether such studies have often led to a change in the views of the authors. My impression is that these quantitative studies are almost invariably guided by a theory and that they may most aptly be described as explorations with the aid of a theory. In almost all cases, the theory exists before the statistical investigation is made and is not derived from the investigation.

Coase goes on to say,

Quantitative studies, or qualitative studies for that matter, may give someone who believes in a theory a better idea of what that theory implies. But such studies, normally quantitative in the natural sciences and increasingly so in economics, also play, as Kuhn indicates, another and very important role. The choice economists face is a choice between competing theories. These studies, both quantitative and qualitative, perform a function similar to that of advertising and other promotional activities in the normal products market. They do not aim simply at enlarging the understanding of those who believe in the theory but also at attracting those who do not believe in it and at preventing the defection of existing believers. These studies demonstrate the power of the theory, and the definiteness of quantitative studies enables them to make their point in a particularly persuasive form. What we are dealing with is a competitive process in which purveyors of the various theories attempt to sell their wares.

Coase then quotes Dan Patinkin:

What generates in me a great deal of skepticism about the state of our discipline is the high positive correlation be­tween the policy views of a researcher (or, what is worse, of his thesis director) and his empirical findings. I will begin to believe in economics as a science when out of Yale there comes an empirical Ph.D. thesis demonstrating the suprem­acy of monetary policy in some historical period and out of Chicago, one demonstrating the supremacy of fiscal policy.

I have always thought there is too much truth in Patinkin's remark.

Coase comments,

Assuming that Patinkin is right and that the empirical findings of economists at Yale and Chi­cago are not the same, this undoubtedly reflects a difference in their view about how the economic system operates, a difference, that is, in the theories espoused at the two universities.

So empirical results are made to fit the theory?

And,

But there are motives for selecting one theory rather than anotherthat are more worrying, and I think it was this concern that lay behind Patinkin's somewhat facetious remark. In public discussion, in the press, and in politics, theories and findings are adopted not to facilitate the search for truth but because they lead to certain policy conclusions. Theories and findings become weapons in a propaganda battle.

To give some perspective on Coase's whole argument, it should be noted that the point of Coase's lecture was to argue against the position Milton Friedman took in his essay "The Methodology of Positive Economics".

Many economists, perhaps most, think of economics as the science of human choice, and it seems only proper that we should examine how economists themselves choose the theories they espouse. The best-known treatment of this question is that of Milton Friedman, who, in the "Methodology of Positive Economics," his most popular paper, in itself a somewhat suspicious circumstance, tells us "how to decide whether a suggested hypothesis or theory should be tentatively accepted as part of " the positive science of economics. As you all know, the answer he gives is that the worth of a theory "is to be judged by the precision, scope, and conformity with experience of the predictions it yields .... The ultimate goal of a positive science is the development of a 'theory' or 'hypothesis' that yields valid and meaningful ... predictions about phenomena not yet observed.

I should say at once that I do not consider Milton Friedman's answer satisfactory.

[ ... ]

The view that the worth of a theory is to be judged solely by the extent and accuracy of its predictions seems to me wrong. Of course, any theory has implications: it tells us that if something happens, something else will follow, and it is true that most of us would not value the theory if we did not think these implications corresponded to happenings in the real economic system. But a theory is not like an airline or bus timetable. We are not interested simply in the accuracy of its predictions. A theory also serves as a base for thinking. It helps us to understand what is going on by enabling us to organize our thoughts. Faced with a choice between a theory which predicts well but gives us little insight into how the system works and one which gives us this insight but predicts badly, I would choose the latter, and I am inclined to think that most economists would do the same. No doubt it would be their belief that ultimately this theory would enable us to make predictions about what would happen in the real world; but since these predictions would emerge at a later date (and probably would also be about different things), to assert that the choice between theories depends on their predictive powers becomes completely ambiguous.