1. Introduction

This script analyzes how social determinants (income, health services, childhood conflicts, and working hours) influence depression (CES-D8 score) in Austria using ESS11 data.

2. Recoding CES-D8 Depression Scale (Dependent Variable)

First of all, the CES-D8 variables were recoded as follows:

cesd_items = c("fltdpr", "flteeff", "slprl", "wrhpp", "fltlnl", "enjlf", "fltsd", "cldgng")

for (item in cesd_items) {
  df_aus[[paste0(item, "_n")]] = as.numeric(NA)
  df_aus[[paste0(item, "_n")]][df_aus[[item]] == "None or almost none of the time"] = 1
  df_aus[[paste0(item, "_n")]][df_aus[[item]] == "Some of the time"] = 2
  df_aus[[paste0(item, "_n")]][df_aus[[item]] == "Most of the time"] = 3
  df_aus[[paste0(item, "_n")]][df_aus[[item]] == "All or almost all of the time"] = 4
}

df_aus$wrhpp_n = 5 - df_aus$wrhpp_n
df_aus$enjlf_n = 5 - df_aus$enjlf_n
df_aus$CESD_TOTAL = rowMeans(df_aus[, paste0(cesd_items, "_n")], na.rm = TRUE)

3. Reliability Analysis (Cronbach’s Alpha for CES-D8)

alpha_value = alpha(df_aus[, paste0(cesd_items, "_n")])
print(alpha_value$total$raw_alpha)
## [1] 0.8033533

The Cronbach’s Alpha can be interpreted as follows:

4. Descriptive Statistics and Normality Test

summary(df_aus$CESD_TOTAL)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   1.000   1.250   1.500   1.614   1.875   4.000       3

## 
##  Shapiro-Wilk normality test
## 
## data:  df_aus$CESD_TOTAL
## W = 0.91548, p-value < 2.2e-16

The results can be Interpreted as follows:

5. Bivariate Analysis

Spearman’s rank correlation was used to assess the association between CES-D8 and ordinal predictors (hincfel, stfhlt, cnfpplh) due to violations of normality in the CES-D8 distribution. Kruskal-Wallis tests examined group differences in CES-D8 across ordinal independent variables.

  1. Income satisfaction & depression
## 
##  Spearman's rank correlation rho
## 
## data:  df_aus$CESD_TOTAL and df_aus$hincfel_num
## S = 2662241722, p-value < 2.2e-16
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.2530843
## 
##  Kruskal-Wallis rank sum test
## 
## data:  CESD_TOTAL by hincfel_num
## Kruskal-Wallis chi-squared = 181.74, df = 3, p-value < 2.2e-16

H1: The results confirm the hypothesis that higher income satisfaction is significantly associated with lower depressive symptoms. The boxplot highlights the decreasing trend of depressive symptoms as income satisfaction increases. Individuals reporting financial difficulties show higher CES-D8 scores, supporting the hypothesis that income satisfaction is a key determinant of mental health.

  1. Perceived health services & depression
## 
##  Spearman's rank correlation rho
## 
## data:  df_aus$CESD_TOTAL and df_aus$stfhlth_num
## S = 2528569850, p-value < 2.2e-16
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.1765157
## 
##  Kruskal-Wallis rank sum test
## 
## data:  CESD_TOTAL by stfhlth_num
## Kruskal-Wallis chi-squared = 81.026, df = 10, p-value = 3.158e-13

H2: Better perceptions of health services are linked to lower depressive symptoms, supporting the hypothesis of H2.

  1. Childhood conflicts & depression
## 
##  Spearman's rank correlation rho
## 
## data:  df_aus$CESD_TOTAL and df_aus$cnfpplh_num
## S = 2720720385, p-value < 2.2e-16
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.2789663
## 
##  Kruskal-Wallis rank sum test
## 
## data:  CESD_TOTAL by cnfpplh_num
## Kruskal-Wallis chi-squared = 182.79, df = 4, p-value < 2.2e-16

H3: More frequent childhood conflicts are significantly associated with higher depressive symptoms. Thus, the hypothesis is confirmed.

  1. Working hours and depression
## 
##  Spearman's rank correlation rho
## 
## data:  df_aus$CESD_TOTAL and df_aus$wkhtot
## S = 1570463957, p-value = 0.6569
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##         rho 
## 0.009655143

H4: Interpretation: Working hours are not significantly associated with depressive symptoms, leading to the rejection of H4. The scatterplot illustrates the lack of a significant correlation between working hours and depressive symptoms. This supports the results of the Spearman correlation analysis, which indicated a non-significant relationship (ρ = -0.010, p = 0.657). The dispersion of points suggests that working hours do not systematically predict depression in this sample.

6. Multi linear regresion model

##              CESD_TOTAL hincfel_num cnfpplh_num       wkhtot  stfhlth_num
## CESD_TOTAL   1.00000000 -0.28266139  -0.2744081 -0.013988767 -0.172499368
## hincfel_num -0.28266139  1.00000000   0.1493801  0.041298772  0.047046449
## cnfpplh_num -0.27440813  0.14938008   1.0000000 -0.010915399  0.163197732
## wkhtot      -0.01398877  0.04129877  -0.0109154  1.000000000  0.001021815
## stfhlth_num -0.17249937  0.04704645   0.1631977  0.001021815  1.000000000
## 
## Call:
## lm(formula = CESD_TOTAL ~ hincfel_num + cnfpplh_num + wkhtot + 
##     stfhlth_num, data = df_aus)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.00641 -0.27287 -0.07585  0.20838  2.29300 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  2.6477758  0.0639004  41.436  < 2e-16 ***
## hincfel_num -0.1532889  0.0128009 -11.975  < 2e-16 ***
## cnfpplh_num -0.0912248  0.0092222  -9.892  < 2e-16 ***
## wkhtot      -0.0003108  0.0008385  -0.371    0.711    
## stfhlth_num -0.0240280  0.0038789  -6.194 7.02e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4118 on 2093 degrees of freedom
##   (256 Beobachtungen als fehlend gelöscht)
## Multiple R-squared:  0.1422, Adjusted R-squared:  0.1406 
## F-statistic: 86.76 on 4 and 2093 DF,  p-value: < 2.2e-16

The multiple linear regression model identified income satisfaction, childhood conflict and healthcare perception as significant predictors of depression. Working hours had no significant effect. The regression model explains 14.06% of the variance in depressive symptoms.