knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE)
library(foreign)
library(ltm)

library(kableExtra)
df = read.spss("/Users/User/Downloads/ESS11.sav", to.data.frame = T)

Introduction

This study examines depression among Slovenian participants using data from the 11th round of the European Social Survey (ESS). Depression significantly impacts overall health and well-being, making it a crucial subject of analysis. We explore five independent variables—age, gender, childhood financial difficulties, social support and fruit consumption—due to their established relevance in mental health research. Using R software, we analyze these relationships through the following hypotheses: H1: Younger individuals tend to report higher levels of depression than older individuals; H2: Women are more likely to report higher depression than men; H3: Slovenians who experienced financial difficulties in their childhood are more likely to have higher depression scores; H4: Slovenians who have more people to share intimate and personal matters with, have lower rates of depression; H5: More frequent fruit consumption is associated with lower levels of depression for Slovenians. This study contributes to understanding how these social determinants influence depression levels in Slovenia based on Center of Epidemiological Studies-Depression (CES-D8) scores.

#Our selected country is Slovenia.
table(df$cntry)
## 
##            Albania            Austria            Belgium           Bulgaria 
##                  0               2354               1594                  0 
##        Switzerland             Cyprus            Czechia            Germany 
##               1384                685                  0               2420 
##            Denmark            Estonia              Spain            Finland 
##                  0                  0               1844               1563 
##             France     United Kingdom            Georgia             Greece 
##               1771               1684                  0               2757 
##            Croatia            Hungary            Ireland             Israel 
##               1563               2118               2017                  0 
##            Iceland              Italy          Lithuania         Luxembourg 
##                842               2865               1365                  0 
##             Latvia         Montenegro    North Macedonia        Netherlands 
##                  0                  0                  0               1695 
##             Norway             Poland           Portugal            Romania 
##               1337               1442               1373                  0 
##             Serbia Russian Federation             Sweden           Slovenia 
##               1563                  0               1230               1248 
##           Slovakia             Turkey            Ukraine             Kosovo 
##               1442                  0                  0                  0
#df_sl equals to Slovenia to only refer to Slovenian data set
df_sl = df[df$cntry=="Slovenia",]


Literature review

Depression is influenced by multiple social determinants. This section reviews key factors affecting depression levels based on previous research, focusing on age, gender, financial background, social support and diet.


Age relevance in depression

Research indicates that younger individuals experience higher levels of depression compared to older adults. A study by Goodwin et al. (2022) found that 40% of individuals aged 18–39 reported anxiety, while 33% reported depression, whereas in adults aged 60 and older, anxiety and depression rates were significantly lower at 20% and 16%, respectively. Similarly, student mental health data from the Mental Health Barometer 2022 (Zick, 2023) revealed that 45% of Slovenian students rated their mental health as poor or very bad, with 82% reporting high levels of study-related stress. In contrast, older adults (65+) experience significantly lower rates of major depressive episodes and lifetime depression (Goodwin et al., 2022), suggesting a decline in depression prevalence with age.

# Convert CES‐D8 Depression Scale variables into numbers from 1-4
df_sl$d20 = as.numeric(df_sl$fltdpr)
df_sl$d21 = as.numeric(df_sl$flteeff)
df_sl$d22 = as.numeric(df_sl$slprl)
df_sl$d23 = as.numeric(df_sl$wrhpp)
df_sl$d24 = as.numeric(df_sl$fltlnl)
df_sl$d25 = as.numeric(df_sl$enjlf)
df_sl$d26 = as.numeric(df_sl$fltsd)
df_sl$d27 = as.numeric(df_sl$cldgng)
#Check
table(df_sl$d20)
## 
##   1   2   3   4 
## 922 269  42  13
table(df_sl$d21)
## 
##   1   2   3   4 
## 760 373  87  25
table(df_sl$d22)
## 
##   1   2   3   4 
## 586 436 178  44
table(df_sl$d23)
## 
##   1   2   3   4 
##  28 160 760 296
table(df_sl$d24)
## 
##   1   2   3   4 
## 950 233  48  11
table(df_sl$d25)
## 
##   1   2   3   4 
##  48 159 720 312
table(df_sl$d26)
## 
##   1   2   3   4 
## 658 509  68  11
table(df_sl$d27)
## 
##   1   2   3   4 
## 692 437 102  12
# Reverse scales of d23 and d25 (as they are differently poled than the other depression scales)
df_sl$d23 = 5 - df_sl$d23
df_sl$d25 = 5 - df_sl$d25
#Check polarity of the two variables that need to be reversed
table(df_sl$d23)
## 
##   1   2   3   4 
## 296 760 160  28
table(df_sl$d25)
## 
##   1   2   3   4 
## 312 720 159  48
df_sl$depression = rowSums(df_sl[,c("d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27")]) / 8

