Skip to content
naulon

No retraction, correction or concern found when last checked on Nov 2, 2026.

Forecasting the onset and course of mental illness with Twitter data

Andrew G. Reece, Andrew J. Reagan, Katharina L. M. Lix and 3 more (opens in a new tab)

Scientific Reports · 2017 · CC BY

doi:10.1038/s41598-017-12961-9 (opens in a new tab)

Abstract

We developed computational models to predict the emergence of depression and Post-Traumatic Stress Disorder in Twitter users. Twitter data and details of depression history were collected from 204 individuals (105 depressed, 99 healthy). We extracted predictive features measuring affect, linguistic style, and context from participant tweets (N = 279,951) and built models using these features with supervised learning algorithms. Resulting models successfully discriminated between depressed and healthy content, and compared favorably to general practitioners’ average success rates in diagnosing depression, albeit in a separate population. Results held even when the analysis was restricted to content posted before first depression diagnosis. State-space temporal analysis suggests that onset of depression may be detectable from Twitter data several months prior to diagnosis. Predictive results were replicated with a separate sample of individuals diagnosed with PTSD (N users = 174, N tweets = 243,775). A state-space time series model revealed indicators of PTSD almost immediately post-trauma, often many months prior to clinical diagnosis. These methods suggest a data-driven, predictive approach for early screening and detection of mental illness.

