From AI to Experts: Understanding Pre-Election Inflation Narratives on Social Media via Sentiment and Topic Analysis

Author(s)

Yifan Zhang, MPH, PhD1, Nethra Sambamoorthi, PhD1, R. Constance C. Wiener, DMD, PhD2, Hao Wang, M.D. Ph.D3, Chan Shen, Ph.D4, Sophie Mitra, Ph.D5, Patricia A. Findley, DrPH, MSW, LCSW6, Usha Sambamoorthi, MA, PhD1;
1University of North Texas Health Science Center, Fort Worth, TX, USA, 2West Virginia University, Morgantown, WV, USA, 3JPS Health Network, Department of Emergency Medicine, Fort Worth, TX, USA, 4The Pennsylvania State University, Hershey, PA, USA, 5Fordham University, Bronx, NY, USA, 6Loyola University Chicago, School of Social Work, Chicago, IL, USA
OBJECTIVES: Inflation has become a critical post-pandemic concern, contributing significantly to societal stress. Social media platforms, like X (formerly Twitter), provide insights into public sentiment and discourse. This study analyzes U.S. pre-election narratives on inflation using sentiment analysis and topic modeling to explore emotional tone and thematic content.
METHODS: A random sample of 9,695 English posts from April 29 to May 5, 2024, was analyzed using a hybrid methodology. Sentiment analysis was conducted with SentiStrength, and topic modeling with machine learning methods was performed using Python 3.10. Generative AI (ChatGPT-4o) analyzed 50 sample posts, validated by human experts from diverse disciplines.
RESULTS: Posts contained significant political content, with 20% mentioning President Biden (1,308 mentions) or ex-President Trump (893 mentions). Frequent terms included "money," "economy," and "price." Sentiment analysis using ChatGPT identified sarcasm alongside positive and negative sentiments. Using a two-step method of topic modeling and hierarchical clustering, the following topics were identified: economic and social frustrations (32.1%), policy and economic affairs (24.5%), economic growth and employment (11.3%), social and security issues (11.3%), energy and cost challenges (10.6%), and opinions and political discourse (10.2%). The analysis revealed that discussions on inflation were more focused on political anger and macroeconomic discourse than personal stress. A comparison of content analysis of 50 posts by ChatGPT and human experts showed 76% unanimous concordance, 12% partial agreement, and 12% disagreement. In cases of partial agreement and disagreement, content analysis using ChatGPT-o1 preview achieved 100% agreement with human experts. However, ChatGPT could not process all 9,695 posts for topic modeling, requiring the use of Python-based tools.
CONCLUSIONS: Sentiment analysis highlighted pervasive negativity about inflation, with discussions extending to socio-political issues. ChatGPT captured emotional tones effectively but faced limitations with large data volumes, suggesting a hybrid approach involving both AI and human expertise is necessary for comprehensive social media analysis.

Conference/Value in Health Info

2025-05, ISPOR 2025, Montréal, Quebec, CA

Value in Health, Volume 28, Issue S1

Code

MSR60

Topic

Methodological & Statistical Research

Topic Subcategory

Artificial Intelligence, Machine Learning, Predictive Analytics

Disease

No Additional Disease & Conditions/Specialized Treatment Areas

Your browser is out-of-date

ISPOR recommends that you update your browser for more security, speed and the best experience on ispor.org. Update my browser now

×