age=(df_sl$agea)
lm(depression ~ as.numeric(age), data=df_sl)
## 
## Call:
## lm(formula = depression ~ as.numeric(age), data = df_sl)
## 
## Coefficients:
##     (Intercept)  as.numeric(age)  
##         1.52355          0.00213
plot(df_sl$age, df_sl$depression)

# Calculate Cronbach's alpha 
# Cronbach's alpha shows level of depression
cronbach.alpha(df_sl[,c("d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27")], na.rm=T)[1]
## $alpha
## [1] 0.8248442

In Cronbachs Alpha the value is : 0.8248442

Gender relevance on depression

Research strongly supports that women are more likely to report higher depression rates than men. Over time, depression prevalence has increased, with women’s rates rising from 9.7% in 2015 to 11.8% in 2020, while men’s rates increased from 4.7% to 6.4% over the same period (Goodwin et al., 2022). Women consistently reported higher depression levels across all study years. Genetic factors also play a role, as differences in gene inheritance and interactions with the environment contribute to the increased likelihood of depression in women (Prelog et al., 2022).

means_df_sl = as.data.frame(by(as.numeric(as.character(df_sl$age)), df_sl$gndr, mean, na.rm=T))
kable(means_df_sl)
x
Male 49.08388
Female 50.41094

Financial difficulties in childhood

Bøe et al. (2016) examined childhood financial hardship’s long-term effects on depression across 19 European countries. Findings showed early financial stress significantly predicted higher depression in adults aged 25–40 in ten countries. However, its influence declined in older age as social factors, such as marital status and community engagement, became more significant. In Slovenia, improvements in childhood financial conditions may contribute to better mental health outcomes (“First progress report on implementing the European child guarantee in Slovenia 2022-2023,” 2024).

chisq.test(df_sl$fnsdfml, df_sl$depression)
## 
##  Pearson's Chi-squared test
## 
## data:  df_sl$fnsdfml and df_sl$depression
## X-squared = 190.37, df = 88, p-value = 1.638e-09

The personal matters

Existing research provides valuable insights into the broader context of social support and mental health in Slovenia (“First progress report on implementing the European child guarantee in Slovenia 2022- 2023”, 2024). Examining the impacts COVID-19 had on mental health, a research from 2021 highlights the benefits social support has on individuals well-being (Cugmas et al., 2021). Those with stronger support networks are likely to experience lower rates of depression.

##             
##              Low social support Medium social support High social support
##   None                       49                     0                   0
##   1                         183                     0                   0
##   2                         255                     0                   0
##   3                           0                   365                   0
##   4-6                         0                   300                   0
##   7-9                         0                     0                  52
##   10 or more                  0                     0                  32
## 
## Call:
## lm(formula = depression ~ support, data = df_sl)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.63298 -0.33302 -0.08302  0.24202  2.24202 
## 
## Coefficients:
##                              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                   1.63298    0.02110  77.391   <2e-16 ***
## supportMedium social support -0.04996    0.02765  -1.807    0.071 .  
## supportHigh social support   -0.10135    0.05446  -1.861    0.063 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4574 on 1205 degrees of freedom
##   (40 observations deleted due to missingness)
## Multiple R-squared:  0.004291,   Adjusted R-squared:  0.002639 
## F-statistic: 2.597 on 2 and 1205 DF,  p-value: 0.07494

Fruit consumption

Głąbska et al. (2020) and Kirbiš et al. (2025) explored the connection between dietary habits, particularly fruit consumption and mental health outcomes like depression. They highlight that increased fruit consumption, rich in essential nutrients such as vitamins, antioxidants and fiber, is associated with improved mental well-being and a reduction in depression symptoms. While Głąbska et al. (2020) discusses this link in several European countries and Kirbiš et al. (2025) does not directly focus on Slovenians, the findings suggest that regular fruit intake could play a role in lowering depression levels. These studies align with the hypothesis that more frequent fruit consumption is associated with lower levels of depression, emphasizing diet as a significant factor in mental health.

