This function is designed to take the democracy data included in this package and put it in a form suitable for use with the mirt package to replicate the UDS model. It takes a data frame and tries to determine, from the colum names, which variables contain democracy scores.

prepare_data(data, .funs)

Arguments

data

A dataset of democracy scores. For the function to do anything, the column names must contain at least one of the following strings: anckar, arat, blm, bmr, bollen, doorenspleet, wgi, gwf, hadenius, kailitz, lied, munck, pacl, peps, polyarchy, polity, prc, PIPE, svmdi, svolik, ulfelder, utip, v2x, vanhanen_democratization, vanhanen_pmm, or wth. For details of these variables, see the documentation for democracy.

.funs

A names list of functions to modify the columns. It defaults to the following: funs(arat = cut(., breaks = c(0, 50, 60, 70, 80, 90, 100, 109), labels = 1:7, include.lowest = TRUE, right = FALSE), hadenius = cut(., breaks = c(0, 1, 2, 3, 4, 7, 8, 9, 10), labels = 1:8, include.lowest = TRUE, right = FALSE), bollen = cut(., breaks = c(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100), labels = 1:10, include.lowest = TRUE, right = FALSE), vanhanen = cut(., breaks = c(0, 5, 10, 15, 20, 25, 30, 35, 50), labels = 1:8, include.lowest = TRUE, right = FALSE), munck = cut(., breaks = c(0, 0.5, 0.75, 0.99, 1), labels = 1:4, include.lowest = TRUE, right = FALSE), polyarchy_dimensions = cut(., breaks = 20, include.lowest = TRUE, right = FALSE, ordered_result = TRUE), polity = ifelse(. < -10, NA, .), v2x = cut(., breaks = 20, include.lowest = TRUE, right = FALSE, ordered_result = TRUE), v2x_* = cut(., breaks = 20, include.lowest = TRUE, right = FALSE, ordered_result = TRUE), svmdi = cut(., breaks = 20, include.lowest = TRUE, right = FALSE, ordered_result = TRUE), eiu = cut(., breaks = 20, include.lowest = TRUE, right = FALSE, ordered_result = TRUE), wgi = cut(., breaks = 20, include.lowest = TRUE, right = FALSE, ordered_result = TRUE), peps = round(.), other = as.numeric(unclass(factor(.))))

Value

A data frame with the transformed scores, if any.

Details

If the column names contain the strings arat, blm, bollen,wgi, hadenius, munck, pacl, peps, polyarchy_inclusion_dimension, polyarchy_contestation_dimension, polity, prc, v2x, vanhanen_pmm, or vanhanen_democratization, the function performs the following transformations by default: arat: Following Pemstein, Meserve, and Melton's replication code (Pemstein, Meserve, and Melton 2013), the function cuts Arat (1991)'s 0-109 democracy score into 7 intervals with the following cutoffs: 50, 60, 70, 80, 90, and 100. The resulting score is ordinal from 1 to 8. bollen: Following Pemstein, Meserve, and Melton's replication code (Pemstein, Meserve, and Melton 2013), the function cuts Bollen's (2001)'s 0-100 democracy score into 10 intervals with the following cutoffs: 10,20,30,40,50,60,70,80, and 90. The resulting score is ordinal from 1 to 10. wgi: If the World Governance Indicator's index of voice and acocuntability is included in the file, the function cuts it into 20 categories. The resulting score is ordinal from 1 to 20. hadenius: Following Pemstein, Meserve, and Melton's replication code (Pemstein, Meserve, and Melton 2013), the function cuts Hadenius (1992)'s 0-10 democracy score into 8 intervals with the following cutoffs: 1, 2,3,4, 7, 8, and 9. The resulting score is ordinal from 1 to 8. munck: Following Pemstein, Meserve, and Melton's replication code (Pemstein, Meserve, and Melton 2013), the function cuts Munck's (2009)'s 0-1 democracy score into 4 intervals with the following cutoffs: 0.5,0.5,0.75, and 0.99. The resulting score is ordinal from 1 to 4. peps: If any of the variants of the Participation-Enhanced Polity Score (Moon et al 2006) is included in the file, the function rounds its value (eliminates the decimal) and then transforms it into an ordinal measure from 1 to 21. polity: Following Pemstein, Meserve, and Melton's replication code (Pemstein, Meserve, and Melton 2013), the function takes the polity scores and puts NA for any values below -10, and then transforms it into an ordinal measure from 1 to 21. polyarchy_inclusion_dimension, polyarchy_contestation_dimension: If any of the polyarchy inclusion or contestation dimensions from Coppedge, Alvarez and Maldonado (2008) are included, it cuts them into into 20 categories. The resulting score is ordinal from 1 to 20. v2x: If any of the v2x_ continuous indexes of democracy from the V-Dem dataset (Coppedge et al 2015) are included in the file, the function cuts them into 20 categories. The resulting score is ordinal from 1 to 20. vanhanen_democratization or vanhanen_pmm: Following Pemstein, Meserve, and Melton's replication code (Pemstein, Meserve, and Melton 2013), the function cuts Vanhanen's (2012)'s index of democratization into 8 intervals with the following cutoffs: 5,10,15,20,25,30, and 35. The resulting score is ordinal from 1 to 8.

