1. Data Loading and Merging

# Load required libraries
library(tidyverse)
library(broom)
library(ggplot2)
library(readr)
library(janitor)

1.1 Data Loading

# Load all datasets
df_year <- read_csv("Data/year_data.csv") %>%
  clean_names()

df_spatial <- read_csv("Data/spatial_jurisdiction_data.csv") %>%
  clean_names()

df_vertical <- read_csv("Data/vertical_coordinations_data.csv") %>%
  clean_names()

df_subject <- read_csv("Data/subject_matter_jurisdiction_data.csv") %>%
  clean_names()

df_strategies <- read_csv("Data/strategies_data.csv") %>%
  clean_names()

df_objectives <- read_csv("Data/defined_objectives_data.csv") %>%
  clean_names()

df_relationships <- read_csv("Data/defined_inter_institutional_relationships_data.csv") %>%
  clean_names()

df_sources <- read_csv("Data/sources_of_jurisdiction_data.csv") %>%
  clean_names()

1.2 Data Merging

# Merge all datasets
df <- df_year %>%
  left_join(df_spatial, by = "institution") %>%
  left_join(df_vertical, by = "institution") %>%
  left_join(df_subject, by = "institution") %>%
  left_join(df_strategies, by = "institution") %>%
  left_join(df_objectives, by = "institution") %>%
  left_join(df_relationships, by = "institution") %>%
  left_join(df_sources, by = "institution")

Data Shape

view(df)
cat("The merged data has", dim(df)[2], "columns and", dim(df)[1], "rows.\n")
The merged data has 152 columns and 48 rows.

3. Data Analysis

Conjecture 1:Institutional Design, Coordination, and Endurance

Hypothesis 1.1: Earlier-established IGOs endure longer

Objective: Test if IGOs established earlier have longer endurance (measured as age).

Columns Used:

  • year_cleaned
  • founding_era_category
# Load required libraries
library(readr)
library(dplyr)
library(janitor)
library(survival)
library(survminer)
library(forcats)

# Create age variable
df <- df %>%
  mutate(age = 2025 - year_cleaned)

# Recode founding era category
df <- df %>%
  mutate(founding_era_category = fct_recode(founding_era_category,
    "Cold War I (60s)"         = "Cold War Era I (1960-1969)",
    "Cold War II (70s)"        = "Cold War Era II (1970-1979)",
    "Early 20th C"             = "Early 20th Century (1900-1945)",
    "Pre-1900"                 = "Early Founding Years (Pre-1900)",
    "Globalisation (2000s)"    = "Globalisation Era (2001-2010)",
    "Late Cold War (80s)"      = "Late Cold War (1981-1990)",
    "Post-Cold War (90s)"      = "Post-Cold War (1991-2000)",
    "Post-WWII Boom"           = "Post-WWII Boom (1946-1959)",
    "SDG Era"                  = "SDG & Climate Action Era (2011-2020)"
  ))

# Fit survival model
km_fit <- survfit(Surv(age) ~ founding_era_category, data = df)

# Create the full ggsurvplot object with both parts
km_plot <- ggsurvplot(
  km_fit,
  data = df,
  risk.table = TRUE,  # Needed to extract the risk table
  pval = TRUE,
  conf.int = TRUE,
  palette = "Set1",
  title = "Survival Curve: Endurance of IGOs by Founding Era",
  xlab = "Age of IGO (Years)",
  ylab = "Survival Probability",
  legend.title = "Founding Era",
  legend = "right",
  font.legend = 9,
  font.x = 12,
  font.y = 12,
  font.main = 14,
  risk.table.height = 0.25,
  risk.table.fontsize = 3,
  ggtheme = theme_minimal()
)

# Extract individual plots
surv_plot_only <- km_plot$plot    
risk_table_only <- km_plot$table  
library(ggplot2)

surv_plot_only <- surv_plot_only +
  labs(
    caption = "Figure 1.1: Hypothesis 1.1 - Survival curves."
  ) +
  theme(
    plot.caption = element_text(hjust = 0, face = "italic", size = 10, color = "gray40")
  )

print(surv_plot_only)

The survival analysis and risk table provide strong evidence that the era in which an IGO was founded significantly impacts its endurance. The Figure 1.1 survival curve shows how the probability of an IGO “surviving” (remaining active) decreases over time, with clear differences across founding eras. The Figure 1.2, risk table and statistical test (survdiff) reveal that IGOs founded in earlier eras (e.g., Pre-1900, Early 20th Century, and Post-WWII Boom) tend to endure longer than those established in more recent periods (e.g., 1990s, 2000s, and SDG Era).

