library(foreign)
library(ltm)
## Loading required package: MASS
## Loading required package: msm
## Loading required package: polycor
setwd("/Users/hannapfleiderer/Library/Mobile Documents/com~apple~CloudDocs/Master MCI/1. Semester/Quantitative Research/R/1. Task")
df = read.spss("ESS11.sav", to.data.frame = T)
#names(df)
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE)
Introduction
Depression is a prevalent mental health condition that significantly
affects individuals’ quality of life and has substantial public health
implications. As one of the leading causes of disability adjusted life
years (DALYs) worldwide, understanding the key determinants of
depression is crucial for developing effective interventions (Balsamo
& Carlucci, 2020).
This study examines how gender, diet (vegetable consumption),
socializing, and education influence depression.
Dependent Variable: Depression
To assess depressive symptoms, this study utilized a Depression Score,
which was calculated based on participants’ self-reported experiences
over the past week. The score captured various aspects of emotional
well-being and psychological distress by measuring both negative and
positive mental states. Responses were recorded on a standardized
numerical scale, ensuring comparability across participants.
To maintain consistency in interpretation, items reflecting positive
emotions were reverse scored so that higher values consistently
indicated worse mental health. The final Depression Score was computed
by averaging the responses across all included items, providing a
reliable measure of depressive symptomatology.
The score was derived from the following eight indicators:
- Felt depressed (fltdpr) – Frequency of experiencing depressive
feelings.
- Everything was an effort (flteeff) – Perceived difficulty in
completing daily tasks.
- Sleep was restless (slprl) – Occurrence of disrupted or restless
sleep.
- Were happy (wrhpp) – Frequency of feeling happy (reverse
scored).
- Felt lonely (fltlnl) – Extent of experienced loneliness.
- Enjoyed life (enjlf) – Degree of life enjoyment (reverse
scored).
- Felt sad (fltsd) – Frequency of experiencing sadness.
- Could not get going (cldgng) – Difficulty initiating or maintaining
activities.
# convert to numbers 1-5
df$d20 = as.numeric(df$fltdpr)
df$d21 = as.numeric(df$flteeff)
df$d22 = as.numeric(df$slprl)
df$d23 = as.numeric(df$wrhpp)
df$d24 = as.numeric(df$fltlnl)
df$d25 = as.numeric(df$enjlf)
df$d26 = as.numeric(df$fltsd)
df$d27 = as.numeric(df$cldgng)
# Reverse scales of D23 and D25 (differently poled than the others)
# Note: Alternatively we could reverse the others. This would, however,
# result in a reversely defined sumscore with high sums indicating LOW tolerance.
# We prefer positively defined scales with high sums indicating HIGH tolerance.
df$d23 = 5 - df$d23
df$d25 = 5 - df$d25
# Calculate Cronbach's alpha to check internal consistency ("reliability") of tolerance items
cronbach.alpha(df[,c("d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27")], na.rm=T)
##
## Cronbach's alpha for the 'df[, c("d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27")]' data-set
##
## Items: 8
## Sample units: 40156
## alpha: 0.823
df$depression = rowSums(df[,c("d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27")]) / 8
The internal consistency of the depression scale, comprising eight items (d20 to d27), was assessed using Cronbach’s alpha. The analysis produced an alpha coefficient of 0.823 based on responses from 40,156 participants, indicating good internal reliability. This suggests that the items consistently measure the same underlying construct and support the use of a composite depression score in subsequent analyses.
# Hypotheses 1: Female Italiens have a higher risk of suffering from depression than males
by(df$depression, df$gndr, mean, na.rm=T)
## df$gndr: Male
## [1] 1.628996
## ------------------------------------------------------------
## df$gndr: Female
## [1] 1.752677
The analysis confirms that women report higher mean depression scores (1.75) compared to men (1.63), supporting the hypothesis that gender differences exist in depressive symptoms. This finding aligns with previous research indicating that women tend to experience higher levels of depression due to a combination of biological, psychological, and social factors. The results were derived from descriptive statistics, which demonstrated a consistent pattern across the dataset.
# Hypotheses 2: Italians with higher education have a higher risk of suffering from depression
##
## Not possible to harmonise into ES-ISCED
## 0
## ES-ISCED I , less than lower secondary
## 2946
## ES-ISCED II, lower secondary
## 6248
## ES-ISCED IIIb, lower tier upper secondary
## 6520
## ES-ISCED IIIa, upper tier upper secondary
## 8979
## ES-ISCED IV, advanced vocational, sub-degree
## 4460
## ES-ISCED V1, lower tertiary education, BA level
## 5243
## ES-ISCED V2, higher tertiary education, >= MA level
## 5493
## Other
## 129
##
## low medium high
## Not possible to harmonise into ES-ISCED 0 0 0
## ES-ISCED I , less than lower secondary 2946 0 0
## ES-ISCED II, lower secondary 6248 0 0
## ES-ISCED IIIb, lower tier upper secondary 0 6520 0
## ES-ISCED IIIa, upper tier upper secondary 0 8979 0
## ES-ISCED IV, advanced vocational, sub-degree 0 0 4460
## ES-ISCED V1, lower tertiary education, BA level 0 0 5243
## ES-ISCED V2, higher tertiary education, >= MA level 0 0 5493
## Other 0 0 0
## df$edu: low
## [1] 1.836592
## ------------------------------------------------------------
## df$edu: medium
## [1] 1.695308
## ------------------------------------------------------------
## df$edu: high
## [1] 1.609186
## Df Sum Sq Mean Sq F value Pr(>F)
## edu 2 290 144.97 599.3 <2e-16 ***
## Residuals 39123 9463 0.24
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1030 observations deleted due to missingness
A strong inverse relationship between education level and depression was observed. Individuals with a “high” level of education reported the lowest mean depression score (1.59), followed by those with a “medium” level (1.67), while those in the “low” education category had the highest depression scores (1.92). The ANOVA test confirmed the significance of these differences (F = 116.5, p < 0.001). This result suggests that higher education levels may be associated with better coping mechanisms, greater economic stability, and increased access to mental health resources, all of which contribute to lower depression scores.
# Hypotheses 3: Italians eating many vegetables have a lower risk of suffering from depression (–> Mediterranean Diet)
by(df$depression, df$edu, mean, na.rm=T)
## df$edu: low
## [1] 1.836592
## ------------------------------------------------------------
## df$edu: medium
## [1] 1.695308
## ------------------------------------------------------------
## df$edu: high
## [1] 1.609186
anova_model=aov(depression ~ edu, data = df)
summary(anova_model)
## Df Sum Sq Mean Sq F value Pr(>F)
## edu 2 290 144.97 599.3 <2e-16 ***
## Residuals 39123 9463 0.24
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1030 observations deleted due to missingness
#table(df$eatveg)
# Anova:
by(df$depression, df$eatveg, mean, na.rm=T)
## df$eatveg: Three times or more a day
## [1] 1.659263
## ------------------------------------------------------------
## df$eatveg: Twice a day
## [1] 1.655042
## ------------------------------------------------------------
## df$eatveg: Once a day
## [1] 1.664302
## ------------------------------------------------------------
## df$eatveg: Less than once a day but at least 4 times a week
## [1] 1.740139
## ------------------------------------------------------------
## df$eatveg: Less than 4 times a week but at least once a week
## [1] 1.80464
## ------------------------------------------------------------
## df$eatveg: Less than once a week
## [1] 1.898962
## ------------------------------------------------------------
## df$eatveg: Never
## [1] 1.926297
anova_model=aov(depression ~ eatveg, data = df)
summary(anova_model)
## Df Sum Sq Mean Sq F value Pr(>F)
## eatveg 6 135 22.514 91.51 <2e-16 ***
## Residuals 39273 9662 0.246
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 876 observations deleted due to missingness
The results indicate a significant relationship between vegetable consumption frequency and depression levels. Individuals who consumed vegetables three times or more per day exhibited the lowest mean depression score (1.67), whereas those who never consumed vegetables reported the highest mean score (2.19). The ANOVA test confirmed this effect (F = 13.52, p < 0.001), indicating that diet plays a role in mental well-being. The trend suggests that a higher intake of vegetables may be associated with better mental health, potentially due to the nutritional benefits of a diet rich in vitamins and antioxidants.
# Hypotheses 4: Italians who meet up with often socially meet with friends, relatives or colleagues
#Descriptive Analysis:
df$sclmeet <- as.numeric(df$sclmeet)
by(df$depression, df$sclmeet, mean, na.rm=T)
## df$sclmeet: 1
## [1] 2.205726
## ------------------------------------------------------------
## df$sclmeet: 2
## [1] 1.959857
## ------------------------------------------------------------
## df$sclmeet: 3
## [1] 1.776112
## ------------------------------------------------------------
## df$sclmeet: 4
## [1] 1.685611
## ------------------------------------------------------------
## df$sclmeet: 5
## [1] 1.666926
## ------------------------------------------------------------
## df$sclmeet: 6
## [1] 1.612704
## ------------------------------------------------------------
## df$sclmeet: 7
## [1] 1.607457
table(df$sclmeet)
##
## 1 2 3 4 5 6 7
## 790 3589 3844 8423 7042 11063 5330
The analysis suggests a general trend where higher socializing frequency is associated with lower depression levels. Individuals who met with others daily (socializing frequency = 7) reported the lowest mean depression score (1.60), whereas those who socialized the least (socializing frequency = 1) had the highest mean depression score (2.47). While the trend supports the hypothesis, some variations were observed across intermediate levels of social interaction. These findings reinforce the well-documented protective effects of social engagement on mental health.
# Regression model to predict the dependent variable (depression) based on the four independent variables of #education, eating vegetables, gender and socially meeting:
lm(depression ~ eisced + eatveg + gndr + sclmeet, data=df)
##
## Call:
## lm(formula = depression ~ eisced + eatveg + gndr + sclmeet, data = df)
##
## Coefficients:
## (Intercept)
## 2.120224
## eiscedES-ISCED II, lower secondary
## -0.148474
## eiscedES-ISCED IIIb, lower tier upper secondary
## -0.233021
## eiscedES-ISCED IIIa, upper tier upper secondary
## -0.227779
## eiscedES-ISCED IV, advanced vocational, sub-degree
## -0.281673
## eiscedES-ISCED V1, lower tertiary education, BA level
## -0.270805
## eiscedES-ISCED V2, higher tertiary education, >= MA level
## -0.322828
## eiscedOther
## -0.214821
## eatvegTwice a day
## -0.004117
## eatvegOnce a day
## -0.005761
## eatvegLess than once a day but at least 4 times a week
## 0.062690
## eatvegLess than 4 times a week but at least once a week
## 0.110088
## eatvegLess than once a week
## 0.188931
## eatvegNever
## 0.222650
## gndrFemale
## 0.124692
## sclmeet
## -0.060585
This linear regression model shows that higher educational attainment, more frequent vegetable consumption, and increased social interaction are all associated with lower levels of reported depression. In contrast, being female is linked to slightly higher depression scores. The most substantial reductions in depression are observed among those with postgraduate education and those who socialize more frequently, while individuals who rarely or never eat vegetables report higher depression levels.
Discussion
The findings confirm the impact of gender, diet, socializing, and
education on depression, aligning with previous research. Women reported
higher depression scores than men, highlighting the need for
gender-sensitive mental health policies. Frequent vegetable consumption
was associated with lower depression levels, supporting the role of
nutrition in mental well-being, though further research is needed to
explore underlying mechanisms. Socializing emerged as a protective
factor, with more frequent interactions generally linked to lower
depression scores. However, variations suggest that the quality of
interactions is crucial. Education also played a significant role, with
higher levels associated with lower depression scores, likely due to
increased resilience, access to resources, and economic stability.
Despite these insights, the study has limitations, including its
cross-sectional nature, which prevents causal conclusions. Future
research should explore longitudinal effects and consider additional
factors such as socioeconomic status and lifestyle habits to provide a
more comprehensive understanding of depression risk factors.
Conclusion
This study highlights the significant influence of gender, diet,
socializing, and education on depression. Women exhibited higher
depression levels, frequent social interactions and vegetable
consumption were linked to lower depression scores, and higher education
levels served as a protective factor. These findings emphasize the need
for targeted mental health interventions that address these
determinants. Policies promoting mental health education, healthy eating
habits, and social engagement could help reduce depression risk and
improve overall well-being. Future research should further investigate
these relationships to develop more effective prevention strategies.
Reference
Balsamo, M., & Carlucci, L. (2020). Italians on the age of COVID-19:
The self-reported depressive symptoms through web-based survey.
Frontiers in Psychology, 11, 569276. https://doi.org/10.3389/FPSYG.2020.569276