The function also recognizes the following column names (or partial column names - it also recognizes, e.g., pmm_blm) as measures of democracy: anckar (from Anckar and Fredriksson 2018), blm (from Bowman, Lehoucq, and Mahoney 2005), bmr (from Boix, Miller, and Rosato 2012), doorenspleet (from Doorenspleet 2000), e_v2x (the "ordinal" indexes from the V-dem project, Coppedge at al 2015), freedomhouse or fh (from Freedom House - freedom scale must be reversed so that "more freedom" is higher), gwf (from Geddes, Wright, and Frantz 2014 - the dichotomous democracy indicator only), kailitz (from Kailitz 2013 - democracy/non-democracy indicator), lied or lexical_index (from Skaaning, Gerring, and Bartusevicius 2015), mainwaring (from Mainwaring and Perez Linan 2008), magaloni (from Magaloni, Min, Chu 2013 - democracy/non-democracy indicator), pacl (from Cheibub, Gandhi, and Vreeland 2010), pitf (from Goldstone et al 2010 or Taylor and Ulfelder 2015), polyarchy (from Coppedge and Reinicke 1991), prc (from Gasiorowski 1996 or Reich 2002), PIPE (from Przeworski 2010), reign (from Bell 2016), svmdi (from Grundler and Krieger 2018, 2016), svolik (from Svolik 2012, democracy/dictatorship indicator only), ulfelder (from Ulfelder 2012), utip (from Hsu 2008), and wth or wahman_teorell_hadenius (from Wahman, Teorell, and Hadenius 2013). In each of these cases the function transforms the values of these scores by running as.numeric(unclass(factor(x))), which transforms them into ordinal variables from 1 to the number of categories.

For details of these scores, see the documentation for democracy.

It is also possible to change these defaults.

Note

Warning! The function does not perform any sanity checks. It will try to transform anything that has the right name. You should always check the results make sense.

References

Anckar, Carsten and C. Fredriksson. 2018. "Classifying political regimes 1800-2016: a typology and a new dataset". European Political Science. DOI: 10.1057/s41304-018-0149-8. Data and codebook available at https://doi.org/10.1057/s41304-018-0149-8.

Arat, Zehra F. 1991. Democracy and human rights in developing countries. Boulder: Lynne Rienner Publishers.

Bell, Curtis. 2016. The Rulers, Elections, and Irregular Governance Dataset (REIGN).http://oefresearch.org/datasets/reign

Boix, Carles, Michael Miller, and Sebastian Rosato. 2012. A Complete Data Set of Political Regimes, 1800-2007. Comparative Political Studies 46 (12): 1523-1554. Original data available at https://sites.google.com/site/mkmtwo/democracy-v2.0.dta?attredirects=0

Bollen, Kenneth A. 2001. "Cross-National Indicators of Liberal Democracy, 1950-1990." 2nd ICPSR version. Chapel Hill, NC: University of North Carolina, 1998. Ann Arbor, MI: Inter-university Consortium for Political and Social Research, 2001. Original data available at http://webapp.icpsr.umich.edu/cocoon/ICPSR-STUDY/02532.xml.

Bowman, Kirk, Fabrice Lehoucq, and James Mahoney. 2005. Measuring Political Democracy: Case Expertise, Data Adequacy, and Central America. Comparative Political Studies 38 (8): 939-970. http://cps.sagepub.com/content/38/8/939. Data available at http://www.blmdemocracy.gatech.edu/.

Cheibub, Jose Antonio, Jennifer Gandhi, and James Raymond Vreeland. 2010. "Democracy and Dictatorship Revisited." Public Choice. 143(1):67-101. Original data available at https://sites.google.com/site/joseantoniocheibub/datasets/democracy-and-dictatorship-revisited.

Coppedge, Michael, John Gerring, Staffan I. Lindberg, Svend-Erik Skaaning, and Jan Teorell, with David Altman, Michael Bernhard, M. Steven Fish, Adam Glynn, Allen Hicken, Carl Henrik Knutsen, Kelly McMann, Pamela Paxton, Daniel Pemstein, Jeffrey Staton, Brigitte Zimmerman, Frida Andersson, Valeriya Mechkova, Farhad Miri. 2015. V-Dem Codebook v5. Varieties of Democracy (V-Dem) Project. Original data available at https://v-dem.net/en/data/.

Coppedge, Michael and Wolfgang H. Reinicke. 1991. Measuring Polyarchy. In On Measuring Democracy: Its Consequences and Concomitants, ed. Alex Inkeles. New Brunswuck, NJ: Transaction pp. 47-68.

Coppedge, A. Alvarez and C. Maldonado. 2008. "Two Persistent Dimensions of Democracy: Contestation and Inclusiveness". The Journal of Politics 70.03, pp. 632-647. DOI: 10.1017/S0022381608080663.

Doorenspleet, Renske. 2000. Reassessing the Three Waves of Democratization. World Politics 52 (03): 384-406. DOI: 10.1017/S0043887100016580. http://dx.doi.org/10.1017/S0043887100016580.

Kaufmann, D. and A. Kraay. 2016. Worldwide Governance Indicators. 2016. http://www.govindicators.org.

Freedom House. 2015. "Freedom in the World." Original data available at http://www.freedomhouse.org.

Gasiorowski, Mark J. 1996. "An Overview of the Political Regime Change Dataset." Comparative Political Studies 29(4):469-483.

Geddes, Barbara, Joseph Wright, and Erica Frantz. 2014. Autocratic Breakdown and Regime Transitions: A New Data Set. Perspectives on Politics 12 (1): 313-331. Original data available at http://dictators.la.psu.edu/.

Goldstone, Jack, Robert Bates, David Epstein, Ted Gurr, Michael Lustik, Monty Marshall, Jay Ulfelder, and Mark Woodward. 2010. A Global Model for Forecasting Political Instability. American Journal of Political Science 54 (1): 190-208. DOI:10.1111/j.1540-5907.2009.00426.x

Grundler, K. and T. Krieger. 2018. "Machine Learning Indices, Political Institutions, and Economic Development". Report. CESifo Group Munich, 2018. https://www.cesifo-group.de/DocDL/cesifo1_wp6930.pdf.

Grundler, K. and T. Krieger. 2016. "Democracy and growth: Evidence from a machine learning indicator". European Journal of Political Economy 45, pp. 85-107. DOI: https://doi.org/10.1016/j.ejpoleco.2016.05.005.