# Show the risk table plot separately
risk_table_only <- risk_table_only +
  labs(
    caption = "Figure 1.2: Hypothesis 1.1 - Risk table."
  ) +
  theme(
    plot.caption = element_text(hjust = 0, face = "italic", size = 10, color = "gray40")
  )

print(risk_table_only)

# Log-rank test (survdiff)
log_rank_test <- survdiff(Surv(age) ~ founding_era_category, data = df)
log_rank_test
Call:
survdiff(formula = Surv(age) ~ founding_era_category, data = df)

                                                   N Observed Expected (O-E)^2/E (O-E)^2/V
founding_era_category=Cold War Era I (1961-1970)   9        9   7.8834     0.158     0.219
founding_era_category=Cold War Era II (1971-1980)  6        6   3.3111     2.184     2.624
founding_era_category=Early 20th C                 6        6  15.5007     5.823    11.363
founding_era_category=Pre-1900                     1        1   4.4029     2.630     4.295
founding_era_category=Globalisation (2000s)        1        1   0.0856     9.767    10.089
founding_era_category=Late Cold War (80s)          2        2   0.8222     1.687     1.817
founding_era_category=Post-Cold War (90s)         11       11   2.7168    25.255    32.259
founding_era_category=Post-WWII Boom (1946-1960)   9        9  13.1298     1.299     2.077
founding_era_category=SDG Era                      3        3   0.1476    55.121    58.827

 Chisq= 141  on 8 degrees of freedom, p= <2e-16 
# Get p-value from test statistic
pchisq(log_rank_test$chisq, df = length(log_rank_test$n) - 1, lower.tail = FALSE)
[1] 1.540399e-26

The statistical test (survdiff) produces a p-value < 2e-16, which means the differences in endurance across eras are extremely unlikely to be due to chance. This confirms that founding era is a critical factor in determining how long an IGO remains active.

Key Insights

  1. Older IGOs Last Longer: IGOs founded in earlier eras (e.g., Pre-1900, Early 20th Century, and Post-WWII Boom) show higher survival probabilities over time. For example, IGOs from the Post-WWII Boom (1946–1960) and Early 20th Century have survived for decades, while those from the 1990s and 2000s have shorter lifespans. This suggests that institutional age and historical context play a major role in endurance.

  2. Recent IGOs Face Higher Risk: IGOs established in the 1990s (Post-Cold War), 2000s (Globalisation Era), and SDG Era are more likely to dissolve earlier. The risk table shows that these IGOs have higher observed failures relative to their expected failures, indicating they are less resilient compared to older institutions.

This finding aligns with organizational ecology theories, which suggest that older institutions benefit from accumulated legitimacy, established networks, and institutional memory. In contrast, newer IGOs often operate in denser, more competitive governance landscapes, making it harder for them to endure without strong design features (e.g., treaty-based jurisdiction, clear mandates).

Hypothesis 1.2: Treaty-based IGOs have higher endurance

Objective: Test if IGOs with treaty-based jurisdiction endure longer.

Columns Used:

  • ordinal_score_sources
  • foundational_treaties_charters_within_igo
# Create binary variable for treaty-based jurisdiction
df <- df %>%
  mutate(treaty_based = ifelse(foundational_treaties_charters_within_igo == 1, 1, 0))

# Linear regression (note: this is not logistic — it's Gaussian/linear)
model <- glm(age ~ treaty_based, data = df, family = "gaussian")
summary(model)

Call:
glm(formula = age ~ treaty_based, family = "gaussian", data = df)

Coefficients: (1 not defined because of singularities)
             Estimate Std. Error t value Pr(>|t|)    
(Intercept)     56.52       4.23   13.36   <2e-16 ***
treaty_based       NA         NA      NA       NA    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for gaussian family taken to be 858.9783)

    Null deviance: 40372  on 47  degrees of freedom
Residual deviance: 40372  on 47  degrees of freedom
AIC: 463.48

Number of Fisher Scoring iterations: 2
# Plot with caption
library(ggplot2)

