Social media has become a major part of everyday life, particularly for younger generations who have grown up using digital platforms to communicate, connect, and access information. As social media use has increased, concerns about its relationship with mental health have also become more prominent in public discussions. News coverage frequently explores issues such as anxiety, depression, social comparison, and the potential negative effects of social media use. However, social media can also provide opportunities for social connection, emotional support, and community building.
Understanding how these different perspectives are represented in news coverage is important because the amount of attention given to an issue can influence its prominence in public discussions. This study uses MediaCloud to examine U.S. online news coverage connecting social media use to youth mental health, with a particular interest in Generation Z.
Specifically, this research compares the volume of news stories connecting social media to negative mental health outcomes with stories connecting social media to positive mental health experiences. It also examines how coverage of these two perspectives changes throughout the study period.
How does the volume of U.S. online news coverage connecting social media use to negative youth mental health outcomes compare with coverage connecting social media to positive mental health experiences, and how do these patterns change over time?
This study is guided by agenda-setting theory, originally developed by McCombs and Shaw (1972). The theory explains how the amount of attention news media devote to particular issues can influence the importance audiences assign to those issues. Rather than necessarily telling audiences what to think, news media can influence which topics receive public attention.
Agenda-setting theory is relevant to this research because social media and youth mental health have become important topics in discussions about technology, education, and public health. News outlets may emphasize concerns about social media’s negative psychological effects, while giving different levels of attention to its potential benefits, including social support and community building.
By comparing the volume of news stories associated with negative and positive mental health experiences, this study examines the relative prominence of these perspectives within U.S. online news coverage. If one category consistently receives greater coverage, it may suggest that perspective occupies a more prominent position in the news agenda represented by the selected MediaCloud collection.
However, this study measures news coverage rather than audience perceptions or the actual psychological effects of social media. Therefore, the findings can identify differences in media attention but cannot establish whether news coverage influences public opinion or whether social media directly causes particular mental health outcomes.
Social media has become an increasingly prominent topic in discussions about youth mental health. News coverage often highlights concerns about anxiety, depression, social comparison, and other potential negative psychological outcomes associated with social media use. At the same time, research and public discussions have also recognized the potential benefits of social media, including emotional support, social connection, and access to online communities.
Drawing on agenda-setting theory, this study examines whether news coverage connecting social media to negative youth mental health outcomes receives greater attention than coverage connecting social media to positive mental health experiences.
H1: U.S. online news stories connecting social media use to negative youth mental health outcomes will receive a higher average weekly volume of coverage than stories connecting social media use to positive mental health experiences during the study period.
This hypothesis focuses on differences in the amount of news coverage associated with each perspective. It does not predict that social media has more negative than positive effects on young people’s mental health. Instead, it examines which perspective receives greater attention within the selected online news collection.
This study uses MediaCloud, a platform that allows researchers to examine patterns in online news coverage. Using RStudio and the MediaCloud API, the study will collect news story counts associated with two categories: negative youth mental health outcomes and positive mental health experiences connected to social media use.
The analysis will examine U.S. online news coverage during a consistent study period, using weekly observations to compare the two categories. The exact date range will be finalized after verifying the availability of historical data in the selected MediaCloud collection.
The primary categorical variable is mental health coverage category, consisting of two groups:
The primary quantitative variable is weekly news story count, representing the number of stories matching each category’s MediaCloud search query during a given week.
Time, measured by week, will be used to examine changes in coverage volume throughout the study period.
Two Boolean search queries will be developed using shared terminology related to social media, youth, and mental health. Each query will also contain terms specific to either negative or positive mental health experiences.
The MediaCloud API will be used to retrieve daily story counts for both categories. These counts will be aggregated into weekly totals using R and the tidyverse and lubridate packages.
Descriptive statistics will be calculated for each category, including total stories, weekly minimum, maximum, median, mean, and standard deviation. An interactive line graph will be created using plotly to visualize changes in weekly news coverage.
A paired-samples t-test will be conducted to compare the average weekly coverage volume of the two categories. Each week’s negative coverage count will be paired with the positive coverage count from the same week. The analysis will also examine the distribution of the paired differences using descriptive statistics and a Shapiro-Wilk normality test.
Because the analysis relies on keyword searches, the results will represent estimated coverage associated with each perspective rather than a complete measurement of positive or negative framing. Some stories may match both categories, and the search terms may not capture every relevant article. The analysis will identify differences in news coverage but will not establish the actual psychological effects of social media or changes in public opinion.
The following R code defines the two search queries used to identify news coverage related to digital and in-person student engagement strategies.
## Downloading: Negative Mental Health Coverage
## Downloading: Positive Mental Health Coverage
The following table summarizes the volume of U.S. online news coverage connecting social media use with positive and negative youth mental health experiences between January 4 and October 10, 2026. The statistics describe weekly coverage patterns for both categories, including total story matches, average weekly coverage, and variations in coverage volume.
| topic | Total_Stories | Weekly_Minimum | Weekly_Maximum | Weekly_Median | Weekly_Mean | Weekly_SD |
|---|---|---|---|---|---|---|
| Negative Mental Health Coverage | 1683 | 13 | 112 | 33 | 42.08 | 26.56 |
| Positive Mental Health Coverage | 191 | 0 | 18 | 4 | 4.78 | 4.51 |
The following interactive graph displays the weekly number of online news stories matching search terms related to positive and negative youth mental health experiences associated with social media use. By comparing the two categories over time, the graph helps identify differences in coverage volume, changes in media attention, and periods when one category received noticeably greater coverage.
To examine differences in weekly news coverage, a paired-samples t-test was conducted using 40 matched weeks of MediaCloud data. The analysis compared the number of stories matching negative mental health search terms with the number matching positive mental health search terms.
| Descriptive Statistics | ||||||
| Weekly Social Media and Youth Mental Health News Coverage | ||||||
| Coverage Category | Weeks | Mean | Std. Deviation | Median | Min | Max |
|---|---|---|---|---|---|---|
| Negative Mental Health Coverage | 40 | 42.08 | 26.56 | 33 | 13 | 112 |
| Positive Mental Health Coverage | 40 | 4.78 | 4.51 | 4 | 0 | 18 |
| Paired-Samples t-Test Results | ||||||
| Negative vs. Positive Youth Mental Health News Coverage | ||||||
| Comparison | Mean Difference | t Statistic | df | p Value | 95% CI Lower | 95% CI Upper |
|---|---|---|---|---|---|---|
| Negative vs. Positive Coverage | 37.3 | 8.73 | 39 | < .001 | 28.65 | 45.95 |
The analysis identified 1,683 matching news story counts for negative mental health coverage and 191 for positive mental health coverage between January 4 and October 10, 2026. Negative mental health coverage received approximately 8.8 times as many matches as positive coverage within the selected MediaCloud collection.
Across the 40 weeks examined, negative mental health coverage averaged 42.08 matching stories per week, compared with 4.78 for positive coverage. A paired-samples t-test found a statistically significant difference between the two categories, t(39) = 8.73, p < .001. Negative mental health coverage averaged 37.30 more matching stories per week than positive coverage, with a 95% confidence interval ranging from 28.65 to 45.95.
The Shapiro-Wilk normality test indicated that the differences between paired observations were not normally distributed (W = 0.823, p < .001). However, with 40 paired observations, the t-test can be reasonably robust to non-normality. This limitation should still be considered when interpreting the findings, particularly because some weeks experienced unusually high coverage.
These findings support the study’s hypothesis that news coverage connecting social media to negative youth mental health experiences receives greater attention than coverage connecting social media to positive experiences. From an agenda-setting perspective, the results suggest that negative mental health concerns occupy a more prominent position in the news agenda represented by the selected MediaCloud collection.
However, the findings do not establish that social media negatively affects young people’s mental health more frequently than it benefits them. They also do not demonstrate that news coverage directly influences public opinion. The study measures the frequency of stories matching specific search terms rather than the actual effects of social media or audience responses to news coverage.
Additionally, differences in search terminology, potential overlap between the two categories, and the possibility that some matching stories do not primarily focus on youth mental health limit the conclusions that can be drawn. The analysis also covers only a portion of 2026, rather than the longer historical period originally considered for the project.
Overall, the findings provide statistical support for the research hypothesis within the selected dataset and offer a starting point for examining how online news coverage may emphasize negative versus positive connections between social media and youth mental health.
McCombs, M. E., & Shaw, D. L. (1972). The agenda-setting function of mass media. Public Opinion Quarterly, 36(2), 176–187. https://doi.org/10.1086/267990
MediaCloud. (n.d.). MediaCloud. https://www.mediacloud.org/
The following R code was used to retrieve, organize, analyze, and visualize MediaCloud news coverage data concerning social media use and youth mental health. The analysis compares negative and positive mental health coverage using 40 matched weekly observations from January 4 through October 10, 2026.
############################################################
# STEP 1: Install and Load Required Packages
############################################################
required_packages <- c(
"tidyverse",
"httr2",
"lubridate",
"plotly",
"knitr",
"kableExtra",
"gt"
)
for (pkg in required_packages) {
if (!requireNamespace(pkg, quietly = TRUE)) {
install.packages(pkg)
}
}
library(tidyverse)
library(httr2)
library(lubridate)
library(plotly)
library(knitr)
library(kableExtra)
library(gt)
############################################################
# STEP 2: Verify MediaCloud API Key
############################################################
# The actual API key is stored privately in .Renviron.
# It is not included in this published report.
mc_key <- Sys.getenv("MEDIACLOUD_KEY")
if (!nzchar(mc_key)) {
stop(
"No MediaCloud API key was found. ",
"Check the MEDIACLOUD_KEY environment variable."
)
}
############################################################
# STEP 3: Define Search Queries and Date Range
############################################################
negative_query <-
'("social media" AND
(teen* OR adolescen* OR youth OR
"young people" OR "young adults" OR "Gen Z") AND
("mental health" OR "mental well-being") AND
(anxiety OR depression OR distress OR
loneliness OR "body image" OR
"social comparison"))'
positive_query <-
'("social media" AND
(teen* OR adolescen* OR youth OR
"young people" OR "young adults" OR "Gen Z") AND
("mental health" OR "mental well-being") AND
("social support" OR "emotional support" OR
"social connection" OR "online community" OR
"sense of belonging" OR "positive effects"))'
topics <- c(
"Negative Mental Health Coverage" = negative_query,
"Positive Mental Health Coverage" = positive_query
)
start_date <- "2026-01-04"
end_date <- "2026-10-10"
############################################################
# STEP 4: Create MediaCloud Data Retrieval Function
############################################################
mc_counts_over_time <- function(
query,
start_date,
end_date,
collection_id = 34412234
) {
resp <-
request(
"https://search.mediacloud.org/api/search/count-over-time"
) |>
req_headers(
Authorization = paste("Token", mc_key)
) |>
req_url_query(
q = query,
start = start_date,
end = end_date,
platform = "onlinenews-mediacloud",
cs = collection_id
) |>
req_perform()
results <- resp |>
resp_body_json()
map_dfr(
results$count_over_time$counts,
as_tibble
) |>
mutate(
date = as.Date(date)
)
}
############################################################
# STEP 5: Retrieve Daily News Coverage Counts
############################################################
topic_data <-
imap_dfr(
topics,
function(search_string, topic_name) {
message(
"Downloading: ",
topic_name
)
results <-
mc_counts_over_time(
query = search_string,
start_date = start_date,
end_date = end_date
)
Sys.sleep(35)
results |>
mutate(
topic = topic_name
)
}
)
############################################################
# STEP 6: Examine the Downloaded Data
############################################################
head(topic_data)
glimpse(topic_data)
############################################################
# STEP 7: Convert Daily Counts to Weekly Counts
############################################################
weekly_counts <- topic_data |>
mutate(
week = floor_date(date, unit = "week")
) |>
group_by(topic, week) |>
summarise(
stories = sum(count),
.groups = "drop"
)
############################################################
# STEP 8: Calculate Topic Summary Statistics
############################################################
topic_summary <- weekly_counts |>
group_by(topic) |>
summarise(
Total_Stories = sum(stories),
Weekly_Minimum = min(stories),
Weekly_Maximum = max(stories),
Weekly_Median = median(stories),
Weekly_Mean = round(mean(stories), 2),
Weekly_SD = round(sd(stories), 2),
.groups = "drop"
) |>
arrange(desc(Total_Stories))
Table <- topic_summary |>
kbl(
caption = "MediaCloud Topic Summary Statistics",
align = "lrrrrrr"
) |>
kable_styling(
full_width = FALSE,
bootstrap_options = c(
"striped",
"hover",
"condensed"
)
)
Table
############################################################
# STEP 9: Create Weekly News Coverage Graph
############################################################
weekly_counts <- weekly_counts |>
mutate(
stories_formatted = formatC(
stories,
format = "d",
big.mark = ","
)
)
Graph <- plot_ly(
data = weekly_counts,
x = ~week,
y = ~stories,
color = ~topic,
colors = "Set1",
type = "scatter",
mode = "lines+markers",
customdata = ~topic,
text = ~stories_formatted,
hovertemplate = paste(
"<b>%{customdata}</b><br>",
"Week: %{x|%Y-%m-%d}<br>",
"Stories: %{text}<br>",
"<extra></extra>"
)
) |>
layout(
title = "Weekly Social Media and Youth Mental Health News Coverage",
hovermode = "x unified",
xaxis = list(title = "Week"),
yaxis = list(
title = "Weekly Story Count",
separatethousands = TRUE
)
)
Graph
############################################################
# STEP 10: Reshape Data for Paired-Samples Analysis
############################################################
weekly_counts_wide <- weekly_counts |>
mutate(topic = make.names(topic)) |>
select(week, topic, stories) |>
pivot_wider(
names_from = topic,
values_from = stories
)
############################################################
# STEP 11: Prepare Paired Observations
############################################################
mydata <- weekly_counts_wide |>
mutate(
V1 = Positive.Mental.Health.Coverage,
V2 = Negative.Mental.Health.Coverage,
PairDifferences = V2 - V1
)
mydata |>
summarise(
Pairs = n(),
Missing_Positive = sum(is.na(V1)),
Missing_Negative = sum(is.na(V2)),
Mean_Difference = mean(PairDifferences),
SD_Difference = sd(PairDifferences)
)
############################################################
# STEP 12: Shapiro-Wilk Normality Test
############################################################
shapiro_res <- shapiro.test(
mydata$PairDifferences
)
shapiro_res
############################################################
# STEP 13: Paired-Samples t-Test
############################################################
t_res <- t.test(
mydata$V2,
mydata$V1,
paired = TRUE
)
t_res
############################################################
# STEP 14: Prepare Data for Interactive Box Plot
############################################################
df_long <- mydata |>
select(week, V1, V2) |>
pivot_longer(
cols = c(V1, V2),
names_to = "Measure",
values_to = "Value"
) |>
mutate(
Measure = recode(
Measure,
"V1" = "Positive Mental Health Coverage",
"V2" = "Negative Mental Health Coverage"
)
)
group_means <- df_long |>
group_by(Measure) |>
summarise(
mean_value = mean(Value),
.groups = "drop"
)
############################################################
# STEP 15: Create Interactive Box Plot
############################################################
boxplot_measures <- plot_ly() |>
add_trace(
data = df_long,
x = ~Measure,
y = ~Value,
type = "box",
boxpoints = "outliers",
marker = list(color = "red", size = 4),
line = list(color = "black"),
fillcolor = "royalblue",
name = ""
) |>
add_trace(
data = group_means,
x = ~Measure,
y = ~mean_value,
type = "scatter",
mode = "markers",
marker = list(
symbol = "diamond",
size = 9,
color = "black",
line = list(
color = "white",
width = 1
)
),
text = ~paste0(
"Mean = ",
round(mean_value, 2)
),
hoverinfo = "text",
name = "Group Mean"
) |>
layout(
title = "Weekly Mental Health News Coverage",
xaxis = list(title = "Coverage Category"),
yaxis = list(title = "Weekly Story Count"),
showlegend = FALSE
)
boxplot_measures
############################################################
# STEP 16: Create Descriptive Statistics Table
############################################################
descriptive_stats <- df_long |>
group_by(Measure) |>
summarise(
Weeks = n(),
Mean = round(mean(Value), 2),
SD = round(sd(Value), 2),
Median = median(Value),
Minimum = min(Value),
Maximum = max(Value),
.groups = "drop"
)
descriptive_table <- descriptive_stats |>
gt() |>
tab_header(
title = "Descriptive Statistics",
subtitle = paste(
"Weekly Social Media and Youth Mental",
"Health News Coverage"
)
) |>
cols_label(
Measure = "Coverage Category",
Weeks = "Weeks",
Mean = "Mean",
SD = "Std. Deviation",
Median = "Median",
Minimum = "Min",
Maximum = "Max"
)
descriptive_table
############################################################
# STEP 17: Create Paired-Samples t-Test Results Table
############################################################
t_test_summary <- tibble(
Comparison = "Negative vs. Positive Coverage",
`Mean Difference` = round(
unname(t_res$estimate),
2
),
`t Statistic` = round(
unname(t_res$statistic),
2
),
df = unname(t_res$parameter),
`p Value` = "< .001",
`95% CI Lower` = round(t_res$conf.int[1], 2),
`95% CI Upper` = round(t_res$conf.int[2], 2)
)
t_test_table <- t_test_summary |>
gt() |>
tab_header(
title = "Paired-Samples t-Test Results",
subtitle = paste(
"Negative vs. Positive Youth",
"Mental Health News Coverage"
)
)
t_test_table