Load Data

hw3_df <- read.csv("/Users/linde/Downloads/Gov_Dur.csv")

Selecting + Relabelling Variables

Note: for the sake of my sanity when running/re-running/checking this code, I am renaming the variables after relabelling and factorizing them.

hw3_clean <- hw3_df %>%
    mutate(invest_f = factor(invest, levels = c(0, 1), labels = c("No investiture requirement",
        "Investiture requirement")), numst2_f = factor(numst2,
        levels = c(0, 1), labels = c("Not majority", "Majority")),
        caretk2_f = factor(caretk2, levels = c(0, 1), labels = c("Not caretaker",
            "Caretaker")), singpar_f = factor(singpar, levels = c(0,
            1), labels = c("Coalition", "Single party")), extsup_f = factor(extsup,
            levels = c(0, 1), labels = c("No external support",
                "External support")))

Kaplan-Meier Model

Creating and Running the Model

Notes:

  • I wanted to be able to visualize all the plots for each of the independent variables at once, so I used arrange_ggsurvplots from survminer, a library we were using anyway. Here is the documentation: https://www.rdocumentation.org/packages/survminer/versions/0.5.1/topics/ggsurvplot

  • Using the factor levels I set above, I framed the visualization as one of “yes” or “no”, with “yes” representing each independent variable at level 1, and “no” representing each independent variable at level 0. I did this to facilitate interpretation, especially given that I couldn’t include individual legends for each plot without making the whole figure look crowded and confusing. The green color represents “yes” and the red color represents “no”.

# Define survival object and time variable
mod_obj <- with(hw3_clean, Surv(time = durat, event = cieptw))

# Fit the Kaplan-Meier models
km_mod_invest <- survfit(mod_obj ~ invest_f, data = hw3_clean)
km_mod_numst2 <- survfit(mod_obj ~ numst2_f, data = hw3_clean)
km_mod_caretk2 <- survfit(mod_obj ~ caretk2_f, data = hw3_clean)
km_mod_singpar <- survfit(mod_obj ~ singpar_f, data = hw3_clean)
km_mod_extsup <- survfit(mod_obj ~ extsup_f, data = hw3_clean)

Visualizing the Model

# Prepare the models for joint plotting
g_invest <- ggsurvplot(km_mod_invest, data = hw3_clean, pval = T,
    conf.int = T, legend = "none", xlab = "Duration (months)",
    title = "Investiture Req?", ggtheme = theme_bw(), palette = c("red",
        "darkgreen"))
g_numst2 <- ggsurvplot(km_mod_numst2, data = hw3_clean, pval = T,
    conf.int = T, legend = "none", xlab = "Duration (months)",
    title = "Majority Status?", ggtheme = theme_bw(), palette = c("red",
        "darkgreen"))
g_caretk2 <- ggsurvplot(km_mod_caretk2, data = hw3_clean, pval = T,
    conf.int = T, legend = "none", xlab = "Duration (months)",
    title = "Interim Gov?", ggtheme = theme_bw(), palette = c("red",
        "darkgreen"))
g_singpar <- ggsurvplot(km_mod_singpar, data = hw3_clean, pval = T,
    conf.int = T, legend = "none", xlab = "Duration (months)",
    title = "Single Party?", ggtheme = theme_bw(), palette = c("red",
        "darkgreen"))
g_extsup <- ggsurvplot(km_mod_extsup, data = hw3_clean, pval = T,
    conf.int = T, legend = "none", xlab = "Duration (months)",
    title = "External Support?", ggtheme = theme_bw(), palette = c("red",
        "darkgreen"))

# Summary table (only used to source numbers for the
# interpretation, that's why it's commented out)
# summary(kaplan_mod_invest) summary(kaplan_mod_numst2)
# summary(kaplan_mod_caretk2) summary(kaplan_mod_singpar)
# summary(kaplan_mod_extsup)

# Plot!
arrange_ggsurvplots(list(g_invest, g_numst2, g_caretk2, g_singpar,
    g_extsup), ncol = 3, nrow = 2, risk.table = F, common.legend = F)

