Source-linked AI summary

Forecasting the onset and course of mental illness with Twitter data

Andrew G. Reece, Andrew J. Reagan, Katharina L. M. Lix, Peter Sheridan Dodds, Christopher M. Danforth, Ellen J. Langer

arXiv:1608.07740v1physics.soc-phcs.SI

TL;DR

The study addresses whether Twitter data can support earlier detection of depression and PTSD. It builds predictive models from affective, linguistic, contextual, metadata, and semantic features, finding that modeled states closely aligned with affected and healthy groups.

  • Problem

    Clinical diagnosis of depression and PTSD can be delayed, while analyzing either entire posting histories or individual tweets may misrepresent illness timing.

  • Method

    The study used participant Twitter data, supervised predictive models, and state-space analysis to distinguish affected and healthy states across depression and PTSD cohorts.

  • Results

    95% agreement was observed for depression and 100% agreement for PTSD between Hidden Markov Model states and the original affected and healthy groups.

  • Takeaways & Limitations

    The findings support incorporating labMT happiness measures into future Twitter-based mental-health measurement and prediction research.

  • Takeaways & Limitations

    The observed depression results may reflect a specific depression type, so predictive screening models may require evaluation across additional diagnostic classes.

Abstract

from arXiv · show

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. 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 (174 users, 243,775 tweets). 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.

Supplementary Information · I. Research protocol

The research protocol received institutional review board approval, obtained informed participant acknowledgment before data collection, and used Qualtrics, Python, and R for study administration and analysis.

  • I. Research protocol: The Harvard University Institutional Review Board approved the study under approval #152529.
  • I. Research protocol: The University of Vermont Institutional Review Board approved the study under approval #CHRMS16135.
  • I. Research protocol: All participants acknowledged the study goals, expectations, and procedures before data collection.
  • I. Research protocol: Participant acknowledgment included information about data privacy.
  • I. Research protocol: Surveys were built using the Qualtrics survey platform.
  • I. Research protocol: Analyses were performed using Python and R.

II. Weekly model output

The weekly model output presents ROC curves and top predictors for Random Forests models in depression and PTSD samples. It also defines the happiness and LIWC predictor labels used in the analysis.

  • Weekly model output: Figure SI 1 shows ROC curves and top predictors for Random Forests using weekly units of observation.The figure covers both depression and PTSD samples.
  • Weekly model output: The depression sample contains N depr =29,328 weekly observations, while the PTSD sample contains N ptsd =12,676.These sample sizes are reported for the weekly-unit analysis.
  • Weekly model output: Predictors ending in “_happy” measure happiness, whereas 36 LIWC predictors capture semantic categories such as food, eating, and profanity.Examples include LIWC_ingest for food and eating words and LIWC_swear for profanity.

III. Random Forests hyperparameter optimization

Random Forest hyperparameters were optimized with stratified fivefold cross-validation using the same schema as Reece and Danforth (12). The routine exhaustively evaluated combinations across five parameter grids.

  • III. Random Forests hyperparameter optimization: Stratified fivefold cross-validation was used to optimize the Random Forest parameters.The optimization schema matched that used in Reece and Danforth (12).
  • III. Random Forests hyperparameter optimization: The exhaustive search varied n_estimators over 120, 300, 500, 800, and 1200.The supplied grid lists n_estimators = [120, 300, 500, 800, 1200].
  • III. Random Forests hyperparameter optimization: The search varied max_depth over 5, 8, 15, 25, 30, and None.The supplied grid lists max_depth = [5, 8, 15, 25, 30, None].
  • III. Random Forests hyperparameter optimization: The search varied min_samples_split over 1, 2, 5, 10, 15, and 100, and min_samples_leaf over 1, 2, 5, and 10.These are the exact candidate values listed for the two minimum-sample parameters.
  • III. Random Forests hyperparameter optimization: The search varied max_features among 'log2', 'sqrt', and None.The supplied grid lists max_features = ['log2', 'sqrt', None].

IV. PTSD word shift

The PTSD word-shift graph compares Twitter happiness contributions for PTSD and healthy participants, showing how word valence and usage differences relate to happiness in the PTSD class.

  • IV. PTSD word shift: Figure SI 2 reports Twitter happiness values of 6.10 for both PTSD and healthy participants.The graph reveals contributions to Twitter happiness observed for PTSD and healthy participants.
  • IV. PTSD word shift: Words on the left decrease happiness in the PTSD class, whereas words on the right increase it.Their placement reflects each word’s contribution relative to the PTSD class’s happiness.
  • IV. PTSD word shift: Up and down arrows indicate whether words were used more or less by the PTSD class, while (+) and (−) mark relatively positive and negative words.Valence is defined relative to the average happiness of all healthy tweets.
Loading 1608.07740v1…