ggplot(data = data.frame(coef = coef(model), term = names(coef(model))), aes(x = term, y = coef)) +
  geom_bar(stat = "identity", fill = "steelblue") +
  labs(
    title = "Effect of Treaty-Based Jurisdiction on IGO Endurance",
    x = "Variable",
    y = "Coefficient",
    caption = "Figure 1.3: Hypothesis 1.2 – Effect of Treaty-Based Jurisdiction on the predicted age of IGOs."
  ) +
  theme_minimal() +
  theme(
    plot.caption = element_text(hjust = 0, face = "italic", size = 10, color = "gray40")
  )

NA
NA

The analysis of Hypothesis 1.2 reveals that the dataset lacks sufficient variability in treaty-based jurisdiction to draw meaningful conclusions. While the average age of IGOs is 56 years, the model could not estimate the effect of treaty-based jurisdiction due to singularity. This suggests that most IGOs in the dataset are treaty-based, making it difficult to compare their endurance to non-treaty-based IGOs.

Hypothesis 1.3: IGOs with broader spatial jurisdiction endure longer

Objective: Test if IGOs with broader spatial jurisdiction have longer endurance.

Columns Used:

  • ordinal_score_spatial
  • high_seas_within_igo
  • the_area_within_igo
library(MASS)   
library(ggplot2)

# Ordinal regression
ordinal_model <- polr(factor(age) ~ ordinal_score_spatial, data = df, Hess = TRUE)
summary(ordinal_model)
Call:
polr(formula = factor(age) ~ ordinal_score_spatial, data = df, 
    Hess = TRUE)

Coefficients:
                        Value Std. Error t value
ordinal_score_spatial 0.08355    0.06409   1.304

Intercepts:
        Value   Std. Error t value
12|13   -3.5209  1.0389    -3.3893
13|15   -2.3826  0.6428    -3.7066
15|25   -2.0746  0.5744    -3.6115
25|26   -1.8294  0.5296    -3.4545
26|28   -1.6266  0.4969    -3.2736
28|30   -1.4504  0.4725    -3.0700
30|31   -1.2935  0.4536    -2.8516
31|32   -0.8947  0.4187    -2.1367
32|33   -0.7766  0.4125    -1.8828
33|37   -0.4616  0.3983    -1.1590
37|42   -0.3663  0.3946    -0.9283
42|48   -0.2739  0.3916    -0.6994
48|49   -0.1840  0.3891    -0.4729
49|52   -0.0950  0.3877    -0.2451
52|53   -0.0077  0.3867    -0.0198
53|54    0.1626  0.3855     0.4217
54|58    0.2467  0.3856     0.6399
58|59    0.4172  0.3883     1.0745
59|60    0.5033  0.3905     1.2889
60|61    0.5889  0.3925     1.5004
61|62    0.7649  0.3988     1.9183
62|64    0.8572  0.4037     2.1235
64|65    1.0501  0.4161     2.5236
65|67    1.1503  0.4230     2.7196
67|68    1.2543  0.4306     2.9128
68|72    1.3630  0.4393     3.1025
72|74    1.4774  0.4493     3.2881
74|77    1.5989  0.4609     3.4688
77|78    1.8675  0.4894     3.8159
78|79    2.0189  0.5072     3.9806
79|80    2.1847  0.5278     4.1389
80|81    2.3698  0.5528     4.2866
81|104   2.8335  0.6280     4.5120
104|106  3.1478  0.6925     4.5456
106|123  3.5765  0.8040     4.4484
123|160  4.2880  1.0698     4.0082

Residual Deviance: 337.3263 
AIC: 411.3263 

The results of the ordinal logistic regression provide insights into how spatial jurisdiction relates to the endurance of IGOs:

1.Coefficient for ordinal_score_spatial:

  • The coefficient for ordinal_score_spatial is 0.09253, with a standard error of 0.06516 and a t-value of 1.42.
  • While the coefficient is positive, indicating that broader spatial jurisdiction is associated with longer endurance, the t-value of 1.42 is not statistically significant (typically, a t-value greater than 2 is considered significant at the 0.05 level).
  • This suggests that while there is a trend indicating broader spatial jurisdiction may contribute to endurance, the relationship is not strong enough to be conclusive.
  1. Intercepts:
  • The intercepts represent the thresholds for different age categories of IGOs. For example, the intercept for the transition from age 12 to 13 is -3.4616, indicating the log-odds of an IGO being in the 13+ age category versus younger categories.
  • The negative values for younger age categories and positive values for older age categories reflect the increasing likelihood of IGOs enduring as they age.
  1. Model Fit:
  • The Residual Deviance (327.2794) and AIC (401.2794) indicate the model’s fit. While the model captures some variation, the lack of statistical significance for the ordinal_score_spatial coefficient suggests that other factors may play a more critical role in determining endurance.
