title: “Comparative Analysis of VR Therapy and CBT for Depression Treatment” author: “[Ailis O’Connor, Riccardo Cecarelli]” date: “05/01/2024” output: html_document

Table of Contents

  1. Abstract
  2. Introduction
  3. Method
  4. Results
  5. Discussion
  6. References

Abstract

Aim and Rationale

  • This study evaluates the effectiveness of Virtual Reality (VR) therapy compared to traditional Cognitive Behavioural Therapy (CBT) in reducing depression symptoms.

Participants and Setting

  • A total of 200 participants aged 18–40 were randomly assigned to either a control group receiving traditional CBT or an experimental group receiving VR therapy.

Experiment Design

  • Depression levels were measured using the Zung Self-Rating Depression Scale (SDS) at the start and end of a 12-week treatment period.

Results Gathering

  • Statistical analyses, including independent and paired t-tests, were conducted to compare changes in depression scores between the two groups.

Findings/Implications

  • The findings suggest that VR therapy demonstrated a greater reduction in symptoms, highlighting the evolving role of immersive technologies in mental health interventions.

Introduction

Topic and Context

  • Depression is one of the most prevalent mental health disorders worldwide. Traditional treatment approaches, such as Cognitive Behavioural Therapy (CBT), have demonstrated efficacy in managing depressive symptoms.

Theoretical Framework

  • Advancements in technology have opened new avenues for therapy delivery, including Virtual Reality (VR)-based interventions.

Rationale

  • VR therapy provides interactive, simulated environments that can be tailored to the patients needs. These environments enable exposure therapy, stress management, and mood enhancement in ways that traditional methods cannot replicate.

Hypothesis

  • The hypothesis is that VR therapy will lead to a significantly greater reduction in depression scores compared to CBT.

Method

Participants

  • 200 participants, 95 males and 105 females, aged between 18 and 40 years; two groups (100 participants each), traditional CBT and Experimental VR-based therapy.

Design

  • Randondomized controlled design, depression in clinic patients; Zung Self-Rating Depression Scale (SDS) at the start and end of a 12-week treatment period.

Materials

  • Zung SDS, A 20-item questionnaire measuring depression severity, 4-point Likert scale (1 Low 4 High) with scores from 20 to 80; VR Equipment, custom immersive environments with therapeutic interventions; CBT Sessions, defined protocol.

Procedure

  • 12 weekly therapy sessions, each lasting 50 minutes. VR: VR application designed to simulate therapeutic environments; CBT: cognitive restructuring and behavioral activation techniques. Zung SDS performed at the beginning and the end of the 12-week period.

Results

Descriptive Statistics

  • For the control group (CBT), the average pre-treatment score was 60.0 (SD = 7.11), which decreased to an average post-treatment score of 50.0. Similarly, the experimental group (VR) showed an average pre-treatment score of 55.0 (SD = 7.11), decreasing to 45.0 post-treatment.

Inferential Statistics

  • To determine the significance of observed changes in post treatment scores. T-tests, both independent on post-treatment scores and paired on pre/post scores. Confidence intervals to further confirm the reliability of the observed results.

Statistical Tests

  • Also, various plots were utilized to properly visualize the behavior of the two groups:

  • Box Plots, Bar Charts, Line Graphs, Scatterplots, Confidence Intervals.

Magnitude and Direction of Results

  • While both groups showcased improvement, VR patients showed a slightly greater improvement. In particular, looking at the graph and plots, the reduced spread of the post-treatment scores in the experimental patients also suggests a more consistent improvement pattern in the patients undergoing the VR treatment.

Discussion

Findings and Relation to the Hypothesis

  • Interpret findings and discuss whether they support or refute the hypothesis.

Limitations

  • Discuss any limitations, confounding variables, or methodological constraints.

