Longitudinal Visualisation of DASS21 Subscale Scores Across a Simulated Cohort
Author
Julian Chung
1 Introduction
The Depression Anxiety Stress Scales (DASS21) is a self-report instrument designed to measure the emotional states of depression, anxiety, and stress. The short-form DASS21 contains 21 items divided evenly across the three subscales. Each item is scored from 0 to 3, and subscale totals are multiplied by 2 to align with the original DASS42 severity classification thresholds. This chart tracks individual subscale scores across five timepoints (baseline, 3, 6, 9, and 12 months) using simulated intervention and control data.
2 Simulation
The dataset was generated in Python: 20 participants per group, scored across five timepoints.
3 Data Preparation
The subscale scores are first multiplied by 2 to align with DASS42 scoring conventions. The dataset is then reshaped into long format to enable visualisation of changes across timepoints and subscales.
Show code
suppressPackageStartupMessages(library(tidyverse))# Load datadata <-read.csv(here::here("data", "simulated_dass21_full.csv"))# Multiply subscale scores by 2 to match DASS42 scoring conventionsscored_data <- data %>%mutate(across(c(DASS_Anxiety, DASS_Depression, DASS_Stress), ~ .x *2))# Reshape to long formatdass_long <- scored_data %>%pivot_longer(cols =c(DASS_Anxiety, DASS_Depression, DASS_Stress),names_to ="subscale",values_to ="score") %>%mutate(timepoint =factor(timepoint, levels =c("baseline", "3_months", "6_months", "9_months", "12_months")))
4 Severity Classification
The DASS21 measures three subscales: Depression, Anxiety, and Stress. After summing item responses and multiplying scores by 2, each subscale can be categorised into severity bands based on validated thresholds.
This chart shows how individual participants’ subscale scores can be tracked across severity bands over time. By visualising Depression, Anxiety, and Stress trajectories separately, it becomes possible to assess how a treatment impacts specific psychological domains and detect patterns that might be masked in a total DASS21 score.
Faceting by participant ID gives a quick way to scan across a cohort and see who is improving, stable, or worsening, and in which domain specifically. This is more informative than reporting a single total score, since deterioration in one subscale can be masked when scores are aggregated.
This project was derived from work on a real clinical trial dataset, modified here with synthetic data for demonstration. It showcases the workflow in Python, R, Quarto, and ggplot2 for longitudinal visualisation.