Interpretations

  • General Y-axis interpretation: the probability that the government is still in power at a given month. A higher curve indicates longer-lasting governments.

  • Investiture Requirement:

    • No Investiture Requirement: the survival probability curve declines at an inverse-exponential rate (meaning it decreases more quickly at first, and then decreases at a decreasing rate). The last event occurs at month 46, after which the curve stays constant at 21.5% due to right censorship.

    • Yes Investiture Requirement: the survival probability curve declines at an inverse-exponential rate, reaching a constant probability of 5.55% at 45 months. Additionally, the month of the last event comes slightly earlier than it did for governments in systems with no investiture requirement: month 45 vs. month 46. The number of “at risk” governments in systems with investiture requirements at this point of last event is also smaller than it is for governments in systems without investiture requirements: 6 vs. 24.

    • Statistical Significance: per the survfit and survminer documentation, the p-value on the plot comes from a logrank test comparing the two survival curves. The null hypothesis of the logrank test (taken from https://pmc.ncbi.nlm.nih.gov/articles/PMC2394262/) is that there should be no statistical difference between the number of events in each group, AKA: there is no difference in the distribution of cabinet durations between the groups. The p-val of <0.0001 is interpreted as the probability of observing the data given the null hypothesis that the distributions are the same. The p-val is very small, suggesting that governments in systems without an investiture requirement survive longer on average than those in systems with an investiture requirement, ceteris paribus. The non-overlapping 95% confidence intervals on the curves gives more certainty to this conclusion. Theoretically, this runs counter to expectations, because a larger degree of incumbent support would seem to be correlated with a higher duration. However, an investiture requirement does NOT mean that there isn’t this higher degree of support, just that it isn’t mandated, so perhaps that is one explanation.

  • Majority:

    • No Majority: the survival probability curve declines at an inverse-exponential rate, reaching a constant probability of 5.08% at 42 months, at which point 4 at-risk governments remain.

    • Yes Majority: the survival probability curve declines at an inverse-exponential rate, reaching a constant probability of 20% at 46 months, at which point 26 at-risk governments remain.

    • Statistical Significance: the p-val of 0.00013 suggests that majority governments survive longer on average than non-majority governments, ceteris paribus. While the curves’ confidence intervals do overlap at multiple points, it should be noted that these are point estimations, and therefore may not be as accurate as p-vals when it comes to comparing the duration distributions of the groups. Theoretically, this makes sense, because majority governments face a weaker internal opposition that could potentially challenge them and terminate their regime.

  • Interim Government:

    • No Interim Government: the survival probability curve declines at an inverse-exponential rate, reaching a constant probability of 15% at 46 months, at which point 28 at-risk governments remain.

    • Yes Interim Government: in stark contrast to non-interim governments, the survival probability curve for non-interim governments declines very very steeply, with the probability of survival being 0% at month 7, when only 1 at-risk government remains.

    • Statistical Significance: the p-val of <0.0001 suggests that non-interim governments survive longer on average than non-interim governments, ceteris paribus, a conclusion supported by the non-overlapping and relatively narrow confidence intervals. Theoretically, this makes sense, as an interim government is designed to be terminated at the next election.

  • Single Party:

    • Coalition: the survival probability curve declines at an inverse-exponential rate, reaching a constant probability of 13.5% at 45 months, at which point 15 at-risk governments remain.

    • Single Party: the survival probability curve declines gradually more, reaching a constant probability of 15.8% at 46 months, at which point 15 at-risk governments remain.

    • Statistical Significance: the p-val of 0.011 suggests that single party governments survive longer on average than coalition governments, ceteris paribus. However, the point estimates have relatively high standard errors, contributing to wider confidence intervals that overlap at various points. Theoretically, this makes sense, as single-party governments face weaker external opposition that could potentialy challenge them and terminate their regime.

  • External Support:

    • No External Support: the survival probability curve declines at an inverse-exponential rate, reaching a constant probability of 15.8% at 46 months, at which point 28 at-risk governments remain.

    • Yes External Support: the survival probability curve declines at an inverse-exponential rate, reaching a constant probability of 2.7% at 34 months, at which point 2 at-risk governments remain.

    • Statistical Significance: the p-val of 0.054 means that I fail to reject the logrank null hypothesis and conclude that there is not sufficient evidence to say that either governments receiving external support or not last longer than the other. The high standard errors of the point estimates also gives us less certainty about the survival functions. Theoretically, this runs counter to expectations, as it might make more sense, at least at a surface level, to assume that a government receiving more external support would last longer, because the external support would strengthen in.

Cox Proportional Hazards Model

Creating and Running the Model

cox_mod <- coxph(mod_obj ~ invest_f + numst2_f + caretk2_f +
    singpar_f + extsup_f, data = hw3_clean)

Visualizing the Model

Stargazer Summary Table:

stargazer(cox_mod, type = "text", star.cutoffs = c(0.05, 0.01,
    0.001), title = "Cox Proportional Hazards Model of Government Duration",
    dep.var.labels = ("Time to Government End"), covariate.labels = c("Investiture Requirement",
        "Majority", "Caretaker Government", "Single-Party Cabinet",
        "External Support"), single.row = TRUE)
## 
## Cox Proportional Hazards Model of Government Duration
## =====================================================
##                              Dependent variable:     
##                         -----------------------------
##                            Time to Government End    
## -----------------------------------------------------
## Investiture Requirement       0.681*** (0.129)       
## Majority                      -0.776*** (0.151)      
## Caretaker Government          1.875*** (0.284)       
## Single-Party Cabinet          -0.532*** (0.150)      
## External Support               -0.108 (0.194)        
## -----------------------------------------------------
## Observations                         314             
## R2                                  0.264            
## Max. Possible R2                    1.000            
## Log Likelihood                   -1,303.075          
## Wald Test                    114.490*** (df = 5)     
## LR Test                      96.196*** (df = 5)      
## Score (Logrank) Test         144.939*** (df = 5)     
## =====================================================
## Note:                   *p<0.05; **p<0.01; ***p<0.001
#### QUESTION: Why 5 degrees of freedom for the LR test, it
#### should be 1-g per this article:
#### https://pmc.ncbi.nlm.nih.gov/articles/PMC2394262/ ####
# Exponentiating the coefficients to get the hazard ratios
# even though ggforest does it automatically (just in case
# you want to see that I know I'm supposed to exponentiate)
exp(cox_mod$coefficients)
## invest_fInvestiture requirement                numst2_fMajority 
##                       1.9752480                       0.4601247 
##              caretk2_fCaretaker           singpar_fSingle party 
##                       6.5216334                       0.5872783 
##        extsup_fExternal support 
##                       0.8973010

ggforest Visualization:

ggforest(cox_mod, data = hw3_clean)

Interpretations

  • General conclusions:

    • The global p-value is very significant, suggesting that the covariates DO have a relationship with the dependent variable, government duration.

    • The concordance index is 0.69, meaning that, 69% of the time, the model correctly orders which of two governments terminates.

  • Investiture Requirement:

    • Sign: The sign of the hazard ratio (which I take to mean > or < 1) is positive (> 1), meaning that a government in a system with an investiture requirement has a higher instantaneous risk of termination than a government in a system without an investiture requirement, ceteris paribus.

    • Magnitude: The hazard ratio is 1.98, meaning that such an instantaneous risk of termination is 98% higher for governments in systems with an investiture requirement than for governments in systems without an investiture requirement, ceteris paribus.

    • Significance: The p-value for the coefficient is <0.001, allowing me to reject the logrank null hypothesis that there is no difference in the duration distributions of governments in systems with and without investiture requirements. Additionally, the confidence interval does not overlap with the reference level, lending further support to the conclusion that governments in systems with an investiture requirement survive shorter on average than governments in systems without an investiture requirement. Theoretically, this runs counter to expectations, because a larger degree of incumbent support would seem to be correlated with a higher duration. However, an investiture requirement does NOT mean that there isn’t this higher degree of support, just that it isn’t mandated, so perhaps that is one explanation.

  • Majority:

    • Sign: The sign of the hazard ratio is negative, meaning that a majority government has a lower instantaneous risk of termination than a non-majority government, ceteris paribus.

    • Magnitude: The hazard ratio is 0.46, meaning that such an instantaneous risk is (100% - 46% = 54%) lower for majority governments compared to non-majority governments, ceteris paribus.

    • Significance: The p-value for the coefficient is <0.001 and the confidence interval does not overlap with the reference level, supporting the conclusion that majority governments survive longer on average than non-majority governments, ceteris paribus. Theoretically, this makes sense, because majority governments face a weaker internal opposition that could potentially challenge them and terminate their regime.

  • Interim Government:

    • Sign: The sign of the hazard ratio is positive, meaning that an interim government has a higher instantaneous risk of termination than a non-interim government, ceteris paribus.

    • Magnitude: The hazard ratio is 6.52, meaning that such an instantaneous risk is 552% higher for interim governments compared to non-interim governments, ceteris paribus.

    • Significance: The p-value for the coefficient is <0.001 and the confidence interval does not overlap with the reference level, supporting the conclusion that interim governments survive shorter on average than non-interim governments, ceteris paribus. Theoretically, this makes sense, as an interim government is designed to be terminated at the next election.

  • Single Party:

    • Sign: The sign of the hazard ratio is negative, meaning that a single party government has a lower instantaneous risk of termination than a coalition government, ceteris paribus.

    • Magnitude: The hazard ratio is 0.596, meaning that such an instantaneous risk is (100% - 59% = 41%) lower for single party governments compared to coalition governments, ceteris paribus.

    • Significance: The p-value for the coefficient is <0.001 and the confidence interval does not overlap with the reference level, supporting the conclusion that single party governments survive longer on average than coalition governments, ceteris paribus. Theoretically, this makes sense, as single-party governments face weaker external opposition that could potentialy challenge them and terminate their regime.

  • External Support:

    • Sign: The sign of the hazard ratio is negative, meaning that a government receiving external support has a lower instantaneous risk of termination than a coalition government, ceteris paribus.

    • Magnitude: The hazard ratio is 0.90, meaning that such an instantaneous risk is (100% - 90% = 10%) lower for governments receiving external support compared to governments that are not, ceteris paribus.

    • Significance: The p-value for the coefficient is 0.576 and the confidence interval does overlap with the reference level, meaning that I fail to reject the logrank null hypothesis and conclude that there is not sufficient evidence to say that either governments receiving external support or not last longer than the other. Theoretically, this runs counter to expectations, as it might make more sense, at least at a surface level, to assume that a government receiving more external support would last longer, because the external support would strengthen in.