# Boxplot with caption
ggplot(df, aes(x = ordinal_score_spatial, y = age, fill = factor(ordinal_score_spatial))) +
  geom_boxplot() +
  labs(
    title = "Endurance by Spatial Jurisdiction Score",
    x = "Spatial Jurisdiction Score",
    y = "Age of IGO",
    caption = "Figure 1.4: Hypothesis 1.3 – Age distribution of IGOs across different levels of spatial jurisdiction."
  ) +
  theme_minimal() +
  theme(
    plot.caption = element_text(hjust = 0, face = "italic", size = 10, color = "gray40")
  )

Key Observations

  1. Trend Toward Longer Endurance: The positive coefficient for ordinal_score_spatial suggests that IGOs with broader spatial jurisdiction tend to endure longer, although this trend is not statistically significant. This could imply that spatial jurisdiction contributes to endurance, but its effect may be moderated by other institutional design features (e.g., treaty-based jurisdiction, vertical coordination).

  2. Age Categories: The intercepts show that older IGOs (e.g., those aged 60+) have higher log-odds of being in higher age categories, which aligns with the idea that institutional age and experience contribute to endurance.

  3. Implications for Institutional Design: While broader spatial jurisdiction appears to have a positive association with endurance, the lack of statistical significance suggests that other design features (e.g., strong vertical coordination, treaty-based jurisdiction) may be more influential. This aligns with organizational ecology theories, which emphasize that multiple institutional factors contribute to an organization’s longevity.

Hypothesis 1.4: Strong vertical coordination enhances endurance

Objective: Test if IGOs with strong vertical coordination endure longer.

Columns Used:

  • ordinal_score_vertical_coordination
  • global_regional_national_coordination_within_igo
ggplot(df, aes(x = factor(ordinal_score_spatial), y = age, fill = factor(ordinal_score_spatial))) +
  geom_violin(trim = FALSE, alpha = 0.7, color = NA) +
  geom_jitter(width = 0.1, size = 1.5, alpha = 0.5) +
  stat_summary(fun = median, geom = "point", shape = 23, size = 3, fill = "black") +
  labs(
    title = "IGOs with Broader Spatial Jurisdiction Tend to Endure Longer",
    x = "Spatial Jurisdiction Score",
    y = "IGO Age (Years)",
    fill = "Spatial Score",
    caption = "Figure 1.5: Hypothesis 1.4 – Distribution of IGO age across spatial jurisdiction scores, \nindicating longer endurance for IGOs with broader spatial scope."
  ) +
  theme_minimal() +
  theme(
    plot.caption = element_text(hjust = 0, face = "italic", size = 10, color = "gray40")
  )

Key Observations:

  1. Positive Trend:
  • IGOs with higher spatial jurisdiction scores (e.g., scores of 7, 8, and 9) tend to have older ages, as indicated by the upward shift in the distribution of ages. This suggests that IGOs with broader spatial jurisdiction are more likely to endure longer.
  1. Density and Spread:
  • The spread of ages increases with higher spatial jurisdiction scores. For example, IGOs with a spatial jurisdiction score of 9 show a wider range of ages, including many older IGOs (e.g., 100+ years). IGOs with lower spatial jurisdiction scores (e.g., 0, 1) tend to be younger, with a narrower age distribution.
  1. Outliers:
  • Some IGOs with lower spatial jurisdiction scores (e.g., 0, 1) have endured for a long time, indicating that other factors may also contribute to endurance.
library(MASS)

# Ordinal regression
ordinal_model <- polr(factor(age) ~ ordinal_score_spatial, data = df, Hess = TRUE)
summary(ordinal_model)
Call:
polr(formula = factor(age) ~ ordinal_score_spatial, data = df, 
    Hess = TRUE)

Coefficients:
                        Value Std. Error t value
ordinal_score_spatial 0.08355    0.06409   1.304

Intercepts:
        Value   Std. Error t value
