Liberal democracy is in crisis. The crisis is not (yet) one of coups d’état and democratic backsliding; democratic institutions have largely held. The crisis is instead one of confidence or legitimacy. As Journal of Democracy editor Marc Plattner puts it, liberal democracy has a “fading allure.”

Indeed, political scientists Roberto Foa and Yascha Mounk show that public support for democracy is declining, especially among younger generations in Western countries. While their thesis has received some pushback, both sides of this debate are looking at data from only a few polls conducted in only a dozen or so countries. If democracy truly has a fading allure, it should be visible across the globe. I went looking for such evidence.

Here’s how I did my research

I collected data from every cross-national public opinion survey that measured support for democracy or opposition to autocracy. The data are vast in scope: I found 1,179 polls questioning 1.5 million respondents in 151 countries over a 30-year period. But combining that data is difficult, as it’s fractured by the use of dozens of different survey questions and with large gaps in coverage over space and time.

In a forthcoming Political Analysis article, I develop a statistical method for taming such unruly data. The end product is a clean set of opinion estimates that vary smoothly over country and across time. The figures for all 135 countries can be viewed on my website.

So, what do the results say?

1. Support for democracy is declining … but not in the United States and other Western democracies

Public support for democracy did in fact decline in the early 2000s in Western democracies such as Canada, the Netherlands, Germany, and the United States (see the figure). But it has rebounded.

We find the opposite trend in Latin American countries like Brazil, Chile and Venezuela: Support for democracy increases in the mid-2000s, but then decreases after 2010.

Democratic support has also been falling in Africa — for example, in Kenya and Ghana — and Eastern Europe, including Croatia, the Czech Republic and Slovakia.

Some of these are puzzling results. The Latin American, African and Eastern European countries are new democracies, which — according to political science theories of socialization — are supposed to show increasing support for democracy as generation after generation grow up in a democratic society. Instead, their citizens are losing faith in their democratic systems.

2. Autocracies tend to have low support for democracy. Established democracies tend to have high support.

If democratic systems inculcate pro-democratic values in their citizens, as political scientists generally believe, then these countries should show higher support for democracy than autocratic countries. And the longer a country has been democratic, the more supportive its public should be.

This theory is largely supported by these data. Citizens of long-standing democracies show strong attachments to democracy and citizens of long-standing autocracies, such as China, Algeria and Uzbekistan, show weak attachments. We find partial — but notable — exceptions to this rule in the United States and other Western Anglophone democracies like Canada and Australia whose citizens show only middling levels of support for democracy.

3. Support helps sustain democracy … but democracy can survive despite low support.

In a working paper, I find that public support for democracy helps democracy to survive, as political scientists have long argued. Yet democracies can survive without high levels of support. Four major democracies — India, South Africa, Mexico, and Brazil — have low, even falling, levels of support, yet remain democratic. India in particular has long been a graveyard for theories of democratization. It became democratic at a very low level of development and has remained democratic despite weak public support for a democratic system.

In general, however, public support is an advantage for a new democracy, helping to cushion the system against political misfortune. Indeed, Brazil and India have experienced recent downturns in their levels of democracy, while South Africa and Brazil have had recent periods of political turmoil.

4. Support for democracy rises when democracy falls, and falls when democracy rises.

In another working paper, I find that public support for democracy in theory moves in the opposite direction from democracy in practice. When a country’s democratic rights and institutions are eroding, public support for democracy grows. But when these rights and institutions are thriving, public support for democracy drops.

This pattern is a familiar one, and is known as the thermostatic model of public opinion: When the public isn’t getting what it wants and expects, its representatives compete to provide what they do want. Sometimes the public wants more democracy than is supplied; at other times they want less. We can see the thermostatic pattern in South Korea, Pakistan, Croatia and Nigeria: As levels of democracy rise, support falls; and as levels of democracy fall, support rises.

That pattern is particularly clear in Venezuela. After populist Hugo Chávez was elected in 1998, his government eroded some basic democratic institutions and checks and balances. Soon after, public support for democracy rose just as dramatically. By 2013, the Venezuelan public were among the most supportive of democracy of any in the world.

We could interpret these dynamics as the Venezuelan public sending a message to its rulers. Like someone continually turning up the thermostat in a freezing apartment, Venezuelans were demanding greater democratic rights and stronger democratic institutions. That didn’t, however, change the government’s behavior.

The good news is that, despite wavering in the last decade, citizens of the major Western democracies have shown a deep and wide commitment to democracy. The bad news, however, is that citizens of newer democracies in other parts of the world have not. Public support for democracy is declining in many African, Latin American, Asian and Eastern European democracies. Without significant support, these new democracies are exposed to predations by populist and authoritarian leaders.

Christopher Claassen (@chris__claassen) is a lecturer in politics at the University of Glasgow. This research was funded by the Carnegie Trust for the Universities of Scotland.