According to purists, the field of economics is supposed to be free of political ideology. Economics views itself as a science and the prevailing consensus, best articulated by Nobel-winner and Chicago-school doyen George Stigler, is that “the dominant inﬂuence” in economics “is the set of internal values and pressures of the discipline” which help keep it nonpartisan.

And yet most well-known economists achieve their star status in the political sphere. The econowonks reading this could name the politics of economists Paul Krugman and Greg Mankiw without much hesitation. And a little Googling would uncover the ideological leanings of Martin Feldstein, John Cochrane, Christina Romer or Jonathan Gruber. Even Thomas Malthus and David Ricardo had disagreements over free trade that were mirrored in the House of Commons.

Still, economists’ beliefs are separate from what makes them successful academics: their research prowess. We can easily discount the political opinions economists express in op-eds. But they’re also publishing research in peer-reviewed journals. Are findings on tax rates, minimum wages or government spending also influenced by ideology?

This is not just navel-gazing, as economics research informs public policy. A recent Congressional Budget Office analysis of the minimum wage describes how results from academia influenced the CBO’s projections. If those findings were at least partially influenced by political beliefs, then the CBO’s assessments may be unwittingly biased.

So we set out to test the idea of nonpartisan economics on a large scale. In a recent paper, we researched whether economists’ political leanings were associated with their professional work. The answer: yes.

Our main proxy for research was the text that appeared in academic papers. To identify political leanings, we had to figure out a way to measure the ideology of any economist — not just people like Krugman and Mankiw. Luckily, there’s a growing body of research on how to detect people’s ideology (or mood or personality type) from the way they write.

We first needed to determine the political leanings of just a sample of economists, which we did by linking about 2,000 economists to their campaign contributions and political petition signatures. These economists represent faculty from all types of institutions including many from the most prestigious universities in the country. We determined that there was a 60-40 liberal-conservative split among the economists in our data.

With this knowledge about actual ideology in hand, we built an algorithm that discovered the relationships between political leanings and word choice in about 18,000 academic papers written by our sample of economists. For example, when writing about business cycles, we discovered conservatives were more likely to write “laissez faire” or “monetary economics” while liberals more often discussed “Keynesian economics” and “labor markets.” (The table below shows the most ideological phrases when economists write about macroeconomics.)

Using these associations, we could then predict the ideology of any economist not in our sample by feeding his or her body of work into our algorithm. The results weren’t perfect, but the algorithm showed promising ability in distinguishing between liberal and conservative economists. To understand how well it performed, imagine that you randomly pick two economists and predict their ideologies. Random guessing would get it right 50 percent of the time and a perfect model would be able to produce the right affiliation 100 percent of the time. Our algorithm got it right 74.1 percent of the time, and was consistently able to extract a signal from inherently noisy text. If peer review and other professional norms are working as intended, then we shouldn’t be able to find any connection between ideology and text.

We then used these predicted ideologies to get a better understanding of the role political beliefs play in economics.

We first found that an economist’s research area is correlated with his or her political leanings. For example, macroeconomists and financial economists are more right-leaning on average while labor economists tend to be left-leaning. Economists at business schools, no matter their specialty, lean conservative. Apparently, there is “political sorting” in the academic labor market.

If there is job-market sorting, then maybe editors of journals are responsible. After all, academics make their careers off publishing. So we looked at whether journal editors influenced the ideology of the papers appearing in their journals.

We have good news for economics here: There’s no evidence that publication decisions are determined by editor ideology.

Then what explains our ability to detect ideology from text? Since ideology differs by field, another possibility is that a journal’s peer reviewers are already ideologically aligned. Liberal economists may choose to study labor markets because they know others in the field have similar beliefs. This is not only more ideologically comforting — it also makes it easier for those who share an ideology with reviewers to publish.

At this point, you may object to the idea that the text of a paper completely captures the findings it reports. What if a conservative and a liberal economist used ideologically tinged language in their papers, but both came up with the same numerical result about, say, the fiscal spending multiplier? The size of these multipliers, which quantify how much an increase in government spending changes economic growth, were intensely debated during the financial crisis, with conservatives faulting fiscal expansion for increasing the deficit with no economic gain and liberals advocating for much greater deficit spending.

To test if ideology influences policy, e.g. taxes or deficits, we collected numerical research results from fields that have direct impacts on public policy, including government spending, minimum wages, various tax rates, and income mobility. The results from these fields map quite nicely onto the liberal-conservative ideological spectrum. For example, liberals think the fiscal multiplier is high, meaning the government can improve economic growth by increasing spending, while conservatives believe the multiplier is close to zero or negative. A similar logic applies to numerical results in the other fields.

As the following chart shows, we found a (significant) correlation when we compared the ideologies of authors with the numerical results in their papers. That means that a left-leaning economist is more likely to report numerical results aligned with liberal ideology (and the same is true for right-leaning economists and conservative ideology).

We must point out that the relationships we describe are correlations — we can’t claim that ideology is causing different research results. Although people’s political beliefs don’t change drastically after their mid-20s, it could be that economists’ views are influenced by their findings throughout their careers. In our paper we describe different ways we investigated this possibility and found no impact on our results.

We also stress that our results don’t mean economists are deliberately altering findings. It’s more likely that these correlations are driven by research areas and the methodologies employed by economists of differing political stripes. Economics involves both methodological and normative judgments, and it is difficult to imagine that any social science could completely erase correlations between these two.

So what do our results mean for public policy and the science of economics?

Policymakers may need to “re-center” economists’ findings by adjusting for ideology. Take the area of tax rates for high earners. The average optimal tax rate reported by economists in our data is 41 percent. Using our model, we can also estimate that these economists as a group are slightly left of center. We can then figure out what optimal top tax rate a hypothetical centrist economist would report: 33 percent.

Political disagreements inside economics are probably a healthy reflection of political debates in society overall. While some economists will disagree with this (even the claim that economics is politicized is probably itself political), it’s likely that all stakeholders in economic research understand that the science of economics contains the larger American political splits within it.

CLARIFICATION (Dec. 8, 10:58 a.m.): The article has been updated to make clear that the table only shows the most ideological phrases when economists write about macroeconomics.

CORRECTION (Dec. 14, 11:53 a.m.): A chart in an earlier version of this article was missing about 40 percent of its data points and made the relationship it showed look weaker than it actually is. We’ve updated the article with the correct version of the chart.