411 REFERENCE · Wikibooks
Social Science Research/Stigma Against Mental Illness on Social Networks
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Social Science Research Stigma Against Mental Illness on Social Networks Illnesses, Addictions, and Care for the Homeless Causes of Depression
On Zenodo, at the following link: https://zenodo.org/records/11202766, you can find the "Mental Health in Social Networks with Machine Learning Algorithms" project, which contains two Excel datasets focused on analyzing mental health in social networks, specifically Instagram comments related to celebrity statements. The first dataset (DatasetMH.xlsx) is labeled by polarity (positive, negative, neutral) and stigma (Yes, No), while the second (DatasetMH_Emotions.xlsx) is classified according to six emotions (love/admiration, gratitude, understanding/empathy/identification, sadness, anger/contempt/derision, neutral). Comment collection and labeling were carried out by experts at the University of Valladolid, through a process that included a pilot phase, independent labeling, and review to resolve discrepancies. The goal was to create machine learning models to assess emotional responses in social networks.
NOEMI, M., Alba, A., & Clara, G.-S. (2024). Mental Health in Social Networks with Machine Learning Algorithms [Dataset]. Zenodo. https://doi.org/10.5281/zenodo.11202766
I merge the two datasets in R with the following code:
df <- merge(DatasetMH[,c(1,3,4)],DatasetMH_Emotions[,c(1,3)], by="Text", all.x = TRUE)
df <- df[-which(duplicated(df)),]
Stigma Frequency
It is possible to calculate the frequencies of the stigma variable, so in the sample, 558 messages with stigma are found out of 2,277, and the percentage is 24.51%.
library(dplyr)
n=nrow(df)
df %>%
group_by(Stigma) %>%
summarise(total_messages=n(), percentage=paste(round(total_messages*100/n,2),"%",sep = ""))
Stigma total_messages percentage
1 NO 1719 75.49%
2 YES 558 24.51%
It is possible to calculate the inference of the percentage, since the sample consists of independent messages, with n*p=1719>10 and n*(1-p)=558>10. Therefore, we are 95% confident that the true percentage of posts with stigma towards mental illness on Instagram lies within the confidence interval [22.74%, 26.27%]
library(statsr)
inference(y = Stigma, data = df,
statistic = "proportion", type = "ci",
method = "theoretical", success = "Yes",
conf_level = 0.95)
Single categorical variable, success: Yes
n = 2277, p-hat = 0.2451
95% CI: (0.2274, 0.2627)
Polarity and emotion frequency
Similarly, for the polarity and emotion variables in the sample, we have:
Polarity totale_messages percentage
1 Undetermined 173 7.6%
2 Negative 580 25.47%
3 Positive 1524 66.93%
Emotions total_messages percentage
1 Love/Admiration 640 28.11%
2 Understanding/Empathy/Identification 658 28.9%
3 Gratitude 226 9.93%
4 Undetermined 173 7.6%
5 Anger/Contempt/Mockery 462 20.29%
6 Sadness/Pain 118 5.18%
Dependence between the stigma and polarity variables
The chi-square test highlights the dependence between the variables in question:
inference(y = Stigma, x=Polarità, data = df,
statistic = "proportion", type = "ht",
method = "theoretical", alternative = "greater",
conf_level = 0.95)
Response variable: categorical (2 levels)
Explanatory variable: categorical (3 levels)
Observed:
y
x NO Yes
Undetermined 164 9
Negative 31 549
Positive 1524 0
Expected:
y
x NO Yes
Undetermined 130.6047 42.39526
Negative 437.8656 142.13439
Positive 1150.5296 373.47036
H0: Polarity and Stigma are independent
HA: Polarity and Stigma are dependent
chi_sq = 2072.2766, df = 2, p_value = 0
Since p-value < 0.05, we reject the null hypothesis H0 that Polarity and Stigma are dependent.
It can be verified that there is also a dependent relationship between Stigma and Emotions and between Emotions and Polarity.