read

In our collaborative research on the democratic rhetoric of IOs, we are developing explanatory models that explain why IOs use democracy as a normative point of reference when they describe who they are and what they do in their annual reports. In one of our models, we check if the democratic quality of its member states helps to explain this phenomenon. In this blog post, I illustrate one way how we calculate democratic membership. This may be of interest to some of you because I

If there are any comments, please feel free to send me a mail or please leave a comment, below.

Importing IGO membership data

First, I import the COW data-set and subset it for our sample and then bring it into shape for the next steps.

# download the COW data
temp <- tempfile()
download.file("http://www.correlatesofwar.org/data-sets/IGOs/IGO_igounit_v2.3.zip", temp)
data.cow <- read.csv(unz(temp, "igounit_v2.3.csv"))


# filter IOs and only years after 1979
library(dplyr)
data.cow.sub <-   data.cow %>% filter(ioname == "UNIDO" | ioname == "UNESCO" | ioname == "IBRD" | ioname == "IMF" | ioname == "ILO" | ioname == "ICC" | ioname == "IAEA" | ioname == "BIS" | ioname == "WTO" | ioname == "GATT" | ioname == "IWhale" | ioname == "ISA" | ioname == "OECD" | ioname == "GEF" | ioname == "ICAO" | ioname == "PCA" | ioname == "UN" | ioname == "OPEC" | ioname == "OSCE" | ioname == "ComSec" | ioname == "WMO") %>% filter(year > 1979)

# transform into long data format
library(reshape2)
data.cow.sub <- melt(data.cow.sub[, c(1, 3:217)], id.vars=c("ioname", "year"), variable.name="country",	value.name = "membership")

#and remove states that are not full members from the data-set
data.cow.sub <- filter(data.cow.sub, membership == 1)

Data in the COW data-set is only available until 2005. We need data until 2012 for our analysis. Therefore, we need to add information for the missing years. As a simplifying assumption, we assume that no countries have left an IO since

  1. So, first we copy the 2005 data for the 2006-2011 years.
copy1 <- filter(data.cow.sub, year == 2005)
copy1[which(copy1$year == 2005), 2] <- 2006
copy2 <- filter(data.cow.sub, year == 2005)
copy2[which(copy2$year == 2005), 2] <- 2007
copy3 <- filter(data.cow.sub, year == 2005)
copy3[which(copy3$year == 2005), 2] <- 2008
copy4 <- filter(data.cow.sub, year == 2005)
copy4[which(copy4$year == 2005), 2] <- 2009
copy5 <- filter(data.cow.sub, year == 2005)
copy5[which(copy5$year == 2005), 2] <- 2010
copy6 <- filter(data.cow.sub, year == 2005)
copy6[which(copy6$year == 2005), 2] <- 2011


data.cow.sub <- rbind_all(list(data.cow.sub, copy1, copy2, copy3, copy4, copy5, copy6))
rm(copy1, copy2, copy3, copy4, copy5, copy6)

Next, we need to add data for the IOs that have joined the IOs since 2005. We have created a separate file (download), containing the new member states that is now added to the existing data.

add.members <- read.csv("io-members-since-2006.csv")
data.cow.sub <- rbind_all(list(data.cow.sub, add.members))

Importing DD-Index data

Next, I import the DD-index data.

# download pwt8.1 in excel format and import relevant sheet
library(RCurl)
temp2 <- tempfile()
download.file("https://uofi.box.com/shared/static/d27425539c9d662a7041.xls", temp2, method = "wget", mode = "wb")

library(xlsx)
data.dd <- read.xlsx2(file = temp2, sheetIndex = 1, colIndex = c(2, 3, 69), colClasses = c("character", "numeric", "numeric"), startRow = 1, endRow = 9160)

# filter out years before 1980
data.dd <- filter(data.dd, year > 1979)

Next, we have to match both data source. This can be achieved with the help of the countrycodes package.