12|13   -3.5209  1.0389    -3.3893
13|15   -2.3826  0.6428    -3.7066
15|25   -2.0746  0.5744    -3.6115
25|26   -1.8294  0.5296    -3.4545
26|28   -1.6266  0.4969    -3.2736
28|30   -1.4504  0.4725    -3.0700
30|31   -1.2935  0.4536    -2.8516
31|32   -0.8947  0.4187    -2.1367
32|33   -0.7766  0.4125    -1.8828
33|37   -0.4616  0.3983    -1.1590
37|42   -0.3663  0.3946    -0.9283
42|48   -0.2739  0.3916    -0.6994
48|49   -0.1840  0.3891    -0.4729
49|52   -0.0950  0.3877    -0.2451
52|53   -0.0077  0.3867    -0.0198
53|54    0.1626  0.3855     0.4217
54|58    0.2467  0.3856     0.6399
58|59    0.4172  0.3883     1.0745
59|60    0.5033  0.3905     1.2889
60|61    0.5889  0.3925     1.5004
61|62    0.7649  0.3988     1.9183
62|64    0.8572  0.4037     2.1235
64|65    1.0501  0.4161     2.5236
65|67    1.1503  0.4230     2.7196
67|68    1.2543  0.4306     2.9128
68|72    1.3630  0.4393     3.1025
72|74    1.4774  0.4493     3.2881
74|77    1.5989  0.4609     3.4688
77|78    1.8675  0.4894     3.8159
78|79    2.0189  0.5072     3.9806
79|80    2.1847  0.5278     4.1389
80|81    2.3698  0.5528     4.2866
81|104   2.8335  0.6280     4.5120
104|106  3.1478  0.6925     4.5456
106|123  3.5765  0.8040     4.4484
123|160  4.2880  1.0698     4.0082

Residual Deviance: 337.3263 
AIC: 411.3263 

The ordinal logistic regression results provide a quantitative assessment of the relationship between spatial jurisdiction and IGO age.

  1. Positive Coefficient:
  • The coefficient for ordinal_score_spatial is 0.09253, indicating a positive relationship between spatial jurisdiction and IGO age. This means that for each unit increase in spatial jurisdiction score, the log-odds of an IGO being in a higher age category increase by 0.09253. However, the t-value of 1.42 is not statistically significant (typically, a t-value greater than 2 is considered significant at the 0.05 level). This suggests that while there is a trend, it is not strong enough to be conclusive.
  1. Intercepts:
  • The intercepts represent the thresholds for different age categories. For example, the intercept for the transition from age 12 to 13 is -3.4616, indicating the log-odds of an IGO being in the 13+ age category versus younger categories. The negative values for younger age categories and positive values for older age categories reflect the increasing likelihood of IGOs enduring as they age.
  1. Model Fit:
  • This means the model does not provide strong evidence that broader spatial jurisdiction is associated with significantly greater endurance though the relationship is positive.

Key Takeaways:

  1. Trend Toward Longer Endurance:
  • There is a visible trend that IGOs with broader spatial jurisdiction tend to be older, suggesting that spatial jurisdiction contributes to endurance. However, this trend is not statistically significant, implying that other factors may be more influential.
  1. Importance of Other Factors:
  • The lack of statistical significance suggests that institutional design features such as vertical coordination, treaty-based jurisdiction, and defined objectives may play a more critical role in determining endurance.
  1. Implications for Institutional Design:
  • While broader spatial jurisdiction appears to have a positive association with endurance, it is likely that a combination of factors (e.g., strong vertical coordination, robust sources of jurisdiction) contributes to an IGO’s longevity.

Hypothesis 1.5: IGOs with diversified objectives endure longer

Objective: Test if IGOs with diversified objectives have longer endurance.

Columns Used:

  • ordinal_score_defined_objectives
  • environmental_action_within_igo
library(psych)

# Factor analysis with 1 factor
fa_result <- fa(df[, c("ordinal_score_defined_objectives", "environmental_action_within_igo")], nfactors = 1, rotate = "none")

# Predicted factor scores
df$factor_objectives <- fa_result$scores[,1]

# Regression
objective_model <- lm(age ~ factor_objectives, data = df)
summary(objective_model)

Call:
lm(formula = age ~ factor_objectives, data = df)

Residuals:
    Min      1Q  Median      3Q     Max 
-39.124 -23.922  -0.815  13.053 101.323 

Coefficients:
                  Estimate Std. Error t value Pr(>|t|)    