df_sl$frconsumption = factor(NA, levels = c ("Low fruit consumption", "Medium fruit consumption", "High fruit consumption"))
df_sl$frconsumption[df_sl$etfruit == "Never"] <- "Low fruit consumption"
df_sl$frconsumption[df_sl$etfruit == "Less than once a week"] <- "Low fruit consumption"
df_sl$frconsumption[df_sl$etfruit == "Less than 4 times a week but at least once a week"] <- "Medium fruit consumption"
df_sl$frconsumption[df_sl$etfruit == "Less than once a day but at least 4 times a week"] <- "Medium fruit consumption"
df_sl$frconsumption[df_sl$etfruit == "Once a day"] <- "High fruit consumption"
df_sl$frconsumption[df_sl$etfruit == "Twice a day"] <- "High fruit consumption"
df_sl$frconsumption[df_sl$etfruit == "Three times or more a day"] <- "High fruit consumption"
table(df_sl$etfruit, df_sl$frconsumption)
##                                                    
##                                                     Low fruit consumption
##   Three times or more a day                                             0
##   Twice a day                                                           0
##   Once a day                                                            0
##   Less than once a day but at least 4 times a week                      0
##   Less than 4 times a week but at least once a week                     0
##   Less than once a week                                                41
##   Never                                                                 6
##                                                    
##                                                     Medium fruit consumption
##   Three times or more a day                                                0
##   Twice a day                                                              0
##   Once a day                                                               0
##   Less than once a day but at least 4 times a week                       154
##   Less than 4 times a week but at least once a week                      101
##   Less than once a week                                                    0
##   Never                                                                    0
##                                                    
##                                                     High fruit consumption
##   Three times or more a day                                             93
##   Twice a day                                                          277
##   Once a day                                                           569
##   Less than once a day but at least 4 times a week                       0
##   Less than 4 times a week but at least once a week                      0
##   Less than once a week                                                  0
##   Never                                                                  0
oneway.test(df_sl$depression ~ df_sl$frconsumption)
## 
##  One-way analysis of means (not assuming equal variances)
## 
## data:  df_sl$depression and df_sl$frconsumption
## F = 2.1172, num df = 2.00, denom df = 109.71, p-value = 0.1253

Method

Data source and sample This study utilizes data from the 11th round of the European Social Survey (ESS-11), specifically focusing on Slovenian participants. The ESS is a cross-national survey that collects data on social attitudes, behaviors and well-being across Europe. Our sample includes individuals who provided responses on depression levels and key explanatory variables. ### Participants Our research is based on a sample of 1248 Slovenian respondents (50% men and 50% women) aged 16 - 90 participating in the 11th round of the ESS-11. Operationalization of variables Dependent variable: depression (Card 45): Depressive symptoms were assessed using the eight-item CES-D8 scale, which categorizes different levels of depression. Respondents reported how frequently they experienced certain emotions and behaviors in the past week, including: feeling depressed, struggling to complete tasks, experiencing restless sleep, feeling happy, feeling lonely, enjoying life, feeling sad and having difficulty getting started. Responses were recorded on a four-point scale: ‘None or almost none of the time’, ‘Some of the time’, ‘Most of the time’ and ‘All or almost all of the time’, with an additional ‘Don’t know’ option. The eight-item scale included two reverse-coded items and responses were summed to create a composite score ranging from 1 to 4. A mean score was assigned only if the respondent completed at least six of the eight items. According to Boe et al. (2017), analysis using ESS data has demonstrated that this version of the CES-D scale is a valid and reliable measure of depression across different age groups and remains consistent across genders. ### Independent variables: - Age (agea): - Measured in years (continuous variable). - Gender (gndr): - Originally coded as 1 = Male, 2 = Female. - Recoded into a binary variable (0 = Male, 1 = Female). - Childhood Financial Difficulties (fnsdfml): - Measures association with financial struggles during childhood. - Social Support (inprdsc): - Number of people with whom respondents discuss intimate and personal matters. - Used as a continuous predictor (higher values indicate stronger social support). - Recoded into three categorical groups to assess the relationship between social support and depression: Low Social Support: 0–2 people; Medium Social Support: 3–6 people; High Social Support: 7 or more people. Consumption (etfruit): - Fruit - Frequency of fruit consumption measured on a scale from 1 (“Never”) to 7 (“Everyday”). - Recoded into three categorical groups to simplify analysis: Low Fruit Consumption: Never, Less than once a week; Medium Fruit Consumption: 1–3 times per week; High Fruit Consumption: Once a day or more. ## Results A. Sample Description The analysis is based on Slovenian respondents from the ESS-11. The total sample consists of 1,248 participants, who provided responses regarding their depression levels and key social determinants. Depression was measured using the CES-D8 scale, ranging from 1 (“None or almost none of the time”) to 4 (“Most or all of the time”). ### Descriptive Statistics of Depression - Mean depression: 1.599 - Median depression: 1.5 ### Most frequent results: - 1.25 (194 cases) - 1.375 (140 cases) - 1.5 (158 cases) ## Sample Characteristics by Key Variables - Age: - Converted to a continuous variable. - Higher age is weakly associated with lower depression scores. - Gender: - Recoded into a binary variable (0 = Male, 1 = Female). - Women report higher depression scores than men. - Financial Difficulties in Childhood: - Strong association found between early-life financial struggles and higher depression scores. - Social Support: - Recoded into three groups: Low, Medium and High. - No significant association with depression was found. - Fruit Consumption: - Recoded into three categories: Low, Medium and High. - Higher fruit consumption did not show significant effects on depression scores.