# add country code to cow data with countrycodes-package
library(countrycode)
data.cow.sub$isoc <-  countrycode(data.cow.sub$country, origin="country.name", destination="iso3c", warn=T)
## Warning in countrycode(data.cow.sub$country, origin = "country.name", destination = "iso3c", : Some values were not matched: domrepublic, etimor, kosovo, nokorea, sokorea, stlucia
# add non-matching values manually
data.cow.sub$isoc[which(data.cow.sub$country == "domrepublic")] <- "DOM"
data.cow.sub$isoc[which(data.cow.sub$country == "etimor")] <- "TLS"
data.cow.sub$isoc[which(data.cow.sub$country == "kosovo")] <- "UNK"
data.cow.sub$isoc[which(data.cow.sub$country == "nokorea")] <- "PRK"
data.cow.sub$isoc[which(data.cow.sub$country == "sokorea")] <- "KOR"
data.cow.sub$isoc[which(data.cow.sub$country == "stlucia")] <- "LCA"

# next, do the same thing for the dd-index data
data.dd$isoc <-  countrycode(data.dd$ctryname, origin="country.name", destination="iso3c", warn=T)
## Warning in countrycode(data.dd$ctryname, origin = "country.name", destination = "iso3c", : Some values were not matched: Serbia and Montenegro, Yemen Arab Republic
# add non-matching values
data.dd$isoc[which(data.dd$ctryname == "Serbia and Montenegro")] <- "SCG"
data.dd$isoc[which(data.dd$ctryname == "Yemen Arab Republic")] <- "YEM"

# merge, keeping all entries in data.cow.sub
data.complete <- merge(x = data.cow.sub, y = data.dd, by.x = c("isoc", "year"), by.y = c("isoc", "year"), all.x = T)

# rename GATT to WTO
library(car)
data.complete$ioname <- recode(data.complete$ioname, recodes = "'GATT' = 'WTO'")

Calculate share of democratic members

In the next step, I need to summarize the variables to calculate the share of democratic members in each organization in each year.

# calculate number of membes, number of democracies and share of democracies
dem.mem.io.year <- data.complete %>% group_by(ioname, year) %>% summarise(n_members = sum(membership, na.rm = T), n_dem = sum(democracy, na.rm = T), dem_share_dd = mean(democracy, na.rm = T))

# add dummy for all IOs with dem_share_dd > 0.5
dem.mem.io.year$dummy_dem_share_dd <-  ifelse(dem.mem.io.year$dem_share_dd > 0.5, 1, 0)

# export inequality measures in IO-year format
write.csv2(dem.mem.io.year, file = "dd-members-io-year.csv")

Calculate democratic and non-democratic major powers

Are there IOs with unchallenged democratic major powers among their members? We would assume that in this case, democratic rhetoric is more likely. I create variables that first capture if there are only major democracies (maj_pow_dem) in an IO, second, if there are only autocratic major powers in IOs (maj_pow_auth) and third if both democratic and authoritarian major powers are members of an IO (maj_pow_both).

# filter major powers
data.sub <- data.complete %>% filter(country == "china" | country == "france" | country == "germany" | country == "japan" | country == "russia" | country == "uk" | country == "usa")
data.sub$ioname <- as.factor(data.sub$ioname)
data.sub$country <- as.factor(data.sub$country)

# create variables for presence of democracies and authocracies
data.sub$auth <- ifelse(data.sub$country == "china" | data.sub$country == "russia", 1, 0)
data.sub$dem <- ifelse(data.sub$country == "france" | data.sub$country == "uk" | data.sub$country == "usa" | data.sub$country == "germany" & data.sub$year > 1990 | data.sub$country == "japan" & data.sub$year > 1990, 1, 0)

# summarize to IO years
summary <- data.sub %>% group_by(ioname, year) %>% summarise(authocracies = mean(auth), democracies = mean(dem))

# create variables for status of major powers maj_pow_dem, maj_pow_auth, maj_pow_both
summary$maj_pow_dem <- ifelse(summary$authocracies == 0, 1, 0)
summary$maj_pow_auth <- ifelse(summary$democracies == 0, 1, 0)
summary$maj_pow_both <- ifelse(summary$authocracies != 0 & summary$democracies != 0, 1, 0)