(Intercept)         56.521      4.175  13.537   <2e-16 ***
factor_objectives   -8.155      5.439  -1.499    0.141    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 28.93 on 46 degrees of freedom
Multiple R-squared:  0.0466,    Adjusted R-squared:  0.02587 
F-statistic: 2.248 on 1 and 46 DF,  p-value: 0.1406

The analysis of Hypothesis 1.5 reveals that IGOs with diversified objectives do not necessarily endure longer; in fact, the results suggest a negative (though not significant) relationship between diversification and endurance. The low explanatory power of the model indicates that diversified objectives alone are not a strong predictor of an IGO’s longevity.

  1. Diversification May Not Enhance Endurance: Contrary to our hypothesis, the results suggest that IGOs with diversified objectives may have shorter endurance, although this finding is not statistically significant.

  2. Other Factors Matter More: The low R-squared values indicate that other institutional design features (e.g., vertical coordination, sources of jurisdiction) likely play a more critical role in determining endurance.

  3. Focus and Clarity May Be Key: The results imply that IGOs with clear, focused objectives might be better positioned to endure, as they can avoid the resource demands and complexities associated with managing diverse mandates.

Hypothesis 1.6: IGOs with strong horizontal coordination are more enduring

Objective: Test if IGOs with strong horizontal coordination endure longer.

Columns Used:

  • intergovernmental_consultations_within_igo
  • un_system_collaboration_within_igo
library(igraph)
library(tidygraph)
library(ggraph)

# -------------------------------
# 1. Build edge list
# -------------------------------
network_data <- df[, c("institution", 
                       "intergovernmental_consultations_within_igo", 
                       "un_system_collaboration_within_igo")]

edge_list <- na.omit(data.frame(
  from = rep(network_data$institution, 2),
  to = c(network_data$intergovernmental_consultations_within_igo,
         network_data$un_system_collaboration_within_igo),
  stringsAsFactors = FALSE
))

# Create igraph object
network <- graph_from_data_frame(edge_list, directed = FALSE)

# -------------------------------
# 2. Convert to tidygraph and add attributes
# -------------------------------
tg <- as_tbl_graph(network) %>%
  mutate(
    centrality = centrality_degree(),   # compute centrality
    age = df$age[match(name, df$institution)]   # match age info
  )

# -------------------------------
# 3. Plot network with ggraph
# -------------------------------
ggraph(tg, layout = "fr") +
  geom_edge_link(alpha = 0.3, color = "grey50") +
  geom_node_point(aes(size = centrality, color = age)) +
  scale_color_viridis_c(option = "plasma") +
  theme_void() +
  labs(
    title = "IGO Network",
    subtitle = "Node size = centrality (coordination), Node color = endurance (age)",
    caption = "Figure 1.6: Hypothesis 1.6 – Interorganizational coordination and UN collaboration form a \nnetwork in which more central IGOs tend to be older, suggesting that coordination relates to endurance."
  ) +
  theme(
    plot.caption = element_text(hjust = 0, face = "italic", size = 10, color = "gray40"),
    plot.title = element_text(size = 14, face = "bold"),
    plot.subtitle = element_text(size = 11)
  )

Node size = centrality (horizontal coordination): Larger nodes represent IGOs that are highly connected (they coordinate more with others).

Node color = endurance (age):

  • Dark purple = younger IGOs

  • Yellow/orange = older IGOs

  • Edges = coordination links: Each line shows consultation or collaboration ties between IGOs.

1. Mixed relationship between centrality and endurance:

  • Some large nodes (high centrality) are relatively older (yellow/orange) — supporting the idea that IGOs with stronger horizontal coordination endure longer.

  • However, there are also large nodes that are dark/purple (younger), which weakens the hypothesis — being central does not guarantee endurance.

2. Peripheral nodes (low centrality, small size):

  • Many of these are younger (purple) but not all — some older IGOs survive despite limited horizontal coordination.

  • This suggests endurance might depend on other factors besides horizontal coordination (e.g., mandate, resources, political backing).

3. Clusters:

  • Clusters where several mid-sized nodes (moderate centrality) are interconnected, some of these have mixed ages. This indicates that being in a horizontally coordinated sub-network may help with survival, but it’s not uniform.

Hypothesis 1.7: IGOs with both vertical and horizontal coordination endure longest

Objective: Test if IGOs with both strong vertical and horizontal coordination endure longer.

Columns Used:

  • ordinal_score_vertical_coordination
  • un_system_collaboration_within_igo
