{'fraction_non_alphanumeric': 0.03069010343073532, 'fraction_numerical': 0.015524030219107369, 'mean_word_length': 5.1951447245564895, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
COVID-19 and erosion of democracy

The main research question of this study is about the drivers of democracy backsliding during the COVID-19 pandemic, with a special focus on the rule of law and the state of democracy just before the shock. There is growing interest in the political implications of the coronavirus pandemic, debating mostly the misuse of emergencies and violations of various norms by governments; however the links between the current democracy erosion with institutional environment remain unclear. We use a novel global dataset covering the period of the first two waves of the pandemic (January–December 2020), and apply various econometric and machine learning tools to identify institutional, economic and social factors influencing democracy. Our results are of scientific and practical importance and imply that the stronger the rule of law and the higher the level of democracy, the lower the risk of democracy backsliding in the face of the pandemic.


Introduction
The social and economic relevance of the policy responses to the COVID-19 pandemic are incontestable. It is currently being discussed how these extraordinary measures will impact the health system (Carter et al., 2020;Mann et al., 2020), public finance (Maher et al., 2020), essential financial and economic infrastructure (Atkeson, 2020;Goodell, 2020), the global economy (Ozili and Thankom, 2020;McKibbin and Fernando, 2020), as well as economic uncertainty (Baker et al., 2020). Although there is growing interest in the political implications of the coronavirus pandemic, the available studies are mostly focused on populism, or narrowed to a national scope or some single components of democracy (B ertoa and Guerra, 2020;Wunsch, 2020;Landman and Di Gennaro Splendore, 2020). Thus, bird's eye view conclusions regarding the factors leading to democracy backsliding are ambiguous in this context.
The public policies made in response to the COVID-19 pandemic have complicated social life and democratic processes (Kortum et al., 2020). In fact, these political actions are considered a serious threat to democracy, as governments may try to limit democratic rules under the cover of pandemic management. On the other hand, well-managed lockdowns and other means of government interventionism may lead to increased satisfaction with democracy or trust in the government (Bol et al., 2020).
Politicians are under high pressure to make rapid and high-stakes decisions, and the literature suggests that democratic governments are more effective in managing catastrophic situations, such as pandemics or famines, than authoritarian regimes (Petersen, 2020). However, it should be noted that the role of governmental lockdowns in many countries is not significant, and their existence has a little effect on virus transmission rates . Moreover, a strict lockdown policy is usually not associated with lower mortality, but it does cause economic havoc (Bjørnskov, 2021). Nevertheless, the literature suggests that less stringent lockdowns can bring similar epidemiological effects with fewer negative economic effects (Bendavid et al., 2021).
An interesting area of the literature in the context of our research is the so-called misuse of emergencies. It focuses on the fact that authorities in a state of emergency may tend to use solutions that have not been previously verified and often implement them against the interests of some groups within society. Some authors warn against the misuse of emergency powers and emphasize the role of the rule of law in the context of limiting excessive sudden power in the hands of rulers (Torbisco Casals, 2020). Similarly, the literature also deals with the issue of human rights abuses in the pandemic era (Davis, 2020). On the other hand, through empirical analysis of the reasons for the imposition of a state of emergency by the government, it is found that a strong rule of law inhibits such imposition, which can be easily used to pursue opportunistic goals by the government (Bjørnskov and Voigt, 2020).
In this article, we ask the following research question: 'What is the relevance of the rule of law and the current state of democracy in susceptibility to democracy backsliding in the face of COVID-19?'. In our study, we refer to the short-term effects of the pandemic as external shock.
Currently, the phenomenon of democracy backsliding and the influence of the rule of law are being analyzed by many authors in the context of the pandemic. Several countries considered to be strong democracies, as a result of COVID-19, experienced the erosion of democracy through violations of political norms (Kurlantzick, 2021). The relevance of the rule of law is widely emphasized, with indicators at high levels ensuring legitimacy for necessary actions following a pandemic (Grogan and Beqiraj, 2021). Moreover, the available studies often associate issues related to the rule of law and the weakening of democracy with neglecting the rule of law institutions, which results in democracy backsliding in times of crisis (International Development Law Organization, 2020).
An alleged democracy recession can be observed in recent years (Andersen, 2019). The literature suggests that democracy backsliding is deeply rooted in the institutional environment. Institutions enable political elites to control regime changes and consolidate their democratic privileges (Gandhi, 2019). Even if democratic institutions appear to be well established, it is important to remember that political actors can, to some extent, shape institutions. The literature also indicates that countries which have undergone democratic transition relatively recently are in danger of reverting to illiberalism if the elites are not restrained by institutions (Dawson and Hanley, 2019). In fact, core democratic virtues are not given once and for alla proper balance between the state and society has to be maintained to avoid backsliding . Thus, both institutions and political elites can play a key role in the context of democracy. Strong, stable and respected institutions may prevent societies from democracy erosion (Reenock et al., 2013;Bugaric, 2019). It is also argued that political and social polarization may lead to democracy erosion (Enyedi, 2016;McCoy et al., 2018). Nevertheless, attempts to explain the phenomenon of democracy backsliding remain inchoate (Waldner and Lust, 2018). Global negative shocks, such as the pandemic, still constitute an underexploited niche in the context of democratization or erosion of democracy. The literature involving the subject of epidemics is rather focused on the way that democracy may handle public health problems (Cooper et al., 2004;Ruger, 2005).
Europe, the cradle of democracy, perfectly illustrates the role of the current state of democracy in the context of democracy backsliding in the face of the COVID-19. Countries with a strong, unwavering liberal democracy, such as Denmark, Belgium, Switzerland, and Germany, did not register serious violations of democracy. Countries fully or almost devoid of democratic rules, such as Russia, Belarus, and Serbia, registered notorious violations of citizens' rights during the pandemic. However, the most interesting group of countries are those democracies that have been weakened for the last several years, such as Hungary and Poland. These states have registered numerous violations of the democratic rules in force, e.g., in Poland this was strongly linked to the presidential elections, where the ruling party pursued its opportunistic goals (Piontek and Ossowski, 2021;Musiał-Karg and Kapsa, 2020).
Our contribution to the literature is twofold. Firstly, we provide added value to the strand of literature on the outcome of the politics during the COVID-19 pandemic, as the thread regarding quality of democracy has been inconclusive so far. Secondly, our study is a contribution to the literature of determinants of democracy erosion, as we consider the consequences of global pandemic for democracy backsliding.
The paper is structured as follows. In the next section, we present theoretical and empirical background regarding determinants of democracy and democratization. Section 3 covers the data and our empirical methodology, as well as the results. Section 4 concludes and summarizes the results of our research.

Literature review
In this part, we introduce factors identified in the literature as affecting democracy erosion or stability of democracy. Based on this review, in the empirical section, we aim to verify how the factors mentioned below influence democracy in a particular context of the COVID-19 pandemic.
Starting with various characteristics of the democracy backsliding phenomenon, the literature indicates that the gradual weakening of democracy is characterized by a tilt towards autocracy (Lührmann and Lindberg, 2019). There is also evidence that countries that have smoothly transitioned from autocracy to democracy in the past are at risk of the process of democracy backsliding, which entails moving again towards autocracy (Castaldo, 2020). Moreover, an autocratic regime in a strong neighbouring country may have an impact on democracy backsliding in a dependent country (Fong, 2021).
The literature suggests that institutions and institutional constraints are essential for sustaining democratic regimes (Erisen and Wiltse, 2017). Particularly in poor countries, the viability of democracy is strongly dependent on institutional inheritance (Clague et al., 2001). The rule of law is mentioned as one of the most critical factors for democracy and democratization. Firstly, the law provides powers for governments, but at the same time regulations constitute legal enforcement of the adequate limits of those powers (Feldman, 1990). It prevents the majority from violating natural justice, including the rights of minority groups. Democracy is especially threatened, when there is no respect for the rule of law by the executive and legislature, as then the government can easily suppress criticism in the media, restrict and repress the activities of non-governmental institutions, and avoid responsibility for abuse of powers, corruption or even electoral fraud (Bond and Gosty nska-Jakubowska, 2020). Importantly, actors that do not fully abide with the norms and institutions, covering also the rule of law, may try to dismantle the liberal components of democracy (Merkel and Lührmann, 2021). This, in turn, may indeed affect the liberal aspects of democracy, polarize the political stage, and result in democracy backsliding. What is more, the rule of law and democracy seem to be mutually reinforcing (Rigobon and Rodrik, 2005). Respect for the rule of law is perceived as a force leading to the consolidation of democracy (Bugaric, 2008). The rule of law is generally expected to lead to fair, transparent and effective governance, which are especially important for democracy (Diamond, 2010).
What may matter for resistance to democracy backsliding is the degree of institutional maturity and democracy consolidation (Heo and Hahm, 2015). A consolidated democracy is interpreted as one unlikely to break down (Schedler, 2001). Young democracies or simply unstable ones are assumed to be more vulnerable to all sorts of potential conflict and political abuse (Senese, 1999). Thus, the maturity of the regime may be as important as the type of regime (Senese, 1999). To expand on the subject of unstable democracies, as a rule, for such democracies which are not yet fully consolidated, there is a risk of democracy backsliding (Gora and de Wilde, 2020). The literature also suggests that instability of democracy occurs as a result of presidential hegemony, which appears as another factor related to democracy backsliding (P erez-Liñ an et al., 2019). On the contrary, vulnerability to democracy backsliding is relatively weaker in countries defined as sustainable democracies (Luo and Przeworski, 2019).
On the whole, studies imply a bi-directional causal relationship between economic development and democracy (Baklouti and Boujelbene, 2018). Support for democracy appears to be the highest in countries with relatively high economic development (Andersen, 2012). Even if economic progress hampers major institutional change, it increases the chances that such a change will be directed towards democracy (Kennedy, 2010). The probability that development will bring democratization is higher in periods of regime vulnerability (Miller, 2012). While the causal relationship described above is generally accepted, the inverse relationship, according to which democratization leads to economic development of the state, still provokes a heated debate. Many researchers question the impact of democracy on economic development (Przeworski and Limongi, 1993;Barro, 1997), while others argue that democracy causes growth (Rodrik and Wacziarg, 2005;. Importantly, the above-mentioned bi-directional relationship is considered in the Hayek-Friedman hypothesis. According to this hypothesis, societies that enjoy political freedom also benefit from the free market (Friedman, 1962). The literature provides empirical verifications of this hypothesis, confirming that high political freedom almost cannot exist along with low economic freedom. Cases of countries that meet both conditions are in a decisive minority and expose that such countries gain economic freedom over time, which proves the validity of this hypothesis in the long run (Lawson and Clark, 2010). Moreover, it has been proved that economic freedom is required to maintain political freedom (Kapas and Czegledi, 2018). Another point is that economic instability, approximated, i.a., by high inflation rate as a signal of macroeconomic policy failure, may influence political stability or political change (Hayo and Voigt, 2010). For example, a relationship between the level of inflation and the frequency of military government has been empirically confirmed (Paldam, 1987).
There is a common assumption that high levels of education are a prerequisite for democracy and an essential factor of democratization, alongside some deviant cases (Lipset, 1959). It is claimed that the frailties of education boost the fragility of democracy (Minow, 2017). The logic is that access to education and increasing education expenditure are principles that promote democracy. Generally, education fosters development of democracy (Bougharriou et al., 2017) and drives democracy dividend (Apergis, 2018). Thus, it may be concluded that education predicts democracy, but empirical analyses of this relationship are challenging in the context of model specification and instrumentation strategies (Bobba and Coviello, 2007;Castell o-Climent, 2008).
Increasing trade flows are a key component of globalizationliberalization of trade policy. The liberal approach in the literature basically assumes that trade openness and increased trade imply fewer violations of the essential democratic values. This perspective is empirically confirmed for developing countries and human rights protection (Harrelson-Stephens and Callaway, 2010). Also, in a broader perspective, trade openness seems to shape political institutions (Dizaji, 2019). In addition, quantitative studies reveal that authoritarian regimes are even more sensitive to changes in trade openness than democratic or intermediate ones (Rudra and Haggard, 2005). However, regime change toward democracy is usually associated with trade liberalization (Milner and Kubota, 2005;Eichengreen and Lebland, 2008).
In general, the literature indicates a negative association between natural resources, namely oil or minerals, and democracy. The wellknown 'resource curse' has been linked with repression, patrimonialism and the collapse of the fundamentals of democracy (McFerson, 2010). Some crucial channels of transmission of the negative impact of natural resources on democracy are corruption and conflict events (Bhattacharyya and Hodler, 2010;Berman et al., 2017). In general, the negative association between natural resources and democracy is robust for various measures of democracy and abundance of resources (Aslaksen, 2010). Meta-analyses suggest a nontrivial negative relationship between oil and democracy, but with a notable variation in this link across regions and institutional contexts (Ahmadov, 2013).
The impact of divided societies on democracy remains one of the most challenging questions. The argument that linguistically, religiously or ethnically fractionalised societies are not capable of developing and maintaining democracy is not robust (Jensen and Skaaning, 2011;Erisen and Wiltse, 2017). One of the considered channels of the impact of fractionalization on political regimes is the expectation that more diverse societies are more prone to conflict, which makes them less hospitable to democracy, but in fact there is scant evidence for this supposition (Fish and Brooks, 2004). Even if most dimensions of heterogeneity do not hinder democracy, they may complicate democratic consolidation (Merkel and Weiffen, 2012). On the contrary, diversity may lead to practices and institutions promoting open politics (Fish and Kroenig, 2006). Empirical evidence also suggests that in some circumstances religious fractionalization leads to more democratization (Akdede, 2010). However, religious diversity may decrease prospects for democracy, whereas ethno-linguistic diversity may increase them (Gerring et al., 2018).
Furthermore, diversity in the context of democracy may also be related to economic inequality. The results of empirical studies suggests that economic inequality is relevant for democracy and this effect is stronger, among others, than economic development (Andersen, 2012). Inequality is considered among structural and contextual challenges predicting democratic discontent and autocratization (Lührmann, 2021). In a more detailed perspective, inequality may lead to inadequate supply of democratic parties and processes, which in turn can raise citizens' discontent with democracy. Then, in the next stage, the supply of anti-pluralist parties, together with political polarization and anti-pluralist voter mobilization, lead to rising anti-pluralism, which stimulates autocratization (Lührmann, 2021). Therefore, the mechanism of this impact is based, i.a., on the issue of satisfaction with democracy. It appears that electoral losers in countries characterized by relatively high economic inequality are more likely to be dissatisfied with democracy (Min Han and Chang, 2016;Lührmann, 2021). This, as mentioned above, may affect de facto portrayal of democracy. On the other hand, quantitative works imply that relatively more unequal societies are more prone to experience democratic improvements following economic downturns (Dorsch and Maarek, 2020). These findings suggest that the relationships between democracy and economic inequality are complex in practice. Empirical studies also imply that income inequality is strongly correlated with regime stability (Muller, 1988). Overall, high levels of economic inequality lead to lower political interest, frequency of political debate and participation in elections among citizens (Solt, 2008). Moreover, unequal societies tend to develop exploitative institutions, which is contrary to democratic virtues (Savoia et al., 2010).
Importantly, population density is considered among the factors affecting democracy (Green, 2013). Population density may be referred to, in this context, by institutions designed for better control of indigenous populations (Acemoglu et al., 2002). Last but not least, COVID-19 incidence rate to population is the most popular indicator of this pandemic across various countries, as it describes its spread (Pan et al., 2020). Thus, this measure is useful as an approximation of the severity of the pandemic.

Data and variables
Multiple publicly available expert databases were used to conduct our study. The primary data source in the study is the Pandemic Backsliding (PanDEM) (Edgell et al., 2020) novel database accompanied by the Varieties of Democracy data (V-DEM) (Coppedge et al., 2020). These sources gather indices that approximate the extent to which democratic rules were violated due to the COVID-19 pandemic in 143 countries between 11 March 2020 and December 10, 2020, so the first two waves of the pandemic. PanDEM is powered by data gathered by a team of over 50 trained research assistants, who source information from official government documents, websites, academic databases, trusted inter-governmental, state or independent organizations and trusted media outlets. Based on this raw data, researchers rate predefined types of violations per country, for instance, discriminatory measures (non; de-facto minor; de-jure minor; major, either de-facto or de-jure), abusive enforcement (no; sometimes; often; widespread). A more detailed description of PanDEM and its methodology is presented in the codebook (Edgell et al., 2020). In our analysis, we use the following democratic violations indices: Pandemic Violations of Democratic Standard Index (pandem) 1 and Pandemic Backsliding Index (panback). 2 They are applied as explained variables in our empirical research. We are aware of the limitations of this data, so we developed the conclusions with adequate caution. We also took advantage of the scope of the V-DEM data to get democratic, demographic and politico-geographic characteristics of countries.
Following the literature, we decided to put our research focus on the rule of law (rule) and the current state of democratizationelectoral democracy (polyarchy). Electoral democracy may be taken as an essential component for the real functioning of any other dimensions of representative democracy, namely liberal or participatory ones (Teorell et al., 2016). Therefore, this index is our basis for analyzing the level of democratization. We also accounted for the level of education, by considering education among citizens older than 15 (logarithm: educa-tion_log). Politico-geographic regressors are represented as dummy variables: region_geo. In order to capture the more complete demographic picture of the analyzed countries, we used the fractionalization database (Alesina et al., 2003). We selected this specific fractionalization dataset because of recognition and reputation it has among the leading research on democratization (Norris, 2006;Merkel and Weiffen, 2012;Anyanwu and Erhijakpor, 2014). The fractionalization variables represent the probability of not belonging to the same ethnic group (ethnic_frac), linguistic group (ling_frac) and religious group (relig_ frac) by two random individuals. The final group of covariates are economic and demographic-pandemic factors, which we obtained from the World Bank, World Health Organization and Our World in Data databases. These are: economic inequality represented by the Gini index (logarithm: gini_log), gross domestic product per capita (logarithm: gdp_pc_log) in U.S. dollars, 3 inflation indicated by the consumer price index (inflation), trade openness as a total share of import and export in GDP (logarithm: trade_gdp_log), profit from the sale of crude oil (oil) and minerals (mineral) at world prices as a share of GDP, population density (logarithm: densi-ty_log) and COVID-19 incidence rate to population (cases_ratio). In addition, according to the latest World Bank classification, a dummy variable exposing affiliation to a particular income group is included (income_group).
All explanatory variables are mostly from 2019 as the last available period before the pandemic. In the absence of data, we undertook the data imputation in several ways: single entry of the latest available value from original source, single entry of publicly available data from other sources, imputation of 0 for lack of data for oil and mineral profits, and imputation of means in case of the affiliation to the income group or continent. The final dataset covers 143 countries and 24 variables. Table 1 shows a description of all the variables with their sources. Descriptive statistics for all non-categorical variables are presented in Table 2. Figs. 7-8 contain scatter plots that show the relationship between the dependent variable and one of the main exogenous variablesrule (the rule of law).

Empirical design
In our empirical analysis, we estimated the model which takes the following functional form: where the dependent variables (panback and pandem) indicate to what extent government responses to the COVID-19 pandemic violate democratic standards for emergency measures in country i (democracy_backsliding i ). Larger values indicate more violations, and thus less democratic standards. Additionally, in the case of panback, violations are weighted with the liberal democracy index. Rule and polyarchy are the equivalents of the rule of law and the state of democracy, respectively. We were particularly interested in the effects of these two variables on democracy backsliding. Since these were our main explanatory variables, we decided to include their squares (polyarchy2, rule2) in the regression for the panback variable to reflect the characteristics of the Fig. 1-2. Histograms for dependent variables. Fig. 1 shows the histogram for the pandem variable. The distribution of this index resembles normal distribution. However, there is a quite large number of zeros (lack of democratic violations) and a long tail is noticeable for high pandem values. Fig. 2 shows the histogram for the panback variable. Analyzing the distribution of this index, a definite predominance of low values is noticeable, compared to high values that represent the long tail of this distribution. Source: Own elaboration.
1 Pandem is defined as the sum of the restrictions introduced during the pandemic, divided by all violations recorded, thereby it is a discrete variable. It takes 15 unique levels. They are distributed between 0 and 0.7 (see Fig. 1). The most frequent value is 0.25 (18 per cent of all countries). If we treat the variable as continuous (referring to the definition, it is an interval), we can state that it is right-skewed distributed. Fig. 3 shows that the distributions of pandem for the following continents -Asia, Africa and the Americas -are consistent with the overall distribution of the variable; the average values predominate and the extremely high values are few in number. Pandem looks a little different for Europe and Oceaniathe low values of the variable are strongly dominant and extremes are significantly lower than on other continents. Taking into account the income classification (see Fig. 4), pandem in low income, lower middle income and upper middle income groups looks very similar, that is strong dominance values of 0.2-0.3. In the case of high income countries, the vast majority of values are close to 0 with a few exceptions, like Poland.
2 Panback shows evident violations of democracy during the pandemic. This variable is based on the assumption that the most vulnerable countries are those with a moderate democracy. The index captures an inverted u-shaped vulnerability to democracy backsliding. Panback is a continuous variable that takes the values from 0 to 0.614 (see Fig. 2). We can state that the variable is right-skewed distributed. According to Fig. 5, the distributions of panback for continents are almost consistent with the overall distribution. The most common values are close to zero and for the next ones, as the value of the variable increases, a decrease in the frequency is noticeable. Considering the income classification of panback (see Fig. 6) the most diverse group is lower middle income countries, where values are spread from 0 to the maximum value for that variable. For high income countries, a strong dominance of low values close to 0 can be seen again. For low income and upper middle income groups, the distributions are very similar, with most observations focusing on low values but higher than 0.
panback variable more precisely. To properly interpret the effect of variables with the squared terms on the dependent variable, it is necessary to find a so-called turning point. The turning point is the level of the exogenous variable, from which the effect on the endogenous variable reverts. Given that panback is inverted U-shaped, the turning point in this case is the maximum level of the exogeneous variable (rule or polyarchy respectively) up to which the increase in the exogeneous variable brings the increase in the endogenous variable (panback). Above the turning point, an increase in the exogeneous variable causes a decrease in the endogenous variable. Moreover, we included a vector of control variables, which can be considered exogenous to a state of democracy, but potentially statistically related to both state of democracy and democracy backsliding. We are aware that endogeneity may occur to some extent in our case. For example, one of the determinants of democracy backsliding reflects economic advancement of a country, and, in turn, economic results depend on the level of democracy. Nevertheless, we performed various robustness checks to reduce the risk of distorted results. The functional form is developed in line with the literature. Our baseline models are estimated using OLS and robust standard errors are reported. Standard diagnostic tests for OLS have been performed on all models. In order to analyze the research problem in depth, we also apply the random forest (Breiman, 2001) class model. The biggest advantage of the tree model in our context is a lack of linear functional form assumption. Therefore, it can handle highly non-linear interactions, which are exceedingly difficult to include in common linear models. Manual searches for an appropriate polynomial or power functional form for the OLS model usually fail due to a large space of possible solutions. It is important to emphasize that the non-linear approach was of particular importance to us in the case of the Pandemic Backsliding Index, which, due to its u-shaped characteristics, is difficult to model with a linear functional form. The bagging technique applied in random forest allows us to generalize the analyzed phenomenon and avoid excessive variance. The model interpretation is not as trivial as for OLS or CART, however, it is feasible with techniques such as feature importance based on the mean decrease in impurity (Breiman, 2001), feature importance based on permutation (Fisher et al., 2019), feature importance and feature effects powered by SHapley Additive exPlanations (Lundberg and Lee, 2017). We believe that these techniques allowed us to draw reliable conclusions.
The random forest modeling process is relatively straightforward, as it is limited to model estimation with expertly assumed hyperparameters: MSE criteriathe default one for regression task, number of decision trees set to 50the increasing number of estimators does not affect overfitting (Hastie et al., 2017). Moreover, we have empirically verified that the number of trees larger than 50 does not improve the quality of the model, thus we should stop at this level (Oshiro et al., 2012). Maximum tree depth is equal to threeas if this parameter is not adjusted by the user, it can cause excessive tree depth and overfitting (Hastie et al., 2017). The Scikit-learn documentation, in turn, suggests that the reference value of tree depth should be set to three (Pedregosa et al., 2011), other settings remain standard. The lack of cross-validation and other anti-overfitting techniques is dictated by a very small research sample. Thus, these hyperparameters are supposed to provide a reasonable solution for a bias-variance trade-off. Finally, two various models are developed (each for another dependent variable representing pandemic democracy backsliding). For our model estimation, we use analogous variables as in the OLS models and all available countries (objects).
Feature importance techniques enable us to analyze the significance of a given variable throughout the model and determine its quasiparticipation in the predictive power of the model. Some of the most common in the field of applied machine learning are those based on the mean decrease in impurity (quantified by the splitting criterion of the decision trees) and permutation (Molnar, 2019). Mean decrease in impurity feature importance describes how much each feature decreases the weighted impurity in a tree, while permutation feature importance exposes how random re-shuffling of each predictor influences model performance. The first approach, in the case of trees, is often strongly biased and favors high-cardinality features over low-cardinality features. This problem does not occur for permutation importance (Pedregosa et al., 2011). Therefore, permutation importance with 10 repeats (number of times to permute a feature) is applied in our research. On the other hand, SHapley Additive exPlanations is a game theoretic approach to explain the output of any machine learning model. As we were focused on summarizing the effects of all the features, we used a SHAP summary plot. It sorts features by the sum of SHAP value magnitudes over all samples and uses SHAP values to show the distribution of the impact each feature has on the model output. The color represents the feature value (red for high, blue for low). What is more, we used a SHAP dependence plot to examine the overall effect of a single feature (for example rule and polyarchy) across the whole dataset. This kind of plot represents a change in dependent variable as rule (polyarchy) changes.

Results
First, we proceeded to the analysis of the results of the Ordinary Least Square regression models. Table 3 presents the estimates of coefficients for our three OLS models, including categorical variables. Columns 1-2 show the results for OLS regression for the full specification. Columns 3-4 demonstrate the regression results with all considered variables except polyarchy to allow for further investigation of the importance of   Alesina et al. (2003) relig_frac Religious fractionalization describes the probability of not belonging to the same religious group. Alesina et al. (2003) gini Gini coefficient. World Bank (2020) gdp_pc Gross domestic product per capita (GDP at exchange-rate, in current U.S. dollars).
World Bank (2020); OECD (2020) inflation Inflation indicated by the consumer price index.

International
Monetary Fund (2020) oil Profit from the sale of crude oil at world prices (% of GDP).
World Bank (2020) mineral Profit from the sale of minerals (tin, gold, lead, zinc, iron, copper, nickel, silver, bauxite and phosphate) at world prices (% of GDP).
World Bank (2020) trade_gdp Sum of exports and imports of goods and services (% of GDP).
World Bank (2020); OECD (2020) cases_ratio Ratio of accumulated Covid-19 cases to population multiplied by 100,000 Our World in Data (2020) density Population densitypopulation divided by land area in square kilometers.
World Bank (2020) income_group Allocation of countries to one of the four income groups: 'Low income', 'Upper middle income', 'Lower middle income' and 'High income'.
World Bank (2020) Source: Own elaboration. the rule of law. Analogously, columns 5-6 present the regression results excluding the variable rule, to allow for deeper analysis of the relevance of the current state of democracy. 4 The obtained output suggests differences between the results for panback and pandem, as these variables capture various aspects of democracy backsliding. In the case of panback, violations of democracy in countries with a mediocre democracy (vulnerable for backsliding) are weighted more heavily as compared to pandem. According to columns 1-2, an increase in polyarchy causes a decrease in pandem, while for the panback regression, polyarchy and its squared version are statistically significant and show that up to a certain level of polyarchy, panback variable increases and then begins to decrease. Likewise, rule in the case of the panback regression is also highly significant and analogous to polyarchy; with higher rule, panback rises up to a certain level of rule and then starts to decrease. However, it should be noted that for full specification of the pandem regression, rule is statistically insignificant and it has no impact on democratic violations. Considering the control variables, an increase in inflation leads to growth of both investigated dependent variables. Subsequently, higher profits from oil causes a decrease only for the pandem variable. Taking into account the impact of the categorical variables, income groups are statistically insignificant for all regressions. In the case of the geographical region variable, countries in Southern Europe, Northern Africa, Central Asia and Central America (region_geo_3, region_geo_5, region_geo_11, region_geo_17) have a higher panback index in comparison to the base region, which is Western Europe (region_geo_1). Regarding th pandem regression, only countries located in Southern Europe (region_geo_3) have more democratic violations than countries located in the base region. Referring to columns 3-4, the exclusion of polyarchy matters for the significance of rule for the pandem regression. An increase in the level of rule of law causes a decrease of the pandem variable. In the case of panback regression, rule is again highly significant and its effects are similar as in previous specification; however, the turning point (level of rule from which panback starts to decrease) is slightly greater than for regression including the polyarchy variable. Other variables that are statistically significant are inflation and gini_log. Thereby, growth of inflation causes the panback variable to increase and greater income inequality (approximated by Gini index) leads to an increase in pandem. Countries in Southern Europe, Northern Africa, Middle Africa, Eastern Africa, Central Asia, South Asia, North America and Central America (region_geo_3, region_geo_5, region_geo_7, region_geo_8, region_geo_11, region_geo_14, region_geo_16, and region_geo_17) have a higher panback index than countries in the base one, Western Europe (region_geo_1). Considering the pandem index, countries located in Southern Europe, Eastern Europe, Northern Africa, Western Asia and South Asia (region_-geo_3, region_geo_4, region_geo_5, region_geo_10, region_geo_14) have more democratic violations than countries in the base region.
Subsequently, the estimations in columns 5-6 show that polyarchy is highly significant when rule is excluded. An increase in polyarchy causes a decrease in the pandem variable. For the panback regression, an increase in polyarchy leads to an increase in panback up to a certain value of polyarchy and then panback starts to decrease. Other continuous variables that are statistically significant are inflation and oil. An increase in those variables causes pandem index to grow and fall respectively. Countries in Southern Europe, Northern Africa and Central Asia (region_geo_3, region_geo_5 and region_geo_11) have a higher panback index than countries in Western Europe. In turn, considering the pandem regression, only countries located in Southern Europe (region_geo_3) have a higher pandem index than countries in the base region. Table 4 presents the regression results analogous to the above ones, but excluding categorical variables. Columns 1-2 show results for OLS regression without excluding any continuous variables. Columns 3-4 demonstrate the regression results without the variable polyarchy, while columns 5-6 exclude the variable rule from regression.
Regarding the main explanatory variables, the results for both rule and polyarchy look similar as in regressions with categorical variables (see Table 3). Thus, both of these variables are highly significant for nearly all of the six regressions in Table 4. Again, the exception is the pandem regression that includes all variables, where rule is statistically insignificant. For subsequent pandem regressions, rule and polyarchy are significant, and their growth causes a decrease in the number of democratic violations. Considering panback regressions, an increase in rule and polyarchy results in growth of the panback index up to a certain value of rule or polyarchy and then panback starts to decrease. Given the control variables, an increase in income inequality (gini_log) causes the dependent variable to grow for each specification. In the case of relig_frac, greater religious diversity causes every dependent variable to drop, except panback for a specification that excludes the polyarchy variable. The last significant variables are inflation and oil, which cause a successive increase and decrease in the panback variable only for a specification that includes all variables.
Finally, to check the reliability of the results, we performed robustness checks for all of the regressions above. Table 5 shows the regression results for specifications with categorical variables, potentially excluding variables collinear with gdp_pc: gini_log, income_categories, and potentially excluding variables collinear with each other: ethnic_frac, ling_frac and Fig. 7-8. Scatter plots for dependent variables and rule. Fig. 7 shows the scatter plot for the pandem and rule variables. High rule of law indicates a low number of democratic violations. However, for medium and low rule of law values, there are both countries that have low pandem and countries that have high pandem index. Nevertheless, the linear relationship between these variables is noticeable in this case. Fig. 8 shows the scatter plot for panback and rule variables. As the plot shows, the relationship between the variables is definitely not linear. A large number of countries with high rule values have a low panback index. Similarly, countries with low rule values also tend to have low panback. By far, the greatest variation occurs for countries with average rule values, for which panback values range from the lowest to the highest values. Source: Own elaboration.
relig_frac, replaced in regressions with a new variable (fractionalization) that sums the above three diversity indexes. Table 6 presents the regression results for the same variables as for the regressions in Table 5, excluding categorical variables. Table 7, in turn, shows the regression results for specifications with categorical variables, excluding variables that originally had too many missing values, which forced the use of multiple imputations: gini_log and education_log. Finally, Table 8 depicts the regression results for identical variables to the regressions in Table 7, excluding categorical variables. All results for our robustness checks from Tables 5-8 are consistent with the results from the main regressions contained in Tables 3 and 4 The significance and direction of the relationship of variables in regressions in the newly specified specifications are coherent with the main regressions, which means that the potentially collinear variables and variables with too many modifications do not Note: *p < 0.1; **p < 0.05; ***p < 0.01. Additionally, we performed the regressions for the above specification for the dependent variables (panback and pandem) from quarters 2, 3 and 4 of 2020. For each of these 3 periods, the results are consistent with the above results for the entire period of the study. Source: Own elaboration. Note: *p < 0.1; **p < 0.05; ***p < 0.01. Additionally, we performed the regressions for the above specification for the dependent variables (panback and pandem) from quarters 2, 3 and 4 of 2020. For each of these 3 periods, the results are consistent with the above results for the entire period of the study. Source: Own elaboration.
distort the results of our main models. The next step was to assess the results obtained with the random forest models, which, unlike the OLS models, do not assume a linear functional form, and thus are able to identify more dependencies between the target variable and its determinants. We first analyzed the model with the panback target variable for which lack of assumption about the linearity of the functional form is crucial. Based on Fig. 9, which visualizes permutation importance, we can indicate the five most important variables in the model (starting with the most relevant): rule, polyarchy, density_log, gini_log, gdp_pc_log. Using the SHAP summary plot (Fig. 10), it is possible to identify a highly non-linear relationship between the polyarchy variable and the expected value of the target variable; namely, very high values of polyarchy have parallelly strong positive and negative impacts on the final output. Moreover, the higher the value of the rule variable, the lower the expected value of the dependent variable. High values of density_log and gini_log lead to high values of the dependent variables. Fig. 13 shows the change in panback prediction as polyarchy changes. We can clearly observe the u-shaped relationship between panback and polyarchy, which was hard to observe in Fig. 10. As the value of the polyarchy variable increases to a level of about 0.6, the forecasted value of the panback increases. After exceeding this level, it will gradually decrease. Different conclusions can be drawn by analyzing the impact of a changing rule variable on the final model prediction (see Fig. 14). Here we observe a positive relation between rule and panback till a breakeven point around 0.7, after its exceeding significant decreases in the predicted panback is visible. The effect of the rule variable is much more stable than that of polyarchy because a smaller dispersion of SHAP value for the rule value is observed, as opposed to polyarchy.
The results of the random forest model with the pandem dependent variable were then analyzed. Fig. 11 suggests that only about four variables are clearly significant in the model: rule, density_log, polyarchy and relig_frac. Fig. 12 the SHAP summary plot indicates that the higher the value of the rule variable, the greater the negative impact on the target variable. High density_log values favor a high pandem value. The higher the polyarchy, the smaller the value of the dependent variable. The greater the religious diversity, the lower the expected value of pandem variable ceteris paribus. By the use of the dependency plot (see Fig. 15), we analyzed in a more detailed way the non-linear effects of polyarchy on the dependent variable. As a result, it may be concluded that this relation is negative and, despite an early flattening (ignoring outliers), it increases over time to become fully apparent at the end of the right tail of the polyarchy distribution (above 0.8). Other interesting conclusions can be drawn by analyzing Fig. 16. Due to lack of linearity, two levels of rule's SHAP value can be distinguished here. A rule between 0.0 and 0.8 has a positive effect on the model result, while values above 0.8 have a strictly monotonic increasing negative impact on the forecast value of variable Note: *p < 0.1; **p < 0.05; ***p < 0.01. Source: Own elaboration.  Note: *p < 0.1; **p < 0.05; ***p < 0.01. Source: Own elaboration.

pandem.
To sum up, the results of our research are mostly in line with the literature. Increasing the level of electoral democracy and the rule of law is associated with fewer violations of democracy during the pandemic, which is related to the stability of democracy despite the short-term shock. However, it should also be noted that when considering the pandem models with the complete specification, the occurrence of the state of democracy variable makes the rule of law irrelevant. Nevertheless, this phenomenon may occur as the rule of law is conceptually essential for the current state of electoral democracy. Taking into account the inverted u-shaped democracy backsliding index, its distribution is unusual by weighing more heavily violations of democracy in countries with a moderate state of democracy. Thanks to the results of non-linear models, it can be confirmed that the relationship of the independent variables with the dependent variable adjusts to this shape. Considering control variables that are significant, we can say that their impact is in compliance with the available literature. Higher religious diversity and oil rents as a share of GDP imply that serious violations of democracy during the pandemic are less probable. In turn, higher values of population density, economic inequality and inflation bring an increase in violations of Note: *p < 0.1; **p < 0.05; ***p < 0.01. Source: Own elaboration. democracy. Referring to categorical variables, we can state that countries located in particular geographical locations show similar patterns with reference to factors influencing democracy backsliding.

Conclusion
The key goal of our study was to contribute to a better understanding of the factors shaping the short-term quality of democracy in the context of COVID-19. Although the issue of democracy or democratization has been the subject of debate in social science, the effects of policy reactions to sudden global negative shocks, such as pandemics, on democracy backsliding remain ambiguous. In our study, we provide an analysis of the factors making democracy resistant to political abuse.
As a result of our research, we confirm the relevance of law and state of democracy for democracy backsliding during the COVID-19 era. Both econometric and machine learning models imply that the influence of these factors is exceptionally strong. Namely, for the dependent variable defining direct violations of democracy, regardless of the type of model, the increase in the rule of law or the current state of democracy is associated with a decrease in the target variable. In the case of the dependent variable weighted with the index of liberal democracy, the results are slightly different, due to the unusual distribution of the variable. All in all, the direction of this influence for the vast majority of our output is in line with the literature and our expectationsthe stronger the rule of law and the higher levels of democracy, the lower the risk of democracy backsliding in the face of the global pandemic. Other variables that proved to be significant in the course of our study and are worth further investigation are inflation, population density, economic inequality, oil rents as a share of GDP and religious fractionalization. We would also like to stress that the categorical variable denoting the location of a country in a specific geographical region exposes its significance as well.
We believe that our research on the determinants of democracy backsliding in the context of the global pandemic brings a value-added to the literature on institutional economics and law & economics. The obtained results are also important from a practical point of view, as they may be useful for policymakers, civil society organizations or international bodies devoted to boosting the spread of democratic values and sustainable development.
Our study uses a novel dataset that allows us to study the stability of democracy in the short term. A general, but essential point is that we should continuously care about the rule of law and the quality of democracy, if we are willing to get out of future crises unscathed and avoid political debauchery or repression against the society. The pandemic, which is an unexpected deviation from the already adopted democratic standards, enables us to examine the resistance of the long-term determinants of democracy. An important and interesting point would be to verify whether democracy erosion observed during the COVID-19 persists after the end of the pandemic. The systematic and advanced empirical analysis may be useful for developing data-based recommendations for public policies and legal systems to create settings conducive to a stable democracy.
Last but not least, referring to the principles of economics, the theory implies that a majority system imposes a decision-making cost on the Fig. 13-16. SHAP Partial dependence plots for polyarchy and rule with panback and pandem as dependent variables. The above figures present SHAP partial dependence plots for the polyarchy variable (first column of figures: Figs. 13 and 15) and SHAP partial dependence plots for the rule variable (second column of figures: Figs. 14 and 16). Source: Own elaboration.
society (Buchanan and Tullock, 1962). Nowadays, the translation of pandemic effects into costs for society should certainly be investigated further. Moreover, a common strong objection to democracy is the fear that the majority exploit the minority (Olson, 1965). Nevertheless, collective actions within democracies are proving to be effective in combating the effects of the pandemic (Hattke and Martin, 2020).

Declaration of competing interest
We do not report any conflict of interest.