Analysis

Author

Aashna

Call to brm()

fit <- brm(formula = death_age ~ treatment + win_margin + election_age + party + sex,
                  data = x,
                  family = gaussian(),
                  refresh = 0,
                  silent = 2,
                  seed = 4)

summary(fit)
 Family: gaussian 
  Links: mu = identity; sigma = identity 
Formula: death_age ~ treatment + win_margin + election_age + party + sex 
   Data: x (Number of observations: 254) 
  Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
         total post-warmup draws = 4000

Regression Coefficients:
                Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept          66.07      7.57    50.94    80.53 1.00     4472     3249
treatmentwin        8.61      2.86     2.92    14.14 1.00     2793     2834
win_margin         -1.44      0.52    -2.47    -0.41 1.00     2756     2429
election_age        0.12      0.09    -0.06     0.29 1.00     4818     2556
partyRepublican     4.02      1.45     1.19     6.86 1.00     4294     3002
partyThirdparty    -9.49      7.99   -25.03     6.80 1.00     4483     2906
sexMale             1.37      5.24    -9.08    11.63 1.00     5255     2707

Further Distributional Parameters:
      Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sigma    11.29      0.52    10.36    12.38 1.00     4422     2801

Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
fixef(fit)
                  Estimate  Est.Error         Q2.5      Q97.5
Intercept       66.0672228 7.57379113  50.94391645 80.5327082
treatmentwin     8.6115344 2.85665658   2.91903229 14.1395286
win_margin      -1.4439133 0.52466229  -2.47219782 -0.4104550
election_age     0.1163592 0.09017056  -0.06448555  0.2942923
partyRepublican  4.0225442 1.45045664   1.19398090  6.8603601
partyThirdparty -9.4938794 7.98847011 -25.03495434  6.7954477
sexMale          1.3734373 5.23966921  -9.07521159 11.6270860
We used a Bayesian model to see how winning an election affects longevity. The results suggest that winners live about 8.6 years longer on average compared to losers. The model also showed significant effects from other factors like win_margin and party.

Second Call to brm()

 Family: gaussian 
  Links: mu = identity; sigma = identity 
Formula: death_age ~ treatment + win_margin + party 
   Data: x (Number of observations: 254) 
  Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
         total post-warmup draws = 4000

Regression Coefficients:
                Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept          73.60      1.79    69.99    77.02 1.00     2594     2716
treatmentwin        8.22      2.81     2.63    13.82 1.00     2592     2712
win_margin         -1.38      0.52    -2.38    -0.40 1.00     2594     2500
partyRepublican     3.95      1.45     1.14     6.87 1.00     3685     2693
partyThirdparty    -9.49      7.96   -24.89     6.14 1.00     4028     2930

Further Distributional Parameters:
      Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sigma    11.28      0.51    10.34    12.36 1.00     4152     2658

Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
                 Estimate Est.Error       Q2.5      Q97.5
Intercept       73.602325  1.788027  69.992203 77.0237859
treatmentwin     8.219345  2.811294   2.634368 13.8211387
win_margin      -1.381950  0.515253  -2.380548 -0.3983763
partyRepublican  3.950932  1.452342   1.144944  6.8675594
partyThirdparty -9.485208  7.964321 -24.888057  6.1440414

Graph

Using 10 posterior draws for ppc type 'dens_overlay' by default.

Using data about US governor candidates from the years 1945 - 2012, we seek to find the relationship between the longevity of Preceptor David Kane and whether or not he wins the Mayoral Election in Newton, MA. Modern medicine has increased the overall lifespan of all candidates regardless of if they won or lost. We modeled age of death as a sum of election result (won/lost), age during election, political party and the win margin. We expect Preceptor to live an extra 8 years (plus/minus 6 years) if he were to win the Mayorial election.

\[death\_age_i = \beta_{0} + \beta_{1} treatment_i + \beta_{2}win\_margin_i + \\ \beta_{4}repub_i + \beta_{5}thirdparty_i + \epsilon_{i}\]

Tibble

Warning in tidy.brmsfit(x, ..., effects = "fixed"): some parameter names
contain underscores: term naming may be unreliable!
Characteristic Beta 95% CI1
treatment

    treatmentwin 8.2 2.6, 14
win_margin -1.4 -2.4, -0.40
party

    partyRepublican 4.0 1.1, 6.9
    partyThirdparty -9.5 -25, 6.1
1 CI = Credible Interval

The candidates who won for mayor are predicted to live 8.2 years longer than if they did not win. Candidates of the republican party are predicted to live 4 years longer and candidates of the third party are predicted to live 9.5 years less if not elected.


variables: win_margin, treatment, party

values:

Subject: lifespan after mayor election

Preceptor table:

Columns: party: democrat treatment: win or lose win_margin: 0

  • Outcome: Years lived after won or years lived after lost election (age at death)

  • Treatment: whether or not the candidate won the election

  • Covariates: year of election, age of mayor

  • model type: predictive

Rows:

  • Units: mayor elections in various counties (candidates for mayor)

EDA: glimpse(governors)

Validity: validity may not hold because the age of the candidates may not be accurate such as the year they were born which can affect the result. Different elections used in the same dataset may also affect the outcome.

Population Table:

Stability: may not hold because the average lifespan changes over time and could be greater than it used to be. Healthcare has also changed over time.

Representativeness: may not hold because there are age restrictions (and possibly health guidelines) for specific elections. Different types of elections from across the country are also needed

Unconfoundedness: may not hold because the candidates could have differing health situations and financial situations to be able to afford proper healthcare