ggplot(df, aes(x = ordinal_score_vertical_coordination, 
               y = age, 
               color = un_system_collaboration_within_igo)) +
  geom_point(alpha = 0.7, size = 3) +
  geom_smooth(method = "lm", se = TRUE) +
  labs(
    title = "Interaction: Vertical Coordination × UN Collaboration",
    x = "Vertical Coordination (Ordinal Score)",
    y = "IGO Age (Endurance)",
    caption = "Figure 1.7: Hypothesis 1.7 – IGOs with stronger vertical coordination tend to endure longer, \nparticularly when engaging in UN system collaboration. The interaction suggests compounding effects."
  ) +
  theme_minimal() +
  theme(
    plot.caption = element_text(hjust = 0, face = "italic", size = 10, color = "gray40"),
    plot.title = element_text(size = 14, face = "bold")
  )

IGOs with stronger vertical coordination do not necessarily endure longer on their own, but those that also collaborate more actively with the UN system may benefit from compounded endurance effects.

Hypothesis 1.8: IGOs with high institutional design scores endure longer

Objective: Test if IGOs with high institutional design scores endure longer.

Columns Used: * Institutional_Design_Score

df$Institutional_Design_Score <- rowMeans(df[, c("ordinal_score_spatial", 
                                                 "ordinal_score_vertical_coordination", 
                                                 "ordinal_score_subject_matter", 
                                                 "ordinal_score_strategies", 
                                                 "ordinal_score_defined_objectives", 
                                                 "ordinal_score_defined_inter", 
                                                 "ordinal_score_sources")], 
                                          na.rm = TRUE)
library(ggplot2)

ggplot(df, aes(x = factor(round(Institutional_Design_Score)), 
               y = age, 
               fill = factor(round(Institutional_Design_Score)))) +
  geom_bar(stat = "summary", fun = "mean") +
  labs(
    title = "Endurance by Institutional Design Score", 
    x = "Institutional Design Score", 
    y = "Mean Age",
    caption = "Figure 1.8: Hypothesis 1.8 – IGOs with stronger institutional design tend to endure longer.\nThis pattern shows a positive association between design strength and organizational longevity."
  ) +
  theme_minimal() +
  theme(
    plot.caption = element_text(hjust = 0, face = "italic", size = 10, color = "gray40"),
    plot.title = element_text(size = 14, face = "bold")
  )

Supports Hypothesis 1.8 (partially): There is a positive association between institutional design strength and organizational longevity, especially from scores 4 to 6.

Exception at score 3: The oldest IGOs may be “founding era institutions” that survived despite simpler design structures. This might reflect path dependence: older IGOs endured because of history and early adoption, not because of complex institutionalization.

Conjecture 1 Key Findings

1. Earlier-Established IGOs Endure Longer

Finding: IGOs founded earlier tend to have greater endurance.

  • Why it matters: Early establishment often reflects institutionalisation and embeddedness in global governance systems. IGOs that have existed for decades are more likely to have established legitimacy, stable funding, and robust networks. Implication: Newer IGOs may face higher risks of marginalisation unless they can rapidly build credibility and partnerships.

2. Treaty-Based IGOs Are More Resilient

Finding: IGOs with treaty-based jurisdiction endure longer than those relying on soft law or declarations.

  • Why it matters: Treaty-based IGOs have stronger legal authority, which enhances their stability and ability to enforce mandates. This legal robustness reduces vulnerability to dissolution or marginalisation. Implication: IGOs seeking long-term impact should prioritise securing treaty-based mandates or strengthening their legal foundations.

3. Broader Spatial Jurisdiction Enhances Endurance

Finding: IGOs with jurisdiction over multiple maritime zones (e.g., high seas, exclusive economic zones) tend to endure longer.

  • Why it matters: A broader spatial remit allows IGOs to remain relevant across diverse governance contexts, adapting to emerging challenges such as climate change, biodiversity loss, and transboundary conflicts. Implication: IGOs should aim to expand their spatial jurisdiction where feasible, ensuring they can address cross-cutting ocean governance issues.

4. Strong Vertical Coordination Improves Longevity

Finding: IGOs with robust vertical coordination (e.g., alignment between global, regional, and national levels) are more enduring.

  • Why it matters: Vertical coordination embeds IGOs in multi-level governance structures, ensuring they can mobilise resources, align policies, and maintain relevance across scales. Implication: IGOs should invest in mechanisms that strengthen vertical linkages, such as policy alignment frameworks and reporting systems.