References 56

  1. 1.

    Paparrizos, J., White, R. W. & Horvitz, E. Screening for Pancreatic Adenocarcinoma Using Signals From Web Search Logs: Feasibility Study and Results. J Oncol Pract: JOPR010504 (2016).

    Not in our library10.1200/jop.2015.010504 (opens in a new tab)

  2. 2.
  3. 3.

    Li, J. & Cardie, C. Early Stage Influenza Detection from Twitter. arXiv:1309.7340 [cs] (2013).

    Not in our library

  4. 4.

    Schmidt CW. Trending now: Using social media to predict and track disease outbreaks. Environ Health Perspect. 2012;120(1):a30-a33.

    Not in our library10.1289/ehp.120-a30 (opens in a new tab)

  5. 5.

    Alajajian SE, et al. The Lexicocalorimeter: Gauging public health through caloric input and output on social media. arXiv. 2015;1507:05098.

    Not in our library10.1371/journal.pone.0168893 (opens in a new tab)

  6. 6.

    Moreno M, Christakis D, Egan K, Brockman L, Becker T. Associations between displayed alcohol references on Facebook and problem drinking among college students. Arch Pediatr Adolesc Med. 2012;166(2):157-163.

    Not in our library10.1001/archpediatrics.2011.180 (opens in a new tab)

  7. 7.

    De Choudhury, M., Counts, S. & Horvitz, E. Predicting postpartum changes in emotion and behavior via social media. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (ACM: New York), pp. 3267–3276 (2013).

    Not in our library

  8. 8.

    De Choudhury, M., Gamon, M., Counts, S. & Horvitz, E. Predicting depression via social media. In Seventh International AAAI Conference on Weblogs and Social Media (2013).

    Not in our library

  9. 9.

    Katikalapudi R, Chellappan S, Montgomery F, Wunsch D, Lutzen K. Associating internet usage with depressive behavior among college students. IEEE Tech Soc Magazine. 2012;31(4):73-80.

    Not in our library10.1109/mts.2012.2225462 (opens in a new tab)

  10. 10.

    Moreno MA, et al. Feeling bad on Facebook: Depression disclosures by college students on a social networking site. Depress Anxiety. 2011;28(6):447-455.

    Not in our library10.1002/da.20805 (opens in a new tab)

  11. 11.

    Park, M., Cha, C. & Cha, M. Depressive moods of users portrayed in Twitter. In Proceedings of the ACM SIGKDD Workshop on healthcare informatics (HI-KDD) (pp. 1–8) (2012).

    Not in our library

  12. 12.

    Reece, A. G. & Danforth, C. M. Instagram photos reveal predictive markers of depression. EPJ Data Science6(1), 15 (2017).

    Not in our library

  13. 13.

    Nadeem, M., Horn, M. & Coppersmith, G. Identifying depression on Twitter. arXiv:1607.07384 (2016).

    Not in our library

  14. 14.

    Coppersmith, G., Harman, C. & Dredze, M. Measuring Post-Traumatic Stress Disorder in Twitter. In Eighth International AAAI Conference on Weblogs and Social Media (2014).

    Not in our library

  15. 15.

    De Choudhury, M., Kiciman, E., Dredze, M., Coppersmith, G. & Kumar, M. Discovering shifts to suicidal ideation from mental health content in social media. In Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems (ACM: New York), pp. 2098–2110 (2016).

    Not in our library10.1145/2858036.2858207 (opens in a new tab)

  16. 16.

    Ferrari A, et al. Global variation in the prevalence and incidence of major depressive disorder: a systematic review of the epidemiological literature. Psychol Med. 2013;43(3):471-481.

    Not in our library10.1017/s0033291712001511 (opens in a new tab)

  17. 17.

    American Psychiatric Association. Diagnostic and statistical manual of mental disorders (4th ed., text rev.) (2000).

    Not in our library

  18. 18.

    Gwynn RC, et al. Prevalence, diagnosis, and treatment of depression and generalized anxiety disorder in a diverse urban community. Psychiatr Serv. 2008;59(6):641-647.

    Not in our library10.1176/ps.2008.59.6.641 (opens in a new tab)

  19. 19.

    Stein MB, McQuaid JR, Pedrelli P, Lenox R, McCahill ME. Posttraumatic stress disorder in the primary care medical setting. Gen Hosp Psychiatry. 2000;22(4):261-269.

    Not in our library10.1016/s0163-8343(00)00080-3 (opens in a new tab)

  20. 20.

    Campbell DG, et al. Prevalence of Depression–PTSD comorbidity: Implications for clinical practice guidelines and primary care-based interventions. J Gen Intern Med. 2007;22(6):711-718.

    Not in our library10.1007/s11606-006-0101-4 (opens in a new tab)

  21. 21.

    Munro CG, Freeman CP, Law R. General practitioners’ knowledge of post-traumatic stress disorder: a controlled study. Br J Gen Pract. 2004;54(508):843-847.

    Not in our library

  22. 22.

    Taubman-Ben-Ari O, Rabinowitz J, Feldman D, Vaturi R. Post-traumatic stress disorder in primary-care settings: prevalence and physicians’ detection. Psychol Med. 2001;31(03):555-560.

    Not in our library10.1017/s0033291701003658 (opens in a new tab)

  23. 23.

    Choudhury, M. D., Counts, S., Horvitz, E. J. & Hoff, A. Characterizing and predicting postpartum depression from shared facebook data. In Proceedings of the 17th ACM conference on Computer supported cooperative work & social computing (CSCW′14). ACM, New York, NY, USA, 626–638, 10.1145/2531602.2531675 (2014).

    Not in our library

  24. 24.

    Eaton WW, Neufeld K, Chen L, Cai G. A comparison of self-report and clinical diagnostic interviews for depression: Diagnostic interview schedule and schedules for clinical assessment in neuropsychiatry in the baltimore epidemiologic catchment area follow-up. Arch Gen Psychiatry. 2000;57(3):217-222.

    Not in our library10.1001/archpsyc.57.3.217 (opens in a new tab)

  25. 25.

    Cornford CS, Hill A, Reilly J. How patients with depressive symptoms view their condition: A qualitative study. Fam Pract. 2007;24(4):358-364.

    Not in our library10.1093/fampra/cmm032 (opens in a new tab)

  26. 26.

    Karp DA. Living with depression: Illness and identity turning points. Qual Health Res. 1994;4(1):6-30.

    Not in our library10.1177/104973239400400102 (opens in a new tab)

  27. 27.

    Winokur G. Duration of Illness prior to Hospitalization (Onset) in the Affective Disorders. Neuropsychobiology. 1976;2(2–3):87-93.

    Not in our library10.1159/000117535 (opens in a new tab)

  28. 28.

    Mitchell AJ, Vaze A, Rao S. Clinical diagnosis of depression in primary care: a meta-analysis. Lancet. 2009;374(9690):609-619.

    Not in our library10.1016/s0140-6736(09)60879-5 (opens in a new tab)

  29. 29.

    Radloff LS. The CES-D scale: A self-report depression scale for research in the general population. Appl Psych Manage. 1977;1(3):385-401.

    Not in our library10.1177/014662167700100306 (opens in a new tab)

  30. 30.

    Fountoulakis KN, et al. Comparison of depressive indices: Reliability, validity, relationship to anxiety and personality and the role of age and life events. J Affect Disord. 2007;97(1–3):187-195.

    Not in our library10.1016/j.jad.2006.06.015 (opens in a new tab)

  31. 31.

    Zich JM, Attkisson CC, Greenfield TK. Screening for depression in primary care clinics: The CES-D and the BDI. Int J Psychiatry Med. 1990;20(3):259-277.

    Not in our library10.2190/lykr-7vhp-yjem-mkm2 (opens in a new tab)

  32. 32.

    Brewin CR, et al. Brief screening instrument for post-traumatic stress disorder. Br J Psychiatry. 2002;181(2):158-162.

    Not in our library10.1017/s0007125000161896 (opens in a new tab)

  33. 33.

    Peer E, Vosgerau J, Acquisti A. Reputation as a sufficient condition for data quality on Amazon Mechanical Turk. Behav Res Methods. 2013;46(4):1023-1031.

    Not in our library10.3758/s13428-013-0434-y (opens in a new tab)

  34. 34.

    Litman L, Robinson J, Rosenzweig C. The relationship between motivation, monetary compensation, and data quality among US- and India-based workers on Mechanical Turk. Behav Res Methods. 2014;47(2):519-528.

    Not in our library10.3758/s13428-014-0483-x (opens in a new tab)

  35. 35.

    Cuijpers P, Boluijt P, van Straten A. Screening of depression in adolescents through the Internet. Eur Child Adolesc Psychiatry. 2007;17(1):32-38.

    Not in our library10.1007/s00787-007-0631-2 (opens in a new tab)

  36. 36.

    Haringsma R, Engels GI, Beekman ATF, Spinhoven P. The criterion validity of the Center for Epidemiological Studies Depression Scale (CES-D) in a sample of self-referred elders with depressive symptomatology. Int J Geriatr Psychiatry. 2004;19(6):558-563.

    Not in our library10.1002/gps.1130 (opens in a new tab)

  37. 37.

    Pennebaker, J. W., Boyd, R. L., Jordan, K. & Blackburn, K. The development and psychometric properties of LIWC2015. UT Faculty/Researcher Works (2015).

    Not in our library

  38. 38.

    Bradley, M. M. & Lang. P. J. Affective norms for English words (ANEW): Instruction manual and affective ratings. Technical report C-1, the center for research in psychophysiology, University of Florida (1999).

    Not in our library

  39. 39.
  40. 40.

    Reagan, A. J., Tivnan, B. F., Williams, J. R., Danforth, C. M. & Dodds, P. S. Benchmarking sentiment analysis methods for large-scale texts: A case for using continuum-scored words and word shift graphs (2016).

    Not in our library

  41. 41.

    Cody EM, Reagan AJ, Mitchell L, Dodds PS, Danforth CM. Climate change sentiment on Twitter: An unsolicited public opinion poll. PloS one. 2015;10(8):e0136092.

    Not in our library10.1371/journal.pone.0136092 (opens in a new tab)

  42. 42.

    Frank, M. R., Mitchell, L., Dodds, P. S. & Danforth, C. M. Happiness and the patterns of life: A study of geolocated tweets. Scientific Reports 3(2625) (2013).

    Not in our library10.1038/srep02625 (opens in a new tab)

  43. 43.

    Bliss, C. A., Kloumann, I. M., Harris, K. D., Danforth, C. M. & Dodds, P. S. Twitter reciprocal reply networks exhibit assortativity with respect to happiness. Journal of Computational Science3(5): pp. 388–397 (2012).

    Not in our library

  44. 44.

    Gao, Z., Small, M., Kurths, J. Complex network analysis of time series, Europhysics Letters, Vol 116, 5 (2016).

    Not in our library

  45. 45.

    Dodds PS, et al. Human language reveals a universal positivity bias. Proceedings of the National Academy of Sciences. 2015;112(8):2389-2394.

    Not in our library10.1073/pnas.1411678112 (opens in a new tab)

  46. 46.

    Storylab. Hedonometer 2.0: Measuring happiness and using word shifts. http://goo.gl/oM9W4Z (2014).

    Not in our library

  47. 47.

    Schulberg HC, Katon W, Simon GE, Rush A. Treating major depression in primary care practice: An update of the agency for health care policy and research practice guidelines. Arch Gen Psychiatry. 1998;55(12):1121-1127.

    Not in our library10.1001/archpsyc.55.12.1121 (opens in a new tab)

  48. 48.

    Gao, Z., Cai, Q., Yang, Y., Dang, W., Zhang, S. Multiscale limited penetrable horizontal visibility graph for analyzing nonlinear time series, Scientific Reports 6, Article number: 35622 (2016)

    Not in our library10.1038/srep35622 (opens in a new tab)

  49. 49.

    Paul, M. J., White, R. W. & Horvitz, E. Search and breast cancer: On episodic shifts of attention over life histories of an illness. ACM Transactions on the Web (TWEB) 10, no. 2, 13 (2016).

    Not in our library

  50. 50.

    Rude S, Gortner EM, Pennebaker J. Language use of depressed and depression-vulnerable college students. Cogn Emotion. 2004;18(8):1121-1133.

    Not in our library10.1080/02699930441000030 (opens in a new tab)

  51. 51.

    Detels, R. The scope and concerns of public health. Oxford University Press (2009).

    Not in our library

  52. 52.

    Epstein RM, et al. “I didn’t know what was wrong:” How people with undiagnosed depression recognize, name and explain their distress. J Gen Intern Med. 2010;25(9):954-961.

    Not in our library10.1007/s11606-010-1367-0 (opens in a new tab)

  53. 53.

    Fiske ST, Hauser RM. Protecting human research participants in the age of big data. Proc Natl Acad Sci USA. 2014;111(38):13675-13676.

    Not in our library10.1073/pnas.1414626111 (opens in a new tab)

  54. 54.

    Lumb, D. Scientists release personal data for 70,000 OkCupid profiles. engt.co/2b4NnQ0 (2016).

    Not in our library

  55. 55.

    Lazer D, Kennedy R, King G, Vespignani A. The parable of Google Flu: Traps in big data analysis. Science. 2014;343(6176):1203-1205.

    Not in our library10.1126/science.1248506 (opens in a new tab)

  56. 56.

    https://github.com/hmmlearn/hmmlearn.

    Not in our library

Cited by papers we hold 3

Questions about this paper

We email you if it is retracted, withdrawn, corrected or flagged.

Reads

Read by people on this page

None yet.

Checked or read by AI through naulon

None yet.

A person counts once a day per paper. We keep no cookie and no address: a reader is a hash that changes every day. Any month under five reads shows no number.

Are you an author?

Is this your paper?

Claim it to add your note and be paid when agents cite it. Free.