Answers are grounded in this paper and cite their sources.
Longitudinal social media text data provide important opportunities for studying how sentiment changes over time, but they also create methodological challenges because unstructured text data need to be transformed into analyzable sentiment score before statistical modeling can be applied. The current study is designed as a methodological tutorial that provides a practical workflow for longitudinal sentiment analysis. Specifically, we illustrate how researchers can move from raw social media posts to cleaned text, extract sentiment scores using both lexicon-based and large language model (LLM)-based approaches, aggregate irregular post-level scores into person-period longitudinal data, and fit statistical models to examine sentiment trajectories over time. Using longitudinal Twitter/X data as an empirical example, we compared AFINN and LLaMA as representative sentiment extraction methods and apply several longitudinal models, including the Heteroscedastic Linear Mixed Model (HLMM), Growth Curve Model (GCM), First-Order Autoregressive Model (AR(1)), and the proposed Trajectory model with Recurrent Autocorrelation and Cumulative Event-triggered effects (TRACE). Using AFINN-based sentiment scores in the empirical illustration, the TRACE showed better performance than traditional longitudinal models across three evaluation criteria (i.e., RMSE, WAIC, and LOOIC). Overall, these findings suggest that the choice of sentiment extraction method can influence later statistical modeling results, and TRACE provides a useful alternative for modeling both temporal dependence and event-driven changes in longitudinal text data.
No takes yet. Share an insight, caveat, or question.
Yuan et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: