Skip to content

Instantly share code, notes, and snippets.

@johnburnmurdoch
johnburnmurdoch / tiktok_reform_model.R
Last active March 22, 2025 12:38
Replication code for Financial Times analysis of the association between getting news from TikTok and shifting towards Reform UK
# Model impact on vote choice of having seen political content on social media
needs(tidyverse, stats, haven, survey, MASS)
# Read in BESIP trend file, which you can download from here: https://www.britishelectionstudy.com/data-object/british-election-study-combined-wave-1-29-internet-panel/
BESIP_trend <- read_dta("path/to/BES2024_W29_Panel_v29A.0.dta", encoding = "latin1")
BESIP_trend_dd <- stata_summary(BESIP_trend)
# If social media political content is missing (because the respondent does not use that platform), code it the same way as people who said they saw no content
# Group education into four segments, including current full-time students
# Vote variables are vote intention as at May 2021 and immediately before the 2024 general election