Text as signal. A tutorial with case studies focusing on social media (Twitter).
Black Lives Matter
COVID-19
FFT
FIR
Negative emotions
Personal values
Positive emotions
Presidential elections
Signal analysis
Signal processing
Journal
Behavior research methods
ISSN: 1554-3528
Titre abrégé: Behav Res Methods
Pays: United States
ID NLM: 101244316
Informations de publication
Date de publication:
08 2023
08 2023
Historique:
accepted:
21
06
2022
medline:
21
8
2023
pubmed:
26
7
2022
entrez:
25
7
2022
Statut:
ppublish
Résumé
Sentiment analysis is the automated coding of emotions expressed in text. Sentiment analysis and other types of analyses focusing on the automatic coding of textual documents are increasingly popular in psychology and computer science. However, the potential of treating automatically coded text collected with regular sampling intervals as a signal is currently overlooked. We use the phrase "text as signal" to refer to the application of signal processing techniques to coded textual documents sampled with regularity. In order to illustrate the potential of treating text as signal, we introduce the reader to a variety of such techniques in a tutorial with two case studies in the realm of social media analysis. First, we apply finite response impulse filtering to emotion-coded tweets posted during the US Election Week of 2020 and discuss the visualization of the resulting variation in the filtered signal. We use changepoint detection to highlight the important changes in the emotional signals. Then we examine data interpolation, analysis of periodicity via the fast Fourier transform (FFT), and FFT filtering to personal value-coded tweets from November 2019 to October 2020 and link the variation in the filtered signal to some of the epoch-defining events occurring during this period. Finally, we use block bootstrapping to estimate the variability/uncertainty in the resulting filtered signals. After working through the tutorial, the readers will understand the basics of signal processing to analyze regularly sampled coded text.
Identifiants
pubmed: 35879505
doi: 10.3758/s13428-022-01917-1
pii: 10.3758/s13428-022-01917-1
pmc: PMC9311346
doi:
Types de publication
Journal Article
Research Support, Non-U.S. Gov't
Langues
eng
Sous-ensembles de citation
IM
Pagination
2595-2620Informations de copyright
© 2022. The Author(s).
Références
Azad, K. (2012, December 20). An interactive guide to the Fourier transform. https://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/ . Accessed 1 Feb 2022.
Baddeley, A. D., Hatter, J. E., Scott, D., & Snashall, A. (1970). Memory and time of day. The Quarterly Journal of Experimental Psychology, 22, 605–609. https://doi.org/10.1080/14640747008401939
doi: 10.1080/14640747008401939
Barrett, L. F., Lindquist, K. A., & Gendron, M. (2007). Language as context for the perception of emotion. Trends in Cognitive Sciences, 11, 327–332. https://doi.org/10.1016/j.tics.2007.06.003
doi: 10.1016/j.tics.2007.06.003
pubmed: 17625952
pmcid: 2225544
Bathina, K. C., ten Thij, M., Lorenzo-Luaces, L., Rutter, L. A., & Bollen, J. (2021). Individuals with depression express more distorted thinking on social media. Nature Human Behavior, 5, 458–466. https://doi.org/10.1038/s41562-021-01050-7
doi: 10.1038/s41562-021-01050-7
Bevelacqua, P. (2010, December 7). Signal processing: filtering. https://www.thefouriertransform.com/applications/filtering.php . Accessed 1 Feb 2022.
Bollen, J., Mao, H., & Zeng, X. (2011). Twitter mood predicts the stock market. Journal of Computational Science, 2, 1–8. https://doi.org/10.1016/j.jocs.2010.12.007
doi: 10.1016/j.jocs.2010.12.007
Boroditsky, L. (2019). Language and the brain. Science, 366(6461), 13-13. https://doi.org/10.1126/science.aaz6490
doi: 10.1126/science.aaz6490
Brown, K. W., & Moskowitz, D. S. (1998). Dynamic stability of behavior: The rhythms of our interpersonal lives. Journal of Personality, 66, 105–134. https://doi.org/10.1111/1467-6494.00005
doi: 10.1111/1467-6494.00005
pubmed: 9457772
Brown, N. R., Lee, P. J., Krslak, M., Conrad, F. G., Hansen, T. G. B., Havelka, J., & Reddon, J. R. (2009). Living in history: How war, terrorism, and natural disaster affect the organization of autobiographical memory. Psychological Science, 20, 399. https://doi.org/10.1111/j.1467-9280.2009.02307.x
doi: 10.1111/j.1467-9280.2009.02307.x
pubmed: 19298262
Calvo, R., & D’Mello, S. (2010). Affect detection: An interdisciplinary review of models, methods, and their applications. IEEE Transactions on Affective Computing, 1(1), 18–37. https://doi.org/10.1109/T-AFFC.2010.1
doi: 10.1109/T-AFFC.2010.1
Cambria, E. (2016). Affective computing and sentiment analysis. IEEE Intelligent Systems, 31(2), 102–107. https://doi.org/10.1109/MIS.2016.31
doi: 10.1109/MIS.2016.31
Cambria, E., Das, D., Bandyopadhyay, S., & Feraco, A. (2017). A practical guide to sentiment analysis. Springer.
doi: 10.1007/978-3-319-55394-8
Chapman, H. A., Kim, D. A., Susskind, J. M., & Anderson, A. K. (2009). In bad taste: evidence for the oral origins of moral disgust. Science, 323(5918), 1222–1226. https://doi.org/10.1126/science.1165565
doi: 10.1126/science.1165565
pubmed: 19251631
Charlton, N., Singleton, C., & Greetham, D. V. (2016). In the mood: the dynamics of collective sentiments on Twitter. Royal Society Open Science, 3, 160162. https://doi.org/10.1098/rsos.160162
doi: 10.1098/rsos.160162
pubmed: 27429774
pmcid: 4929909
Cochran, W. T., Cooley, J. W., Favin, D. L., Helms, H. D., Kaenel, R. A., Lang, W. W., ... & Welch, P. D. (1967). What is the fast Fourier transform? Proceedings of the IEEE, 55, 1664-1674. https://doi.org/10.1109/PROC.1967.5957
De Choudhury, M., Gamon, M., Counts, S., & Horvitz, E. (2013, June). Predicting depression via social media. In: Proceedings of the International AAAI Conference on Web and Social Media (Vol. 7, No. 1).
De Choudhury, M., Kiciman, E., Dredze, M., Coppersmith, G., & Kumar, M. (2016). Discovering shifts to suicidal ideation from mental health content in social media. In: Proceedings of the 33rd Annual ACM Conference on Human Factors in Computing Systems (pp. 7-12). CHI 2016. https://doi.org/10.1145/2858036.2858207
Dzogang, F., Lightman, S., & Cristianini, N. (2018). Diurnal variations of psychometric indicators in Twitter content. PLoS One, 13, e0197002. https://doi.org/10.1371/journal.pone.0197002
doi: 10.1371/journal.pone.0197002
pubmed: 29924814
pmcid: 6010242
Ebert, D., Hefter, H., Binkofski, F., & Freund, H. J. (2002). Coordination between breathing and mental grouping of pianistic finger movements. Perceptual and Motor Skills, 95, 339–353. https://doi.org/10.2466/pms.2002.95.2.339
doi: 10.2466/pms.2002.95.2.339
pubmed: 12434824
Efron, B., & Tibshirani, R. (1986). Bootstrap methods for standard errors, confidence intervals, and other measures of statistical accuracy. Statistical Science, 1, 54–75. https://doi.org/10.1214/ss/1177013815
doi: 10.1214/ss/1177013815
Fan, R., Varol, O., Varamesh, A., Barron, A., van den Leemput, I. A., Scheffer, M., & Bollen, J. (2019). The minute-scale dynamics of online emotions reveal the effects of affect labeling. Nature Human Behavior, 3, 92–100. https://doi.org/10.1038/s41562-018-0490-5
doi: 10.1038/s41562-018-0490-5
Ferrara, E., & Yang, Z. (2015). Measuring emotional contagion in social media. PLoS One, 10, e0142390. https://doi.org/10.1371/journal.pone.0142390
doi: 10.1371/journal.pone.0142390
pubmed: 26544688
pmcid: 4636231
Fishman, G. S. (2013). Spectral methods in econometrics. Harvard University Press.
Gelman, S. A., & Roberts, S. O. (2017). How language shapes the cultural inheritance of categories. Proceedings of the National Academy of Sciences of the United States of America, 114(30), 7900–7907. https://doi.org/10.1073/pnas.1621073114
doi: 10.1073/pnas.1621073114
pubmed: 28739931
pmcid: 5544278
Ginsberg, J., Mohebbi, M. H., Patel, R. S., Brammer, L., Smolinski, M. S., & Brilliant, L. (2009). Detecting influenza epidemics using search engine query data. Nature, 457, 1012–1014. https://doi.org/10.1038/nature07634
doi: 10.1038/nature07634
pubmed: 19020500
Golder, S. A., & Macy, M. W. (2011). Diurnal and seasonal mood vary with work, sleep, and daylength across diverse cultures. Science, 333, 1878–1881. https://doi.org/10.1126/science.1202775
doi: 10.1126/science.1202775
pubmed: 21960633
Gottman, J. M. (1979). Detecting cyclicity in social interaction. Psychological Bulletin, 86, 338–348. https://doi.org/10.1037/0033-2909.86.2.338
doi: 10.1037/0033-2909.86.2.338
Grassmann, M., Vlemincx, E., von Leupoldt, A., Mittelstädt, J. M., & Van den Bergh, O. (2016). Respiratory changes in response to cognitive load: A systematic review. Neural Plasticity, 2016, 8146809. https://doi.org/10.1155/2016/8146809
Guntuku, S. C., Yaden, D. B., Kern, M. L., Ungar, L. H., & Eichstaedt, J. C. (2017). Detecting depression and mental illness on social media: an integrative review. Current Opinion in Behavioral Sciences, 18, 43–49. https://doi.org/10.1016/j.cobeha.2017.07.005
doi: 10.1016/j.cobeha.2017.07.005
Holton, T. (2021). Digital Signal Processing: Principles and Applications. Cambridge University Press.
doi: 10.1017/9781108290050
Ignatow, G., & Mihalcea, R. (2016). Text mining: A guidebook for the social sciences. Sage Publications.
Imai, C., & Hashizume, M. (2015). A systematic review of methodology: time series regression analysis for environmental factors and infectious diseases. Tropical Medicine and Health, 43, 1–9. https://doi.org/10.2149/tmh.2014-21
doi: 10.2149/tmh.2014-21
pubmed: 25859149
Jebb, A. T., Tay, L., Wang, W., & Huang, Q. (2015). Time series analysis for psychological research: examining and forecasting change. Frontiers in Psychology, 6, 727. https://doi.org/10.3389/fpsyg.2015.00727
doi: 10.3389/fpsyg.2015.00727
pubmed: 26106341
pmcid: 4460302
Kircheis, M., & Potts, D. (2019). Direct inversion of the nonequispaced fast Fourier transform. Linear Algebra and its Applications, 575, 106–140. https://doi.org/10.1016/j.laa.2019.03.028
doi: 10.1016/j.laa.2019.03.028
Kong, Q., Siauw, T., & Bayen, A. (2020). Python Programming and Numerical Methods: A Guide for Engineers and Scientists. Academic Press.
Kopp, C. B. (1989). Regulation of distress and negative emotions: A developmental view. Developmental Psychology, 25, 343–354. https://doi.org/10.1037/0012-1649.25.3.343
doi: 10.1037/0012-1649.25.3.343
Krauss, R. M., & Chiu, C.-Y. (1998). Language and social behavior. In D. T. Gilbert, S. T. Fiske, & G. Lindzey (Eds.), The handbook of social psychology (pp. 41–88). McGraw-Hill.
Laranjo, L., Arguel, A., Neves, A. L., Gallagher, A. M., Kaplan, R., Mortimer, N., Mendes, G. A., & Lau, A. Y. (2015). The influence of social networking sites on health behavior change: a systematic review and meta-analysis. Journal of the American Medical Informatics Association: JAMIA, 22, 243–256. https://doi.org/10.1136/amiajnl-2014-002841
doi: 10.1136/amiajnl-2014-002841
pubmed: 25005606
Liu, Q. H., & Nguyen, N. (1998). An accurate algorithm for nonuniform fast Fourier transforms (NUFFT's). IEEE Microwave and Guided Wave Letters, 8(1), 18–20. https://doi.org/10.1109/75.650975
doi: 10.1109/75.650975
Lupyan, G., Abdel Rahman, R., Boroditsky, L., & Clark, A. (2020). Effects of language on visual perception. Trends in Cognitive Sciences, 24, 930–944. https://doi.org/10.1016/j.tics.2020.08.005
doi: 10.1016/j.tics.2020.08.005
pubmed: 33012687
Maçaira, P. M., Thomé, A. M., Oliveira, F. L., & Ferrer, A. L. (2018). Time series analysis with explanatory variables: A systematic literature review. Environmental Modelling & Software, 107, 199–209. https://doi.org/10.1016/j.envsoft.2018.06.004
doi: 10.1016/j.envsoft.2018.06.004
Majid, A., Bowerman, M., Kita, S., Haun, D. B. M., & Levinson, S. C. (2004). Can language restructure cognition? The case for space. Trends in Cognitive Sciences, 8, 108–114. https://doi.org/10.1016/j.tics.2004.01.003
doi: 10.1016/j.tics.2004.01.003
pubmed: 15301750
Mayor, E., & Bietti, L. M. (2021). Twitter, time and emotions. Royal Society Open Science, 8, 201900. https://doi.org/10.1098/rsos.201900
doi: 10.1098/rsos.201900
pubmed: 34084541
pmcid: 8150047
McCarley, R. W. (2007). Neurobiology of REM and NREM sleep. Sleep Medicine, 8, 302–330. https://doi.org/10.1016/j.sleep.2007.03.005
doi: 10.1016/j.sleep.2007.03.005
pubmed: 17468046
Milfont, T. L., Milojev, P., & Sibley, C. G. (2016). Values stability and change in adulthood: A 3-year longitudinal study of rank-order stability and mean-level differences. Personality and Social Psychology Bulletin, 42, 572–588. https://doi.org/10.1177/0146167216639245
doi: 10.1177/0146167216639245
pubmed: 27029575
Mirchandani, R. (2020). Five global issues to watch in 2021. Retrieved from https://unfoundation.org/blog/post/fve-global-issues-to-watch-in-2021/ . Accessed 1 Feb 2022.
Mohapatra, B. N., & Mohapatra, R. K. (2017, February). FFT and sparse FFT techniques and applications. In: 2017 Fourteenth International Conference on Wireless and Optical Communications Networks (WOCN) (pp. 1-5). IEEE. https://doi.org/10.1109/WOCN.2017.8065859
Mudelsee, M. (2019). Trend analysis of climate time series: A review of methods. Earth-Science Reviews, 190, 310–322. https://doi.org/10.1016/j.earscirev.2018.12.005
doi: 10.1016/j.earscirev.2018.12.005
Muthuswamy, J., & Thakor, N. V. (1998). Spectral analysis methods for neurological signals. Journal of Neuroscience Methods, 83, 1–14. https://doi.org/10.1016/S0165-0270(98)00065-X
doi: 10.1016/S0165-0270(98)00065-X
pubmed: 9765047
Nowak, M. A., & Krakauer, D. C. (1999). The evolution of language. Proceedings of the National Academy of Sciences of the United States of America, 96, 8028–8033. https://doi.org/10.1073/pnas.96.14.8028
doi: 10.1073/pnas.96.14.8028
pubmed: 10393942
pmcid: 22182
Othmer, E., Hayden, M. P., & Segelbaum, R. (1969). Encephalic cycles during sleep and wakefulness in humans: a 24-hour pattern. Science, 164, 447–449. https://doi.org/10.1126/science.164.3878.447
doi: 10.1126/science.164.3878.447
pubmed: 4304954
Pagel, M. (2009). Human language as a culturally transmitted replicator. Nature Reviews Genetics, 10, 405–415. https://doi.org/10.1038/nrg2560
doi: 10.1038/nrg2560
pubmed: 19421237
Pang, B., & Lee, L. (2008). Opinion mining and sentiment analysis. Foundations and Trends in Information Retrieval, 2, 1–135. https://doi.org/10.1561/1500000011
doi: 10.1561/1500000011
Patton, D., Politis, D. N., & White, H. (2009). Correction to “Automatic block-length selection for the dependent bootstrap” by D. Politis and H. White. Econometric Reviews, 28, 372–375. https://doi.org/10.1080/07474930802459016
doi: 10.1080/07474930802459016
Paul, M.J. & Dredze, M. (2011). You are what you tweet: Analyzing Twitter for public health. In: Proceedings of the Fifth International Conference on Weblogs and Social Media (pp 265-272), Barcelona.
Peng, C. K., Buldyrev, S. V., Goldberger, A. L., Havlin, S., Mantegna, R. N., Simons, M., & Stanley, H. E. (1995). Statistical properties of DNA sequences. Physica A, 221, 180–192. https://doi.org/10.1016/0378-4371(95)00247-5
doi: 10.1016/0378-4371(95)00247-5
pubmed: 11540495
Pennebaker, J. W., Boyd, R. L., Jordan, K., & Blackburn, K. (2015). The development and psychometric properties of LIWC2015. University of Texas at Austin.
Picard, R. (1997). Affective computing. The MIT Press.
Pinker, S. (2007). The stuff of thought: Language as a window into human nature. Viking.
Politis, D. N., & White, H. (2004). Automatic Block-Length Selection for the Dependent Bootstrap. Econometric Reviews, 23, 53–70. https://doi.org/10.1081/ETC-120028836
doi: 10.1081/ETC-120028836
Ponizovskiy, V., Ardag, M., Grigoryan, L., Boyd, R., Dobewall, H., & Holtz, P. (2020). Development and validation of the personal values dictionary: A theory–driven tool for investigating references to basic human values in text. European Journal of Personality, 34, 885–902. https://doi.org/10.1002/per.2294
doi: 10.1002/per.2294
Puschmann, C., & Powell, A. (2018). Turning words into consumer preferences: how sentiment analysis is framed in research and the news media. Social Media + Society. https://doi.org/10.1177/2056305118797724
Refinetti, R., Cornélissen, G., & Halberg, F. (2007). Procedures for numerical analysis of circadian rhythms. Biological Rhythm Research, 38, 275–325. https://doi.org/10.1080/09291010600903692
doi: 10.1080/09291010600903692
pubmed: 23710111
pmcid: 3663600
Rozin, P., Lowery, L., & Ebert, R. (1994). Varieties of disgust faces and the structure of disgust. Journal of Personality and Social Psychology, 66, 870–881. https://doi.org/10.1037/0022-3514.66.5.870
doi: 10.1037/0022-3514.66.5.870
pubmed: 8014832
Saha, K., Torous, J., Kiciman, E., & De Choudhury, M. (2021). Understanding side effects of antidepressants: Large-scale longitudinal study on social media data. JMIR Mental Health, 8, e26589. https://doi.org/10.2196/26589
doi: 10.2196/26589
pubmed: 33739296
pmcid: 8077932
Scherer, K. R., & Meuleman, B. (2013). Human emotion experiences can be predicted on theoretical grounds: evidence from verbal labeling. PLoS One, 8, e58166. https://doi.org/10.1371/journal.pone.0058166
doi: 10.1371/journal.pone.0058166
pubmed: 23483988
pmcid: 3590138
Schmidt, C., Collette, F., Cajochen, C., & Peigneux, P. (2007). A time to think: circadian rhythms in human cognition. Cognitive Neuropsychology, 24, 755–789. https://doi.org/10.1080/02643290701754158
doi: 10.1080/02643290701754158
pubmed: 18066734
Schwartz, S. H. (2010). Basic values: How they motivate and inhibit prosocial behavior. In M. Mikulincer & P. R. Shaver (Eds.), Prosocial motives, emotions, and behavior: The better angels of our nature (pp. 221–241). American Psychological Association.
doi: 10.1037/12061-012
Sevgi, L. (2007). Numerical Fourier transforms: DFT and FFT. IEEE Antennas and Propagation Magazine, 49, 238–243. https://doi.org/10.1109/MAP.2007.4293982
doi: 10.1109/MAP.2007.4293982
Shariff, A. F., & Tracy, J. L. (2011). What are emotion expressions for? Current Directions in Psychological Science, 20, 395–399. https://doi.org/10.1177/0963721411424739
doi: 10.1177/0963721411424739
Sinnenberg, L., Buttenheim, A. M., Padrez, K., Mancheno, C., Ungar, L., & Merchant, R. M. (2017). Twitter as a Tool for Health Research: A Systematic Review. American Journal of Public Health, 107, e1–e8. https://doi.org/10.2105/AJPH.2016.303512
doi: 10.2105/AJPH.2016.303512
pubmed: 27854532
pmcid: 5308155
Tan, C. R. (2021). The nascent case for adopting Jupyter notebooks as a pedagogical tool for interdisciplinary Humanities, Social Science, and Arts education. Computing in Science & Engineering, 23, 107–113. https://doi.org/10.1109/MCSE.2021.3062199
doi: 10.1109/MCSE.2021.3062199
ten Thij, M., Bathina, K., Rutter, L. A., Lorenzo-Luaces, L., van de Leemput, I. A., Scheffer, M., & Bollen, J. (2020). Depression alters the circadian pattern of online activity. Scientific Reports, 10, 17272. https://doi.org/10.1038/s41598-020-74314-3
doi: 10.1038/s41598-020-74314-3
pubmed: 33057099
pmcid: 7560656
Truong, C. (2018, January 21). ruptures: change point detection in Python. https://github.com/deepcharles/ruptures . Accessed 1 Feb 2022.
Truong, C., Oudre, L., & Vayatis, N. (2020). Selective review of offline change point detection methods. Signal Processing, 167, 107299. https://doi.org/10.1016/j.sigpro.2019.107299
doi: 10.1016/j.sigpro.2019.107299
Tumasjan A, Sprenger T, Sandner P, Welpe I. (2010). Predicting elections with Twitter: What 140 characters reveal about political sentiment. In: Proceedings of the AAAI Conference on Weblogs and Social Media (pp 178-185). AAAI Press. https://doi.org/10.1177/0894439310386557
Valdés-Sosa, P. A., Sánchez-Bornot, J. M., Lage-Castellanos, A., Vega-Hernández, M., Bosch-Bayard, J., Melie-García, L., & Canales-Rodríguez, E. (2005). Estimating brain functional connectivity with sparse multivariate autoregression. Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences, 360(1457), 969–981. https://doi.org/10.1098/rstb.2005.1654
doi: 10.1098/rstb.2005.1654
pubmed: 16087441
pmcid: 1854937
Varga, S., & Heck, D. H. (2017). Rhythms of the body, rhythms of the brain: respiration, neural oscillations, and embodied cognition. Consciousness and Cognition, 56, 77–90. https://doi.org/10.1016/j.concog.2017.09.008
doi: 10.1016/j.concog.2017.09.008
pubmed: 29073509
Walker, M., Thornton, L., De Choudhury, M., Teevan, J., Bulik, C. M., Levinson, C. A., & Zerwas, S. (2015). Facebook use and disordered eating in college-aged women. The Journal of Adolescent Health: Official Publication of the Society for Adolescent Medicine, 57, 157–163. https://doi.org/10.1016/j.jadohealth.2015.04.026
doi: 10.1016/j.jadohealth.2015.04.026
pubmed: 26206436
Wang, W., Hernandez, I., Newman, D. A., He, J., & Bian, J. (2016). Twitter analysis: Studying US weekly trends in work stress and emotion. Applied Psychology. An International Review, 65, 355–378. https://doi.org/10.1111/apps.12065
doi: 10.1111/apps.12065
Weiss, S. M., Indurkhya, N., & Zhang, T. (2015). Fundamentals of predictive text mining. Springer.
doi: 10.1007/978-1-4471-6750-1
Windt, J. M. (2021). How deep is the rift between conscious states in sleep and wakefulness? Spontaneous experience over the sleep–wake cycle. Philosophical Transactions of the Royal Society B, 376(1817), 20190696. https://doi.org/10.1098/rstb.2019.0696
doi: 10.1098/rstb.2019.0696
Xiong, F., & Liu, Y. (2014). Opinion formation on social media: An empirical approach. Chaos: An Interdisciplinary Journal of Nonlinear Science, 24(1), 013130. https://doi.org/10.1063/1.4866011
Yarkoni, T., & Westfall, J. (2017). Choosing prediction over explanation in psychology: Lessons from machine learning. Perspectives on Psychological Science, 12, 1100–1122. https://doi.org/10.1177/1745691617693393
doi: 10.1177/1745691617693393
pubmed: 28841086
pmcid: 6603289