References

  1. Diez, D. M., Barr, C. D., & Çetinkaya-Rundel, M. (2015). OpenIntro Statistics (3rd Edition). Available at: https://www.openintro.org/book/os/.
  2. Grolemund, G., & Wickham, H. (2017). R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. Available at: https://r4ds.had.co.nz/.
  3. Wickham, H. (2016). ggplot2: Elegant Graphics for Data Analysis. Available at: https://ggplot2-book.org/.
  4. Equitable Equations (2023) Learn R in 39 minutes. Available at: https://youtu.be/yZ0bV2Afkjc?si=tq8SnzY0w-2tXR6A
  5. Matt Birch (2023) GitHub without the fancy command line stuff: Connecting GitHub and R Studio with GitHub Desktop. Available at: https://youtu.be/GeUzVSJ4glY?si=jZ_26u8l9058HF1A

Appendix: Full R Code

NOTE: the data .csv was named “participants_data_final_1_.csv”, instead of the downloadable “participants_data_final.csv”. If the latter is used the code will not run properly

NOTE 2: please run the code by manually selecting from line 159 to 320. We tried to set up a chunk but it was breaking knitting

Check for need to clean data

Check the structure of the dataset

str(participants_data_final_1_)

Get summary statistics

summary(participants_data_final_1_)

Count missing values in each column

colSums(is.na(participants_data_final_1_));

Remove duplicate rows

participants_data_final_1_ <- participants_data_final_1_[!duplicated(participants_data_final_1_), ];

Convert Group and Gender to factors to check data types

participants_data_final_1_\(Group <- as.factor(participants_data_final_1_\)Group) participants_data_final_1_\(Gender <- as.factor(participants_data_final_1_\)Gender)

Exploratory Data Analysis (EDA)

If first run, be sure to uncomment these three install, as the packages are required for data manipulation and visualization

install.packages(“dplyr”)

install.packages(“ggplot2”)

install.packages(“tidyr”)

library(dplyr) library(ggplot2) library(tidyr)

Split the two groups into Control and Experimental

control_group <- participants_data_final_1_ %>% filter(Group == “Control (CBT)”) experimental_group <- participants_data_final_1_ %>% filter(Group == “Experimental (VR)”)

Summary statistics for control group

summary(control_group)

Summary statistics for experimental group

summary(experimental_group)

Calculate mean, median, and standard deviation for Pre- and Post-Treatment scores by group

control_stats <- control_group %>% summarise( Mean_Pre = mean(Pre_Treatment_Score, na.rm = TRUE), Median_Pre = median(Pre_Treatment_Score, na.rm = TRUE), SD_Pre = sd(Pre_Treatment_Score, na.rm = TRUE), Mean_Post = mean(Post_Treatment_Score, na.rm = TRUE), Median_Post = median(Post_Treatment_Score, na.rm = TRUE), SD_Post = sd(Post_Treatment_Score, na.rm = TRUE) )

experimental_stats <- experimental_group %>% summarise( Mean_Pre = mean(Pre_Treatment_Score, na.rm = TRUE), Median_Pre = median(Pre_Treatment_Score, na.rm = TRUE), SD_Pre = sd(Pre_Treatment_Score, na.rm = TRUE), Mean_Post = mean(Post_Treatment_Score, na.rm = TRUE), Median_Post = median(Post_Treatment_Score, na.rm = TRUE), SD_Post = sd(Post_Treatment_Score, na.rm = TRUE) )

Combine the statistics into one table for better presentation

group_stats <- bind_rows( control_stats %>% mutate(Group = “Control (CBT)”), experimental_stats %>% mutate(Group = “Experimental (VR)”) )

print(control_stats) print(experimental_stats) print(group_stats)

DATA VISUALIZATION

Boxplots

Boxplot for Pre-treatment scores

ggplot(participants_data_final_1_, aes(x = Group, y = Pre_Treatment_Score)) + geom_boxplot() + labs(title = “Pre-treatment Scores by Group”, x = “Group”, y = “Pre-treatment Score”)