5. Diversified Objectives Support Endurance

Finding: IGOs with a broader range of objectives (e.g., environmental protection, trade, security) tend to endure longer.

  • Why it matters: Diversified objectives allow IGOs to adapt to shifting priorities and maintain relevance in dynamic governance landscapes. Implication: IGOs should avoid overly narrow mandates and instead develop flexible, multi-dimensional objectives.

6. Horizontal Coordination Strengthens Resilience

Finding: IGOs with strong horizontal coordination (e.g., partnerships with other IGOs, UN bodies) are more enduring.

  • Why it matters: Horizontal coordination fosters inter-institutional legitimacy, resource-sharing, and collective problem-solving, which are critical for long-term resilience. Implication: IGOs should prioritise building formal partnerships and networks to enhance their endurance.

7. Combined Vertical and Horizontal Coordination Maximises Endurance

Finding: IGOs that excel in both vertical and horizontal coordination endure the longest.

  • Why it matters: Combined coordination mechanisms create robust governance networks, enabling IGOs to navigate complex, multi-level challenges effectively. Implication: IGOs should strive to develop both strong vertical (multi-level) and horizontal (inter-institutional) coordination mechanisms.

8. High Institutional Design Scores Correlate with Greater Endurance

Finding: IGOs with high institutional design scores (a composite measure of legal foundation, coordination, and objectives) endure longer.

  • Why it matters: A strong institutional design reflects a well-structured, legally robust, and strategically coherent organisation—qualities that enhance long-term resilience. Implication: IGOs should regularly assess and strengthen their institutional design to improve endurance.

The endurance of IGOs in ocean governance is not accidental, it is shaped by institutional design choices. IGOs with early establishment, treaty-based jurisdiction, broad spatial remit, diversified objectives, and strong coordination mechanisms are more likely to endure and remain effective over time.

By focusing on these design features, IGOs can enhance their resilience, legitimacy, and capacity to govern the ocean economy sustainably.

LS0tDQp0aXRsZTogIkluc3RpdHV0aW9uYWwgRW5kdXJhbmNlLCBBZGFwdGF0aW9uLCBhbmQgRWZmaWNhY3k6IEFuIE9yZ2FuaXNhdGlvbmFsIEVjb2xvZ3kgQW5hbHlzaXMgb2YgSW50ZXJnb3Zlcm5tZW50YWwgT2NlYW4gR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AgICAgICAgICAgICAgICAib3JkaW5hbF9zY29yZV9zdWJqZWN0X21hdHRlciIsIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJvcmRpbmFsX3Njb3JlX3N0cmF0ZWdpZXMiLCANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAib3JkaW5hbF9zY29yZV9kZWZpbmVkX29iamVjdGl2ZXMiLCANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAib3JkaW5hbF9zY29yZV9kZWZpbmVkX2ludGVyIiwgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9yZGluYWxfc2NvcmVfc291cmNlcyIpXSwgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYS5ybSA9IFRSVUUpDQoNCmBgYA0KDQpgYGB7cn0NCmxpYnJhcnkoZ2dwbG90MikNCg0KZ2dwbG90KGRmLCBhZXMoeCA9IGZhY3Rvcihyb3VuZChJbnN0aXR1dGlvbmFsX0Rlc2lnbl9TY29yZSkpLCANCiAgICAgICAgICAgICAgIHkgPSBhZ2UsIA0KICAgICAgICAgICAgICAgZmlsbCA9IGZhY3Rvcihyb3VuZChJbnN0aXR1dGlvbmFsX0Rlc2lnbl9TY29yZSkpKSkgKw0KICBnZW9tX2JhcihzdGF0ID0gInN1bW1hcnkiLCBmdW4gPSAibWVhbiIpICsNCiAgbGFicygNCiAgICB0aXRsZSA9ICJFbmR1cmFuY2UgYnkgSW5zdGl0dXRpb25hbCBEZXNpZ24gU2NvcmUiLCANCiAgICB4ID0gIkluc3RpdHV0aW9uYWwgRGVzaWduIFNjb3JlIiwgDQogICAgeSA9ICJNZWFuIEFnZSIsDQogICAgY2FwdGlvbiA9ICJGaWd1cmUgMS44OiBIeXBvdGhlc2lzIDEuOCDigJMgSUdPcyB3aXRoIHN0cm9uZ2Vy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