Replication files for “Comparing Online and Offline Political Support”

Purpose

The folders contain all replication files for the paper:

Brandenberger, Laurence, Giona Casiraghi, Georges Andres, Simon Schweighofer, Frank Schweitzer. 2022. Comparing Online and Offline Political Support. Swiss Political Science Review.

The Rscript is commented to facilitate replication. System requirements and package versions are documented in the following section.

Setup

Operating system

The analysis was performed on a macOS 10.15.7 using R-Version 4.1.2.

R-packages

The following R-packages (and verions) were used for the analysis:

  • ggplot2 (Version 3.3.5)
  • ghypernet (Version 1.1.0)
  • tidyverse (Version 1.3.1)
  • texreg (Version 1.37.5)

Content

  • AnalysisScript.R (R-script for the entire analysis)
  • input folder (data input)
  • output folder (figure/table output)
  • README_ReplicationMaterial.md (this readme)

input folder

The input folder contains a RData-file (Data_163MP.RData) with the following objects:

  • cospons_nofilter
    • Full cosponsorship matrix of the 321 MPs who served in the 48 and 49th legislative period.
    • This information is needed to caluclate triadic closure (control variable).
  • cosponsfull
    • Weighted cosponsorship matrix of the 163 MPs who are also on Politnetz (sample).
    • Dependent variable
  • dtMPfiltfull
    • Attribute data for the 321 MPs
  • dtMPfull
    • Attribute data for the 163 MPs (sample)
  • el
    • Edgelist with cosponsorship information, online endorsement, homophily variables etc.
  • eps_politnetzsimfull and eps_politnetz_content
    • Baseline for Politnetzsimilarity
  • politnetz_absdiffactivity
    • Differences in online activities (nr uf supportees named)
  • politnetz_absdiffactivity_diff0
    • Baseline for differences in online activities
  • politnetz_content
    • Similarity matrix for online endorsements
  • politnetzfull
    • Online endorsements (dummy variables, 1, exp(1))
  • politnetzsimfull
    • Similarity matrix for online endorsements–Jaccard similarity, SI Online
  • ximat
    • xi matrix; indicating how many bills an MP proposed to parliament.

output folder

The output folder contains Figures 1-2 and Table 2 from the manuscript.

  • Fig1_heatplot.pdf
  • Fig2_ME.pdf
  • Table2_ghypEG.tex

The folder also contains figures and tables for the Supplementary Information Online.

  • SIOnline_Fig2.pdf
  • SIOnline_Fig3.pdf
  • SIOnline_Fig4.pdf
  • SIOnline_Fig5.pdf
  • SIOnline_Table1.tex
  • SIOnline_Table2.tex
  • SIOnline_Table3.tex

Contact

Analysis was performed by Laurence Brandenberger and Giona Casiraghi with code snippets from George Andres. Please direct any questions to Laurence Brandenberger ().