The objective of this applied project is to explore whether video game habits relate to psychological wellbeing using some basic descriptive analysis. This analysis can be used by researchers, game developers, and mental health advocates when thinking about how gaming intersects with anxiety and life satisfaction.
Survey data from video game players combining self-reported gaming
habits (hours played per week, platform, game, playstyle) with three
validated psychological scales - GAD-7 (GAD_T, anxiety),
SWL (SWL_T, satisfaction with life), and SPIN
(SPIN_T, social phobia) - along with demographics (age,
gender, work status) for over 13,000 respondents.
# GamingStudy_data.csv must be saved in the same folder as this .Rmd file
data <- read.csv("GamingStudy_data.csv", fileEncoding = "ISO-8859-1", check.names = FALSE)
data <- data[data$accept == "Accept", ] # keep only consenting respondents
summary(data[c("GAD_T", "SWL_T", "SPIN_T", "Hours", "Age")])
## GAD_T SWL_T SPIN_T Hours
## Min. : 0.000 Min. : 5.0 Min. : 0.00 Min. : 0.00
## 1st Qu.: 2.000 1st Qu.:14.0 1st Qu.: 9.00 1st Qu.: 12.00
## Median : 4.000 Median :20.0 Median :17.00 Median : 20.00
## Mean : 5.214 Mean :19.8 Mean :19.86 Mean : 22.26
## 3rd Qu.: 8.000 3rd Qu.:26.0 3rd Qu.:28.00 3rd Qu.: 28.00
## Max. :21.000 Max. :35.0 Max. :68.00 Max. :8000.00
## NAs :414 NAs :414 NAs :1032 NAs :441
## Age
## Min. :18.00
## 1st Qu.:18.00
## Median :20.00
## Mean :20.92
## 3rd Qu.:22.00
## Max. :63.00
## NAs :414
library(ggplot2)
# Simple histogram
hist(data$GAD_T,
main = "Histogram of GAD_T",
xlab = "Anxiety score (GAD_T, 0-21)")
# Anxiety score distribution by gender
ggplot(subset(data, Gender %in% c("Male", "Female")), aes(x = GAD_T, fill = Gender)) +
geom_histogram(bins = 22, col = "darkred") +
scale_fill_manual(values = c("darkorange", "darkgray")) +
ggtitle("Frequency of Anxiety Score - Male vs. Female")
summary(data$GAD_T)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NAs
## 0.000 2.000 4.000 5.214 8.000 21.000 414
data[which.min(data$GAD_T), c("GAD_T", "Gender", "Age", "Game")] # lowest score
## GAD_T Gender Age Game
## 4 0 Male 28 Other
data[which.max(data$GAD_T), c("GAD_T", "Gender", "Age", "Game")] # highest score
## GAD_T Gender Age Game
## 79 21 Male 21 League of Legends
Anxiety scores range from 0 to 21, the full possible range of the GAD-7 scale, showing the sample includes respondents at both ends of the anxiety spectrum.