Hadenius, Axel. 1992. Democracy and Development. Cambridge: Cambridge University Press.

Hadenius, Axel & Jan Teorell. 2007. "Pathways from Authoritarianism", Journal of Democracy 18(1): 143-156.

Hsu, Sara "The Effect of Political Regimes on Inequality, 1963-2002," UTIP Working Paper No. 53 (2008), http://utip.gov.utexas.edu/papers/utip_53.pdf. Data available for download at http://utip.gov.utexas.edu/data/.

Kailitz, Steffen. 2013. Classifying political regimes revisited: legitimation and durability. Democratization 20 (1): 39-60. Original data available at http://dx.doi.org/10.1080/13510347.2013.738861.

Mainwaring, Scott, Daniel Brinks, and Anibal Perez Linan. 2008. "Political Regimes in Latin America, 1900-2007." Original data available from http://kellogg.nd.edu/scottmainwaring/Political_Regimes.pdf.

Magaloni, Beatriz, Jonathan Chu, and Eric Min. 2013. Autocracies of the World, 1950-2012 (Version 1.0). Dataset, Stanford University. Original data and codebook available at http://cddrl.fsi.stanford.edu/research/autocracies_of_the_world_dataset/

Marshall, Monty G., Ted Robert Gurr, and Keith Jaggers. 2012. "Polity IV: Political Regime Characteristics and Transitions, 1800-2012." Updated to 2015. Original data available from http://www.systemicpeace.org/polity/polity4.htm.

Moon, Bruce E., Jennifer Harvey Birdsall, Sylvia Ceisluk, Lauren M. Garlett, Joshua J. Hermias, Elizabeth Mendenhall, Patrick D. Schmid, and Wai Hong Wong (2006) "Voting Counts: Participation in the Measurement of Democracy" Studies in Comparative International Development 42, 2 (Summer, 2006). The complete dataset is available here: http://www.lehigh.edu/~bm05/democracy/Obtain_data.htm.

Munck, Gerardo L. 2009. Measuring Democracy: A Bridge Between Scholarship and Politics. Baltimore: Johns Hopkins University Press.

Pemstein, Daniel, Stephen Meserve, and James Melton. 2010. Democratic Compromise: A Latent Variable Analysis of Ten Measures of Regime Type. Political Analysis 18 (4): 426-449.

Pemstein, Daniel, Stephen A. Meserve, and James Melton. 2013. "Replication data for: Democratic Compromise: A Latent Variable Analysis of Ten Measures of Regime Type." In: Harvard Dataverse. http://hdl.handle.net/1902.1/PMM

Przeworski, Adam et al. 2013. Political Institutions and Political Events (PIPE) Data Set. Department of Politics, New York University. https://sites.google.com/a/nyu.edu/adam-przeworski/home/data

Reich, G. 2002. Categorizing Political Regimes: New Data for Old Problems. Democratization 9 (4): 1-24. http://www.tandfonline.com/doi/pdf/10.1080/714000289.

Skaaning, Svend-Erik, John Gerring, and Henrikas Bartusevicius. 2015. A Lexical Index of Electoral Democracy. Comparative Political Studies 48 (12): 1491-1525. Original data available from http://thedata.harvard.edu/dvn/dv/skaaning.

Svolik, Milan. 2012. The Politics of Authoritarian Rule. Cambridge and New York: Cambridge University Press. Original data available from http://campuspress.yale.edu/svolik/the-politics-of-authoritarian-rule/.

Taylor, Sean J. and Ulfelder, Jay, A Measurement Error Model of Dichotomous Democracy Status (May 20, 2015). Available at SSRN: http://ssrn.com/abstract=2726962 or http://dx.doi.org/10.2139/ssrn.2726962

Ulfelder, Jay. 2012. "Democracy/Autocracy Data Set." In: Harvard Dataverse. http://hdl.handle.net/1902.1/18836.

Vanhanen, Tatu. 2012. "FSD1289 Measures of Democracy 1810-2012." Original data available from http://www.fsd.uta.fi/english/data/catalogue/FSD1289/meF1289e.html

Wahman, Michael, Jan Teorell, and Axel Hadenius. 2013. Authoritarian regime types revisited: updated data in comparative perspective. Contemporary Politics 19 (1): 19-34.

Examples