Conclusion

This study examined the relationships between age, gender, childhood financial difficulties, social support and fruit consumption with depression levels in Slovenian participants. Using data from the 11th round of the European Social Survey (ESS), we applied bivariate and multivariate statistical methods to test five hypotheses. The findings confirmed that gender and childhood financial difficulties are significant predictors of depression, with women and individuals with early-life financial struggles reporting higher depression scores. However, age showed a weak positive association with depression, contradicting expectations that younger individuals report higher depression levels. Nevertheless, did social support and fruit consumption not significantly impact depression, challenging prior research that suggests these factors contribute to mental well-being. These findings highlight the complex interplay of social determinants in depression, emphasizing that economic stability and gender-related factors play a stronger role than lifestyle behaviors such as diet and social support. Future research should incorporate longitudinal data and additional variables (e.g., employment status and stress levels) to deepen our understanding of these relationships.

lm(depression~agea+gndr+fnsdfml+support+frconsumption, data=df_sl)
## 
## Call:
## lm(formula = depression ~ agea + gndr + fnsdfml + support + frconsumption, 
##     data = df_sl)
## 
## Coefficients:
##                           (Intercept)                                 agea16  
##                             1.7288339                              0.2476799  
##                                agea17                                 agea18  
##                             0.3088136                              0.1930322  
##                                agea19                                 agea20  
##                             0.4679233                              0.1780754  
##                                agea21                                 agea22  
##                             0.4250404                              0.2348279  
##                                agea23                                 agea24  
##                             0.1808435                              0.0252078  
##                                agea25                                 agea26  
##                             0.1575591                              0.0148466  
##                                agea27                                 agea28  
##                            -0.0715978                              0.2124839  
##                                agea29                                 agea30  
##                             0.2289246                              0.1897835  
##                                agea31                                 agea32  
##                             0.1047432                              0.0440523  
##                                agea33                                 agea34  
##                             0.2570264                              0.1134944  
##                                agea35                                 agea36  
##                             0.1830840                              0.0990776  
##                                agea37                                 agea38  
##                             0.2954555                              0.1610012  
##                                agea39                                 agea40  
##                             0.1809742                              0.0703851  
##                                agea41                                 agea42  
##                             0.0891815                             -0.0132418  
##                                agea43                                 agea44  
##                             0.0661749                              0.0896731  
##                                agea45                                 agea46  
##                             0.0192563                             -0.0932474  
##                                agea47                                 agea48  
##                            -0.0017349                              0.1471875  
##                                agea49                                 agea50  
##                             0.0378267                             -0.0500521  
##                                agea51                                 agea52  
##                            -0.1052482                              0.2937668  
##                                agea53                                 agea54  
##                             0.1261290                              0.3003010  
##                                agea55                                 agea56  
##                             0.1655324                              0.1182404  
##                                agea57                                 agea58  
##                             0.1917165                              0.1464101  
##                                agea59                                 agea60  
##                             0.0498763                             -0.0013279  
##                                agea61                                 agea62  
##                             0.0807733                              0.1330057  
##                                agea63                                 agea64  
##                             0.2482062                             -0.0003316  
##                                agea65                                 agea66  
##                             0.1507980                              0.2802071  
##                                agea67                                 agea68  
##                             0.1708179                              0.0309067  
##                                agea69                                 agea70  
##                             0.1413080                              0.2689939  
##                                agea71                                 agea72  
##                             0.1328392                              0.2468592  
##                                agea73                                 agea74  
##                             0.3871048                              0.1380748  
##                                agea75                                 agea76  
##                             0.0184659                              0.3163267  
##                                agea77                                 agea78  
##                             0.1659110                              0.4154134  
##                                agea79                                 agea80  
##                             0.0373176                              0.3631554  
##                                agea81                                 agea82  
##                             0.4309358                              0.1889187  
##                                agea83                                 agea84  
##                             0.2718253                              0.2274260  
##                                agea85                                 agea86  
##                             0.4812614                              0.3175211  
##                                agea87                                 agea88  
##                             0.7723882                              0.1042570  
##                                agea89                                 agea90  
##                             0.3977727                              0.6824195  
##                            gndrFemale                           fnsdfmlOften  
##                             0.1155900                             -0.1759680  
##                      fnsdfmlSometimes                     fnsdfmlHardly ever  
##                            -0.2528026                             -0.3090019  
##                          fnsdfmlNever           supportMedium social support  
##                            -0.4219585                             -0.0469327  
##            supportHigh social support  frconsumptionMedium fruit consumption  
##                            -0.1168666                              0.0439806  
##   frconsumptionHigh fruit consumption  
##                            -0.0255870