# export
write.csv(summary, file = "major-powers-calculated.csv")

Calculate democratic and non-democratic regional powers

Are there IOs with unchallenged democratic regional powers among their members? The assumed mechanism is the same like for major world powers.

# filter major powers
data.sub <- data.complete %>% filter(country == "india" | country == "china" | country == "japan" | country == "brazil" | country == "nigeria" | country == "soafrica" | country == "russia" | country == "france" | country == "germany" | country == "uk" | country == "usa")
data.sub$ioname <- as.factor(data.sub$ioname)
data.sub$country <- as.factor(data.sub$country)

# regional powers data is only available for year > 1990
data.sub <- data.sub %>% filter(year > 1989)

# create variables for presence of democracies and authocracies
data.sub$auth <- ifelse(data.sub$country == "china" | data.sub$country == "russia" | data.sub$country == "soafrica" | data.sub$country == "nigeria" & data.sub$year < 1999, 1, 0)
data.sub$dem <- ifelse(data.sub$country == "india" | data.sub$country == "japan" | data.sub$country == "brazil" | data.sub$country == "nigeria" & data.sub$year > 1998 | data.sub$country == "france" | data.sub$country == "germany" | data.sub$country == "uk" | data.sub$country == "us" , 1, 0)

# summarize to IO years
summary.2 <- data.sub %>% group_by(ioname, year) %>% summarise(authocracies = mean(auth), democracies = mean(dem))

# create variables for status of major powers maj_pow_dem, maj_pow_auth, maj_pow_both
summary.2$maj_pow_reg_dem <- ifelse(summary.2$authocracies == 0, 1, 0)
summary.2$maj_pow_reg_auth <- ifelse(summary.2$democracies == 0, 1, 0)
summary.2$maj_pow_reg_both <- ifelse(summary.2$authocracies != 0 & summary.2$democracies != 0, 1, 0)

# export
write.csv(summary.2, file = "major-regional-powers-calculated.csv")

Regime change and the effect of young democracies

We assume that there may be an effect of young democracies on the democratic rhetoric of IOs. Thus, we first need to identify young democracies and then calculate the share of those in each IO-year.

# first, detect regime changes
data.dd$reg.change <- ifelse(data.dd$democracy != lag(data.dd$democracy) & data.dd$year != 1980, 1, 0)
data.dd$reg.change.dem <- ifelse(data.dd$reg.change == 1 & data.dd$democracy == 1, 1, 0)


data.complete <- merge(x = data.cow.sub, y = data.dd, by.x = c("isoc", "year"), by.y = c("isoc", "year"), all.x = T)

regime.change <- data.complete %>% group_by(ioname, year) %>% summarise(n_members = n(), young.dem = sum(reg.change.dem, na.rm = T), young.dem.share = sum(reg.change.dem, na.rm = T) / n())

library(zoo)

regime.change <- regime.change %>% group_by(ioname) %>% mutate(young.dem.share.4 = rollmax(young.dem.share, 5, fill = c(NA, "extend"), align = "right" ))

# export
write.csv(regime.change, file = "young-democracies-calculated.csv")

Plot

As the plots show, there is some variation across IOs when it comes to democratic membership. The general trend over time shows that IOs have become more democratic over the years.

library(googleVis)

# plot IO summaries
plot.df <- dem.mem.io.year %>% group_by(ioname) %>% summarise(dem_share = mean(dem_share_dd, na.rm = T))
pl1 <-  gvisBarChart(plot.df, xvar = "ioname", yvar = "dem_share", options = list(height = 450, width = 640))
# plot annual summary
plot.df <- dem.mem.io.year %>% group_by(year) %>% summarise(dem_share = mean(dem_share_dd, na.rm = T))
plot.df$year <- as.Date(as.character(plot.df$year), "%Y")
pl2 <- gvisLineChart(plot.df, xvar = "year", yvar = "dem_share", options = list(height = 450, width = 640))
Blog Logo

Tobias Weise


Published

Image

Tobias Weise

university management specialist

Back to Overview