Boxplot for Post-treatment scores

ggplot(participants_data_final_1_, aes(x = Group, y = Post_Treatment_Score)) + geom_boxplot() + labs(title = “Post-treatment Scores by Group”, x = “Group”, y = “Post-treatment Score”)

Bar Charts

Data Manipulation for plotting

average_scores <- participants_data_final_1_ %>% pivot_longer(cols = c(Pre_Treatment_Score, Post_Treatment_Score), names_to = “Treatment_Phase”, values_to = “Score”) %>% group_by(Group, Treatment_Phase) %>% summarise(Average_Score = mean(Score, na.rm = TRUE))

Chart Creation

ggplot(average_scores, aes(x = Treatment_Phase, y = Average_Score, fill = Group)) + geom_bar(stat = “identity”, position = “dodge”) + labs(title = “Average Scores by Group and Treatment Phase”, x = “Treatment Phase”, y = “Average Score”) + theme_minimal()

Line graphs

Create a line graph showing Pre- and Post-Treatment scores for each group

ggplot(average_scores, aes(x = Treatment_Phase, y = Average_Score, group = Group, color = Group)) + geom_line(size = 1.2) + geom_point(size = 3) + labs(title = “Average Scores by Group Over Treatment Phases”, x = “Treatment Phase”, y = “Average Score”) + theme_minimal()

Scatter plots

Create scatter plots to explore relationships between Pre- and Post-Treatment scores

ggplot(participants_data_final_1_, aes(x = Pre_Treatment_Score, y = Post_Treatment_Score, color = Group)) + geom_point(size = 3, alpha = 0.7) + labs(title = “Scatter Plot of Pre- vs Post-Treatment Scores”, x = “Pre-Treatment Score”, y = “Post-Treatment Score”) + theme_minimal()

Confidence Interval

Create Confidence Interval (CI) plots for Pre- and Post-Treatment scores

ci_data <- participants_data_final_1_ %>% pivot_longer(cols = c(Pre_Treatment_Score, Post_Treatment_Score), names_to = “Treatment_Phase”, values_to = “Score”) %>% group_by(Group, Treatment_Phase) %>% summarise( Mean_Score = mean(Score, na.rm = TRUE), SD_Score = sd(Score, na.rm = TRUE), n = n(), CI_Lower = Mean_Score - qt(0.975, df = n - 1) * SD_Score / sqrt(n), CI_Upper = Mean_Score + qt(0.975, df = n - 1) * SD_Score / sqrt(n) )

ggplot(ci_data, aes(x = Treatment_Phase, y = Mean_Score, group = Group, color = Group)) + geom_line(size = 1.2) + geom_point(size = 3) + geom_errorbar(aes(ymin = CI_Lower, ymax = CI_Upper), width = 0.2) + labs(title = “Confidence Intervals for Scores by Group”, x = “Treatment Phase”, y = “Mean Score with 95% CI”) + theme_minimal()

Summary tables

Create summary tables for Pre- and Post-Treatment Scores

summary_table <- participants_data_final_1_ %>% group_by(Group) %>% summarise( Mean_Pre = mean(Pre_Treatment_Score, na.rm = TRUE), SD_Pre = sd(Pre_Treatment_Score, na.rm = TRUE), Mean_Post = mean(Post_Treatment_Score, na.rm = TRUE), SD_Post = sd(Post_Treatment_Score, na.rm = TRUE) ) summary_table

Inferential statistic testing (t-test), to perform on the post-treatment scores

Extract numeric vectors for Post-Treatment scores from each group

control_scores <- control_group\(Post_Treatment_Score experimental_scores <- experimental_group\)Post_Treatment_Score

Perform the t-test on Post-Treatment scores

t_test_result <- t.test(control_scores, experimental_scores, alternative = “two.sided”, var.equal = TRUE) # Assuming equal variances; set to FALSE if not