summary(democracy)
#> extended_country_name GWn cown polity_ccode #> Length:28492 Min. : 2.0 Min. : 2.0 Min. : 2.0 #> Class :character 1st Qu.:225.0 1st Qu.:225.0 1st Qu.:223.0 #> Mode :character Median :420.0 Median :411.0 Median :420.0 #> Mean :441.1 Mean :439.4 Mean :439.6 #> 3rd Qu.:651.0 3rd Qu.:651.0 3rd Qu.:651.0 #> Max. :990.0 Max. :990.0 Max. :990.0 #> NA's :598 NA's :901 NA's :936 #> in_GW_system year anckar_democracy blm #> Mode :logical Min. :1502 Min. :0.000 Min. :0.000 #> FALSE:9818 1st Qu.:1896 1st Qu.:0.000 1st Qu.:0.000 #> TRUE :18674 Median :1946 Median :0.000 Median :0.000 #> Mean :1930 Mean :0.348 Mean :0.252 #> 3rd Qu.:1984 3rd Qu.:1.000 3rd Qu.:0.500 #> Max. :2017 Max. :1.000 Max. :1.000 #> NA's :10723 NA's :27987 #> bmr_democracy bmr_democracy_femalesuffrage bmr_democracy_omitteddata #> Min. :0.000 Min. :0.000 Min. :-1.000 #> 1st Qu.:0.000 1st Qu.:0.000 1st Qu.: 0.000 #> Median :0.000 Median :0.000 Median : 0.000 #> Mean :0.334 Mean :0.286 Mean : 0.337 #> 3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.: 1.000 #> Max. :1.000 Max. :1.000 Max. : 1.000 #> NA's :10338 NA's :10249 NA's :10770 #> bnr bnr_extended csvmdi doorenspleet #> Min. :0.000 Min. :0.000 Min. :0.000 Min. :1.000 #> 1st Qu.:1.000 1st Qu.:0.000 1st Qu.:0.044 1st Qu.:1.000 #> Median :1.000 Median :0.000 Median :0.359 Median :1.000 #> Mean :0.983 Mean :0.344 Mean :0.452 Mean :1.179 #> 3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.:0.912 3rd Qu.:1.000 #> Max. :1.000 Max. :1.000 Max. :0.974 Max. :2.000 #> NA's :24841 NA's :18172 NA's :18262 NA's :15483 #> dsvmdi eiu fh_electoral fh_total_reversed #> Min. :0.000 Min. :0.860 Min. :0.000 Min. : 0.000 #> 1st Qu.:0.000 1st Qu.:3.530 1st Qu.:0.000 1st Qu.: 3.000 #> Median :0.000 Median :5.840 Median :1.000 Median : 7.000 #> Mean :0.461 Mean :5.517 Mean :0.598 Mean : 6.491 #> 3rd Qu.:1.000 3rd Qu.:7.285 3rd Qu.:1.000 3rd Qu.:11.000 #> Max. :1.000 Max. :9.930 Max. :1.000 Max. :12.000 #> NA's :18262 NA's :26989 NA's :23172 NA's :20164 #> gwf_democracy gwf_democracy_extended gwf_democracy_extended_strict #> Min. :0.000 Min. :0.000 Min. :0.000 #> 1st Qu.:0.000 1st Qu.:0.000 1st Qu.:0.000 #> Median :0.000 Median :0.000 Median :0.000 #> Mean :0.402 Mean :0.419 Mean :0.426 #> 3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.:1.000 #> Max. :1.000 Max. :1.000 Max. :1.000 #> NA's :20538 NA's :19081 NA's :19249 #> gwf_democracy_strict kailitz_binary kailitz_tri lexical_index #> Min. :0.00 Min. :0.000 Min. :0.000 Min. :0.000 #> 1st Qu.:0.00 1st Qu.:0.000 1st Qu.:0.000 1st Qu.:1.000 #> Median :0.00 Median :0.000 Median :1.000 Median :3.000 #> Mean :0.41 Mean :0.412 Mean :0.989 Mean :2.783 #> 3rd Qu.:1.00 3rd Qu.:1.000 3rd Qu.:2.000 3rd Qu.:6.000 #> Max. :1.00 Max. :1.000 Max. :2.000 Max. :6.000 #> NA's :20705 NA's :18886 NA's :18886 NA's :9963 #> magaloni_democracy magaloni_democracy_extended mainwaring pacl #> Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 #> 1st Qu.:0.000 1st Qu.:0.000 1st Qu.:0.000 1st Qu.:0.000 #> Median :0.000 Median :0.000 Median :0.000 Median :0.000 #> Mean :0.396 Mean :0.424 Mean :0.338 Mean :0.438 #> 3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.:0.500 3rd Qu.:1.000 #> Max. :1.000 Max. :1.000 Max. :1.000 Max. :1.000 #> NA's :19864 NA's :18204 NA's :26336 NA's :19377 #> PEPS1i PEPS1q PEPS1v PEPS2i #> Min. :-10.000 Min. :-10.000 Min. :-10.000 Min. :-9.587 #> 1st Qu.: -9.000 1st Qu.: -9.000 1st Qu.: -7.000 1st Qu.: 0.174 #> Median : -7.000 Median : -6.242 Median : -4.000 Median : 4.999 #> Mean : -3.199 Mean : -3.176 Mean : -2.869 Mean : 3.716 #> 3rd Qu.: 3.700 3rd Qu.: 3.477 3rd Qu.: 1.500 3rd Qu.: 7.448 #> Max. : 10.000 Max. : 10.000 Max. : 10.000 Max. :10.000 #> NA's :19329 NA's :19053 NA's :14403 NA's :24367 #> PEPS2q PEPS2v PIPE_democracy PIPE_regime #> Min. :-10.000 Min. :-10.000 Min. :0.000 Min. :0.000 #> 1st Qu.: -8.500 1st Qu.: -7.500 1st Qu.:0.000 1st Qu.:1.000 #> Median : -1.455 Median : -3.550 Median :0.000 Median :1.000 #> Mean : -1.126 Mean : -2.427 Mean :0.202 Mean :1.523 #> 3rd Qu.: 5.886 3rd Qu.: 1.937 3rd Qu.:0.000 3rd Qu.:2.000 #> Max. : 10.000 Max. : 10.000 Max. :1.000 Max. :3.000 #> NA's :21602 NA's :15251 NA's :10774 NA's :10522 #> pitf pitf_binary pmm_arat pmm_blm #> Min. :0.000 Min. :0.000 Min. : 29.0 Min. :0.00 #> 1st Qu.:0.000 1st Qu.:0.000 1st Qu.: 58.0 1st Qu.:0.00 #> Median :1.000 Median :0.000 Median : 69.0 Median :0.00 #> Mean :1.433 Mean :0.367 Mean : 73.2 Mean :0.36 #> 3rd Qu.:3.000 3rd Qu.:1.000 3rd Qu.: 92.0 3rd Qu.:0.50 #> Max. :4.000 Max. :1.000 Max. :109.0 Max. :1.00 #> NA's :12242 NA's :12242 NA's :24619 NA's :28217 #> pmm_bollen pmm_fh pmm_hadenius pmm_mainwaring #> Min. : 0.00 Min. :1.00 Min. : 0.000 Min. :-1.000 #> 1st Qu.: 22.84 1st Qu.:2.50 1st Qu.: 1.500 1st Qu.:-1.000 #> Median : 53.59 Median :4.00 Median : 3.100 Median : 0.000 #> Mean : 55.46 Mean :4.15 Mean : 4.509 Mean : 0.122 #> 3rd Qu.: 90.95 3rd Qu.:6.00 3rd Qu.: 8.300 3rd Qu.: 1.000 #> Max. :100.00 Max. :7.00 Max. :10.000 Max. : 1.000 #> NA's :27982 NA's :22054 NA's :28363 NA's :27657 #> pmm_munck pmm_pacl pmm_polity pmm_polyarchy #> Min. :0.000 Min. :0.000 Min. :-10.000 Min. : 0.000 #> 1st Qu.:0.750 1st Qu.:0.000 1st Qu.: -7.000 1st Qu.: 3.000 #> Median :1.000 Median :0.000 Median : -1.000 Median : 7.000 #> Mean :0.838 Mean :0.436 Mean : 0.129 Mean : 6.329 #> 3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.: 8.000 3rd Qu.:10.000 #> Max. :1.000 Max. :1.000 Max. : 10.000 Max. :10.000 #> NA's :28150 NA's :19425 NA's :20442 NA's :28139 #> pmm_prc pmm_vanhanen polity polity2 #> Min. :1.000 Min. : 0.00 Min. :-10.00 Min. :-10.00 #> 1st Qu.:1.000 1st Qu.: 0.00 1st Qu.: -7.00 1st Qu.: -7.00 #> Median :1.000 Median : 5.90 Median : -3.00 Median : -3.00 #> Mean :2.147 Mean :11.31 Mean : -0.54 Mean : -0.55 #> 3rd Qu.:4.000 3rd Qu.:20.70 3rd Qu.: 7.00 3rd Qu.: 7.00 #> Max. :4.000 Max. :49.00 Max. : 10.00 Max. : 10.00 #> NA's :22490 NA's :19527 NA's :12041 NA's :11506 #> polyarchy_contestation_dimension polyarchy_inclusion_dimension #> Min. :-2.067 Min. :-3.952 #> 1st Qu.:-0.876 1st Qu.:-0.297 #> Median :-0.214 Median : 0.379 #> Mean :-0.005 Mean :-0.002 #> 3rd Qu.: 0.918 3rd Qu.: 0.672 #> Max. : 1.909 Max. : 1.858 #> NA's :20959 NA's :20959 #> polyarchy_original_contestation polyarchy_original_polyarchy prc #> Min. :1.000 Min. : 0.000 Min. :1.000 #> 1st Qu.:3.750 1st Qu.: 3.000 1st Qu.:1.000 #> Median :6.000 Median : 7.000 Median :1.000 #> Mean :5.881 Mean : 6.401 Mean :2.002 #> 3rd Qu.:9.000 3rd Qu.:10.000 3rd Qu.:3.000 #> Max. :9.000 Max. :10.000 Max. :4.000 #> NA's :28132 NA's :28138 NA's :17609 #> reign_democracy svmdi_2016 svolik_democracy uds_2010_mean #> Min. :0.000 Min. :0.007 Min. :0.00 Min. :-2.063 #> 1st Qu.:0.000 1st Qu.:0.063 1st Qu.:0.00 1st Qu.:-0.840 #> Median :0.000 Median :0.465 Median :0.00 Median :-0.193 #> Mean :0.478 Mean :0.480 Mean :0.45 Mean :-0.002 #> 3rd Qu.:1.000 3rd Qu.:0.926 3rd Qu.:1.00 3rd Qu.: 0.823 #> Max. :1.000 Max. :0.981 Max. :1.00 Max. : 2.197 #> NA's :15582 NA's :23116 NA's :19937 NA's :20936 #> uds_2010_median uds_2011_mean uds_2011_median uds_2014_mean #> Min. :-2.001 Min. :-2.103 Min. :-2.053 Min. :-2.112 #> 1st Qu.:-0.837 1st Qu.:-0.860 1st Qu.:-0.850 1st Qu.:-0.858 #> Median :-0.190 Median :-0.139 Median :-0.136 Median :-0.116 #> Mean :-0.003 Mean : 0.002 Mean : 0.000 Mean : 0.001 #> 3rd Qu.: 0.815 3rd Qu.: 0.797 3rd Qu.: 0.791 3rd Qu.: 0.787 #> Max. : 2.151 Max. : 2.117 Max. : 2.066 Max. : 2.263 #> NA's :20936 NA's :19355 NA's :19355 NA's :18642 #> uds_2014_median ulfelder_democracy ulfelder_democracy_extended #> Min. :-2.058 Min. :0.000 Min. :0.000 #> 1st Qu.:-0.850 1st Qu.:0.000 1st Qu.:0.000 #> Median :-0.115 Median :0.000 Median :0.000 #> Mean : 0.000 Mean :0.412 Mean :0.322 #> 3rd Qu.: 0.783 3rd Qu.:1.000 3rd Qu.:1.000 #> Max. : 2.206 Max. :1.000 Max. :1.000 #> NA's :18642 NA's :20808 NA's :16947 #> utip_dichotomous utip_dichotomous_strict utip_trichotomous #> Min. :0.000 Min. :0.00 Min. :0.000 #> 1st Qu.:0.000 1st Qu.:0.00 1st Qu.:0.000 #> Median :1.000 Median :0.00 Median :1.000 #> Mean :0.517 Mean :0.48 Mean :0.997 #> 3rd Qu.:1.000 3rd Qu.:1.00 3rd Qu.:2.000 #> Max. :1.000 Max. :1.00 Max. :2.000 #> NA's :22277 NA's :22277 NA's :22277 #> vanhanen_competition vanhanen_democratization vanhanen_participation #> Min. : 0.00 Min. : 0.000 Min. : 0.0 #> 1st Qu.: 0.00 1st Qu.: 0.000 1st Qu.: 0.0 #> Median :20.00 Median : 1.100 Median :14.0 #> Mean :25.22 Mean : 8.434 Mean :21.1 #> 3rd Qu.:49.10 3rd Qu.:15.400 3rd Qu.:40.4 #> Max. :70.00 Max. :49.000 Max. :71.0 #> NA's :12757 NA's :12757 NA's :12757 #> wgi_democracy wth_democ1 wth_democrobust v2x_polyarchy #> Min. :-2.313 Min. :0.000 Min. :0.00 Min. :0.009 #> 1st Qu.:-0.823 1st Qu.:0.000 1st Qu.:0.00 1st Qu.:0.092 #> Median : 0.043 Median :0.000 Median :0.00 Median :0.206 #> Mean : 0.000 Mean :0.436 Mean :0.41 Mean :0.318 #> 3rd Qu.: 0.933 3rd Qu.:1.000 3rd Qu.:1.00 3rd Qu.:0.525 #> Max. : 1.801 Max. :1.000 Max. :1.00 Max. :0.947 #> NA's :24760 NA's :21063 NA's :21072 NA's :11467 #> v2x_api v2x_mpi v2x_libdem v2x_partipdem #> Min. :0.017 Min. :0.000 Min. :0.009 Min. :0.005 #> 1st Qu.:0.185 1st Qu.:0.000 1st Qu.:0.080 1st Qu.:0.048 #> Median :0.407 Median :0.001 Median :0.151 Median :0.105 #> Mean :0.464 Mean :0.172 Mean :0.260 Mean :0.192 #> 3rd Qu.:0.766 3rd Qu.:0.283 3rd Qu.:0.374 3rd Qu.:0.296 #> Max. :0.978 Max. :0.916 Max. :0.916 Max. :0.814 #> NA's :11467 NA's :11467 NA's :11468 NA's :11468 #> v2x_delibdem v2x_egaldem #> Min. :0.000 Min. :0.011 #> 1st Qu.:0.014 1st Qu.:0.069 #> Median :0.069 Median :0.148 #> Mean :0.209 Mean :0.242 #> 3rd Qu.:0.346 3rd Qu.:0.335 #> Max. :0.913 Max. :0.890 #> NA's :11468 NA's :11467
summary(prepare_data(democracy))
#> extended_country_name GWn cown polity_ccode #> Length:28492 Min. : 2.0 Min. : 2.0 Min. : 1.0 #> Class :character 1st Qu.:225.0 1st Qu.:225.0 1st Qu.: 45.0 #> Mode :character Median :420.0 Median :411.0 Median :110.0 #> Mean :441.1 Mean :439.4 Mean :109.5 #> 3rd Qu.:651.0 3rd Qu.:651.0 3rd Qu.:166.0 #> Max. :990.0 Max. :990.0 Max. :227.0 #> NA's :598 NA's :901 NA's :936 #> in_GW_system year anckar_democracy blm #> Mode :logical Min. :1502 Min. :1.000 Min. :1.000 #> FALSE:9818 1st Qu.:1896 1st Qu.:1.000 1st Qu.:1.000 #> TRUE :18674 Median :1946 Median :1.000 Median :1.000 #> Mean :1930 Mean :1.348 Mean :1.505 #> 3rd Qu.:1984 3rd Qu.:2.000 3rd Qu.:2.000 #> Max. :2017 Max. :2.000 Max. :3.000 #> NA's :10723 NA's :27987 #> bmr_democracy bmr_democracy_femalesuffrage bmr_democracy_omitteddata #> Min. :1.000 Min. :1.000 Min. :1.000 #> 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:2.000 #> Median :1.000 Median :1.000 Median :2.000 #> Mean :1.334 Mean :1.286 Mean :2.337 #> 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:3.000 #> Max. :2.000 Max. :2.000 Max. :3.000 #> NA's :10338 NA's :10249 NA's :10770 #> bnr bnr_extended csvmdi doorenspleet #> Min. :0.000 Min. :0.000 Min. : 1.000 Min. :1.000 #> 1st Qu.:1.000 1st Qu.:0.000 1st Qu.: 1.000 1st Qu.:1.000 #> Median :1.000 Median :0.000 Median : 8.000 Median :1.000 #> Mean :0.983 Mean :0.344 Mean : 9.748 Mean :1.179 #> 3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.:19.000 3rd Qu.:1.000 #> Max. :1.000 Max. :1.000 Max. :20.000 Max. :2.000 #> NA's :24841 NA's :18172 NA's :18262 NA's :15483 #> dsvmdi eiu fh_electoral fh_total_reversed #> Min. :1.000 Min. : 1.00 Min. :1.000 Min. : 1.000 #> 1st Qu.:1.000 1st Qu.: 6.00 1st Qu.:1.000 1st Qu.: 4.000 #> Median :1.000 Median :11.00 Median :2.000 Median : 8.000 #> Mean :1.461 Mean :10.78 Mean :1.598 Mean : 7.491 #> 3rd Qu.:2.000 3rd Qu.:15.00 3rd Qu.:2.000 3rd Qu.:12.000 #> Max. :2.000 Max. :20.00 Max. :2.000 Max. :13.000 #> NA's :18262 NA's :26989 NA's :23172 NA's :20164 #> gwf_democracy gwf_democracy_extended gwf_democracy_extended_strict #> Min. :1.000 Min. :1.000 Min. :1.000 #> 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 #> Median :1.000 Median :1.000 Median :1.000 #> Mean :1.402 Mean :1.419 Mean :1.426 #> 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000 #> Max. :2.000 Max. :2.000 Max. :2.000 #> NA's :20538 NA's :19081 NA's :19249 #> gwf_democracy_strict kailitz_binary kailitz_tri lexical_index #> Min. :1.00 Min. :1.000 Min. :1.000 Min. :1.000 #> 1st Qu.:1.00 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:2.000 #> Median :1.00 Median :1.000 Median :2.000 Median :4.000 #> Mean :1.41 Mean :1.412 Mean :1.989 Mean :3.783 #> 3rd Qu.:2.00 3rd Qu.:2.000 3rd Qu.:3.000 3rd Qu.:7.000 #> Max. :2.00 Max. :2.000 Max. :3.000 Max. :7.000 #> NA's :20705 NA's :18886 NA's :18886 NA's :9963 #> magaloni_democracy magaloni_democracy_extended mainwaring pacl #> Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 #> 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 #> Median :1.000 Median :1.000 Median :1.000 Median :1.000 #> Mean :1.396 Mean :1.424 Mean :1.675 Mean :1.438 #> 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000 #> Max. :2.000 Max. :2.000 Max. :3.000 Max. :2.000 #> NA's :19864 NA's :18204 NA's :26336 NA's :19377 #> PEPS1i PEPS1q PEPS1v PEPS2i #> Min. : 1.000 Min. : 1.000 Min. : 1.000 Min. : 1.00 #> 1st Qu.: 2.000 1st Qu.: 2.000 1st Qu.: 4.000 1st Qu.:11.00 #> Median : 4.000 Median : 5.000 Median : 7.000 Median :16.00 #> Mean : 7.805 Mean : 7.828 Mean : 8.117 Mean :14.71 #> 3rd Qu.:15.000 3rd Qu.:14.000 3rd Qu.:12.000 3rd Qu.:18.00 #> Max. :21.000 Max. :21.000 Max. :21.000 Max. :21.00 #> NA's :19329 NA's :19053 NA's :14403 NA's :24367 #> PEPS2q PEPS2v PIPE_democracy PIPE_regime #> Min. : 1.000 Min. : 1.0 Min. :1.000 Min. :1.000 #> 1st Qu.: 3.000 1st Qu.: 3.0 1st Qu.:1.000 1st Qu.:2.000 #> Median :10.000 Median : 7.0 Median :1.000 Median :2.000 #> Mean : 9.917 Mean : 8.6 Mean :1.202 Mean :2.523 #> 3rd Qu.:17.000 3rd Qu.:13.0 3rd Qu.:1.000 3rd Qu.:3.000 #> Max. :21.000 Max. :21.0 Max. :2.000 Max. :4.000 #> NA's :21602 NA's :15251 NA's :10774 NA's :10522 #> pitf pitf_binary pmm_arat pmm_blm #> Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.00 #> 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:1.00 #> Median :2.000 Median :1.000 Median :3.000 Median :1.00 #> Mean :2.433 Mean :1.367 Mean :3.878 Mean :1.72 #> 3rd Qu.:4.000 3rd Qu.:2.000 3rd Qu.:6.000 3rd Qu.:2.00 #> Max. :5.000 Max. :2.000 Max. :7.000 Max. :3.00 #> NA's :12242 NA's :12242 NA's :24619 NA's :28217 #> pmm_bollen pmm_fh pmm_hadenius pmm_mainwaring #> Min. : 1.000 Min. : 1.000 Min. :1.000 Min. :1.000 #> 1st Qu.: 3.000 1st Qu.: 4.000 1st Qu.:2.000 1st Qu.:1.000 #> Median : 6.000 Median : 7.000 Median :4.000 Median :2.000 #> Mean : 6.006 Mean : 7.301 Mean :4.279 Mean :2.122 #> 3rd Qu.:10.000 3rd Qu.:11.000 3rd Qu.:7.000 3rd Qu.:3.000 #> Max. :10.000 Max. :13.000 Max. :8.000 Max. :3.000 #> NA's :27982 NA's :22054 NA's :28363 NA's :27657 #> pmm_munck pmm_pacl pmm_polity pmm_polyarchy #> Min. :1.000 Min. :1.000 Min. : 1.00 Min. : 1.000 #> 1st Qu.:3.000 1st Qu.:1.000 1st Qu.: 4.00 1st Qu.: 4.000 #> Median :4.000 Median :1.000 Median :10.00 Median : 8.000 #> Mean :3.333 Mean :1.436 Mean :11.13 Mean : 7.329 #> 3rd Qu.:4.000 3rd Qu.:2.000 3rd Qu.:19.00 3rd Qu.:11.000 #> Max. :4.000 Max. :2.000 Max. :21.00 Max. :11.000 #> NA's :28150 NA's :19425 NA's :20442 NA's :28139 #> pmm_prc pmm_vanhanen polity polity2 #> Min. :1.000 Min. :1.000 Min. : 1.00 Min. : 1.00 #> 1st Qu.:1.000 1st Qu.:1.000 1st Qu.: 4.00 1st Qu.: 4.00 #> Median :1.000 Median :2.000 Median : 8.00 Median : 8.00 #> Mean :2.147 Mean :2.939 Mean :10.46 Mean :10.45 #> 3rd Qu.:4.000 3rd Qu.:5.000 3rd Qu.:18.00 3rd Qu.:18.00 #> Max. :4.000 Max. :8.000 Max. :21.00 Max. :21.00 #> NA's :22490 NA's :19527 NA's :12041 NA's :11506 #> polyarchy_contestation_dimension polyarchy_inclusion_dimension #> Min. : 1.00 Min. : 1.0 #> 1st Qu.: 6.00 1st Qu.:13.0 #> Median :10.00 Median :15.0 #> Mean :10.88 Mean :14.1 #> 3rd Qu.:16.00 3rd Qu.:16.0 #> Max. :20.00 Max. :20.0 #> NA's :20959 NA's :20959 #> polyarchy_original_contestation polyarchy_original_polyarchy prc #> Min. :1.000 Min. : 1.000 Min. :1.000 #> 1st Qu.:3.750 1st Qu.: 4.000 1st Qu.:1.000 #> Median :6.000 Median : 8.000 Median :1.000 #> Mean :5.881 Mean : 7.401 Mean :1.621 #> 3rd Qu.:9.000 3rd Qu.:11.000 3rd Qu.:2.000 #> Max. :9.000 Max. :11.000 Max. :3.000 #> NA's :28132 NA's :28138 NA's :17609 #> reign_democracy svmdi_2016 svolik_democracy uds_2010_mean #> Min. :1.000 Min. : 1.00 Min. :1.00 Min. :-2.063 #> 1st Qu.:1.000 1st Qu.: 2.00 1st Qu.:1.00 1st Qu.:-0.840 #> Median :1.000 Median :10.00 Median :1.00 Median :-0.193 #> Mean :1.478 Mean :10.22 Mean :1.45 Mean :-0.002 #> 3rd Qu.:2.000 3rd Qu.:19.00 3rd Qu.:2.00 3rd Qu.: 0.823 #> Max. :2.000 Max. :20.00 Max. :2.00 Max. : 2.197 #> NA's :15582 NA's :23116 NA's :19937 NA's :20936 #> uds_2010_median uds_2011_mean uds_2011_median uds_2014_mean #> Min. :-2.001 Min. :-2.103 Min. :-2.053 Min. :-2.112 #> 1st Qu.:-0.837 1st Qu.:-0.860 1st Qu.:-0.850 1st Qu.:-0.858 #> Median :-0.190 Median :-0.139 Median :-0.136 Median :-0.116 #> Mean :-0.003 Mean : 0.002 Mean : 0.000 Mean : 0.001 #> 3rd Qu.: 0.815 3rd Qu.: 0.797 3rd Qu.: 0.791 3rd Qu.: 0.787 #> Max. : 2.151 Max. : 2.117 Max. : 2.066 Max. : 2.263 #> NA's :20936 NA's :19355 NA's :19355 NA's :18642 #> uds_2014_median ulfelder_democracy ulfelder_democracy_extended #> Min. :-2.058 Min. :1.000 Min. :1.000 #> 1st Qu.:-0.850 1st Qu.:1.000 1st Qu.:1.000 #> Median :-0.115 Median :1.000 Median :1.000 #> Mean : 0.000 Mean :1.412 Mean :1.322 #> 3rd Qu.: 0.783 3rd Qu.:2.000 3rd Qu.:2.000 #> Max. : 2.206 Max. :2.000 Max. :2.000 #> NA's :18642 NA's :20808 NA's :16947 #> utip_dichotomous utip_dichotomous_strict utip_trichotomous #> Min. :1.000 Min. :1.00 Min. :1.000 #> 1st Qu.:1.000 1st Qu.:1.00 1st Qu.:1.000 #> Median :2.000 Median :1.00 Median :2.000 #> Mean :1.517 Mean :1.48 Mean :1.997 #> 3rd Qu.:2.000 3rd Qu.:2.00 3rd Qu.:3.000 #> Max. :2.000 Max. :2.00 Max. :3.000 #> NA's :22277 NA's :22277 NA's :22277 #> vanhanen_competition vanhanen_democratization vanhanen_participation #> Min. : 1.0 Min. :1.000 Min. : 1.0 #> 1st Qu.: 1.0 1st Qu.:1.000 1st Qu.: 1.0 #> Median :176.0 Median :1.000 Median :140.0 #> Mean :240.3 Mean :2.422 Mean :228.8 #> 3rd Qu.:463.0 3rd Qu.:4.000 3rd Qu.:438.0 #> Max. :693.0 Max. :8.000 Max. :760.0 #> NA's :12757 NA's :12757 NA's :12757 #> wgi_democracy wth_democ1 wth_democrobust v2x_polyarchy #> Min. : 1.00 Min. :1.000 Min. :1.00 Min. : 1.000 #> 1st Qu.: 8.00 1st Qu.:1.000 1st Qu.:1.00 1st Qu.: 2.000 #> Median :12.00 Median :1.000 Median :1.00 Median : 5.000 #> Mean :11.73 Mean :1.436 Mean :1.41 Mean : 7.114 #> 3rd Qu.:16.00 3rd Qu.:2.000 3rd Qu.:2.00 3rd Qu.:11.000 #> Max. :20.00 Max. :2.000 Max. :2.00 Max. :20.000 #> NA's :24760 NA's :21063 NA's :21072 NA's :11467 #> v2x_api v2x_mpi v2x_libdem v2x_partipdem #> Min. : 1.000 Min. : 1.000 Min. : 1.000 Min. : 1.000 #> 1st Qu.: 4.000 1st Qu.: 1.000 1st Qu.: 2.000 1st Qu.: 2.000 #> Median : 9.000 Median : 1.000 Median : 4.000 Median : 3.000 #> Mean : 9.794 Mean : 4.541 Mean : 6.055 Mean : 5.121 #> 3rd Qu.:16.000 3rd Qu.: 7.000 3rd Qu.: 9.000 3rd Qu.: 8.000 #> Max. :20.000 Max. :20.000 Max. :20.000 Max. :19.000 #> NA's :11467 NA's :11467 NA's :11468 NA's :11468 #> v2x_delibdem v2x_egaldem #> Min. : 1.000 Min. : 1.000 #> 1st Qu.: 1.000 1st Qu.: 2.000 #> Median : 2.000 Median : 4.000 #> Mean : 5.162 Mean : 5.755 #> 3rd Qu.: 8.000 3rd Qu.: 8.000 #> Max. :20.000 Max. :20.000 #> NA's :11468 NA's :11467