Introduction

Depression is a prevalent mental disorder, experienced by 4-10% of the global population over their lifetime (Chapman et al., 2022). Currently, around 280 million people (3.8%) are affected globally (WHO, 2023), with depression ranked among the top contributors to the global health burden in 2019. Although adequate and cost-efficient treatments are available across low-, middle-, and high-income countries, and stigma surrounding professional help is decreasing, depression treatment challenges are common occurrences. Depression remains a global health issue because of delayed diagnosis, treatments that are not tailored to individual needs (Ferrari et al., 2024), and inadequate responses to treatment attempts (Chapman et al., 2022). For instance, in the United Kingdom (UK), 15-30% of individuals still suffer from depression after undergoing two or more treatments. Moreover, depression affects various aspects of life, including education, employment, and personal relationships (OECD & European Commission, 2024), while contributing significantly to economic and healthcare costs (Statista, 2024; Vinokur, Price, & Caplan, 1996). Therefore, the research question is as follows: RQ. What are the Potential Drivers of Depression in the UK? Understanding the social determinants of depression is essential for developing more tailored treatments, targeting risk factors, and enabling earlier diagnoses to reduce the health burden, both for personal/societal and economic benefits.

library(foreign)
library(ltm)

setwd("/Users/annarendez/Desktop/Master/1.Semester/Quantitavie Forschung/R Data")
df = read.spss("ESS11.sav", to.data.frame = T)

Hypothesis

H1: The prevalence of depression increases with experienced discrimination based on an individual’s sexuality (LGBQ+).

H2: The prevalence of depression increases with experienced discrimination based on an individual’s skin colour or race.

H3: The prevalence of depression decrease with age (still to be justified by the literature)

H4: The prevalence of depression among females compared to males is higher (Female are more depressed than male) (still to be justified by the literature)

Methods

The present paper aimed to investigate depression in a British population, as 15-30% of individuals do not recover from depression after two or more treatments (Chapman et al., 2022) and therefore a greater understanding of potential contributing factors is crucial for improving recovery outcomes. Data and Sample For this investigation, the most recent dataset from the European Social Survey (ESS) (11th Edition, European Social Survey European Research Infrastructure, 2024) was used. Statistical analyses and data processing were performed using R (version 4.4.2, 2024-10-31, ucrt for Windows) (De Vries & Meys, 2021), initially loading the foreign and ltm packages required - the latter to compute Cronbach’s alpha (De Vries & Meys, 2021). The dataset was subsetted to include only participants from the United Kingdom, resulting in an initial sample size of 1684 (n = 1684). However, due to missing data, the final sample consisted of 1635 (n = 1635) participants, aged 15 to 90 years. Measures Dependent Variable: Depression was measured using the Centre for Epidemiological Studies Depression Scale (CES-D8), an 8-item scale. An example item is “felt that everything they did was an effort,” referring to the frequency of such feelings in the past week. Responses were given on a four-point Likert scale ranging from 1 = “None or almost none of the time” to 4 = “All or almost all of the time.” Items d23 (“you were happy?”) and d25 (“you enjoyed life?”) were reverse-coded due to their negative wording, ensuring a consistent positive polarity across all items. Independent Variables: Discrimination based on the respondent’s sexuality (nominal: “marked”, “not marked”), discrimination based on colour or race (nominal: “marked”, “not marked”), age (ratio scale: 15-90), and gender (nominal: “male”, “female”) were considered as potential factors influencing depression. Data Analysis To assess the internal consistency of the depression scale, Cronbach’s alpha was calculated, typically ranging from 0 to 1 (Döring & Bortz, 2016), although it can sometimes be negative (Bühner, 2005). The degree of agreement between items was high, with an alpha of 0.838, well above the recommended threshold of 0.7 (Hair, 2010), indicating that all items measure the same underlying construct of depression (Osburn, 2000). Given that Cronbach’s alpha typically ranges between 0.7 and 0.9 for adequate reliability, and values above 0.9 indicate high reliability (Döring & Bortz, 2016), a higher alpha value would have been preferable, however not necessary. Statistical Analyses Bivariate and multivariate statistical methods were used to assess the associations between variables. For hypotheses H1, H2, and H4, the median and interquartile range (IQR), along with the mean, were reported. No correlation analysis (e.g., Pearson’s product-moment correlation) was conducted because the independent variables were not interval-scaled (Bühner, 2005), but rather nominal (dichotomous). For hypothesis H3, Spearman’s rank correlation was used instead of Pearson’s product-moment correlation, as the assumption of bivariate normality for Pearson’s correlation was not met, as confirmed by visual inspection using a scatterplot. Furthermore, the linearity assumption required for Pearson’s correlation was not satisfied (Bühner, 2005). Statistical significance was assessed using a significance level of p < 0.05. To determine the effects of discrimination (based on sexuality, skin colour or race) and gender on depression, the rank-based Wilcoxon test was applied, as the variables did not require a normal distribution (Universität Zürich, 2023). The Spearman rank correlation test (Spearman’s rho) was used to examine the association between depression and age, where a value closer to 0 indicates a weaker effect (Universität Zürich, 2023). A multivariate model was constructed to assess the combined effects of discrimination (both sexuality and skin colour or race), age, and gender on depression. Variables that did not show a statistically significant relationship with depression were excluded from the final model.

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 (negative coding)
df$d23 = 5 - df$d23
df$d25 = 5 - df$d25


# lookup: existing country names in the dataframe (df)
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
# selected country: United Kingdom (UK hereafter)
# subset dataset: rows where cntry is "United Kingdom", all columns
# name it "df_uk" (dataset UK)
df_uk = df[df$cntry == "United Kingdom", ]
# check
table(df_uk$cntry)
## 
##            Albania            Austria            Belgium           Bulgaria 
##                  0                  0                  0                  0 
##        Switzerland             Cyprus            Czechia            Germany 
##                  0                  0                  0                  0 
##            Denmark            Estonia              Spain            Finland 
##                  0                  0                  0                  0 
##             France     United Kingdom            Georgia             Greece 
##                  0               1684                  0                  0 
##            Croatia            Hungary            Ireland             Israel 
##                  0                  0                  0                  0 
##            Iceland              Italy          Lithuania         Luxembourg 
##                  0                  0                  0                  0 
##             Latvia         Montenegro    North Macedonia        Netherlands 
##                  0                  0                  0                  0 
##             Norway             Poland           Portugal            Romania 
##                  0                  0                  0                  0 
##             Serbia Russian Federation             Sweden           Slovenia 
##                  0                  0                  0                  0 
##           Slovakia             Turkey            Ukraine             Kosovo 
##                  0                  0                  0                  0
# calculation of Cronbach's alpha (using df_uk) to check internal consistency ("reliability") of depression items
cronbach.alpha(df_uk[,c("d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27")], na.rm=T)
## 
## Cronbach's alpha for the 'df_uk[, c("d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27")]' data-set
## 
## Items: 8
## Sample units: 1684
## alpha: 0.838
 alpha_uk=cronbach.alpha(df_uk[,c("d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27")], na.rm=T)
 
# cronbach's alpha is 0.838 (not too high, not too low).
# to what extent are we measuring the same construct (reliability of the scale)? 
# goal of 0.7 ≤ α ≤ 0.9 has been achieved. 
# cronbach’s alpha falls between 0.8 and approximately 0.92, which is considered optimal.
# the scale measures the same underlying construct (depression) - no items needs to be removed.

Am Anfang haben wir den Cronbach Alpha berechnet um zu schauen ob unsere Variablen in Zusammenhang miteinander stehen. Der Cornbach Alpha unserer Rechnung beträgt 0.84 , dieses Ergebnis zeigt, dass die berechneten Variablen in Zusammenhang zueinander stehen.

# calculation of the average score (new variable named "depression")
# score = mean of items row wise = sum of item values / number of items - 
df_uk$depression = rowSums(df_uk[, c("d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27")]) / 8
# check that all columns (d20, d21, d22, etc.) are correctly spelled and exist in df_uk (not meaningful).
names(df_uk)
##   [1] "name"       "essround"   "edition"    "proddate"   "idno"      
##   [6] "cntry"      "dweight"    "pspwght"    "pweight"    "anweight"  
##  [11] "nwspol"     "netusoft"   "netustm"    "ppltrst"    "pplfair"   
##  [16] "pplhlp"     "polintr"    "psppsgva"   "actrolga"   "psppipla"  
##  [21] "cptppola"   "trstprl"    "trstlgl"    "trstplc"    "trstplt"   
##  [26] "trstprt"    "trstep"     "trstun"     "vote"       "prtvtdat"  
##  [31] "prtvtebe"   "prtvtchr"   "prtvtccy"   "prtvtffi"   "prtvtffr"  
##  [36] "prtvgde1"   "prtvgde2"   "prtvtegr"   "prtvthhu"   "prtvteis"  
##  [41] "prtvteie"   "prtvteit"   "prtvclt1"   "prtvclt2"   "prtvclt3"  
##  [46] "prtvtinl"   "prtvtcno"   "prtvtfpl"   "prtvtept"   "prtvtbrs"  
##  [51] "prtvtesk"   "prtvtgsi"   "prtvtges"   "prtvtdse"   "prtvthch"  
##  [56] "prtvtdgb"   "contplt"    "donprty"    "badge"      "sgnptit"   
##  [61] "pbldmna"    "bctprd"     "pstplonl"   "volunfp"    "clsprty"   
##  [66] "prtcleat"   "prtclebe"   "prtclbhr"   "prtclccy"   "prtclgfi"  
##  [71] "prtclgfr"   "prtclgde"   "prtclegr"   "prtclihu"   "prtcleis"  
##  [76] "prtclfie"   "prtclfit"   "prtclclt"   "prtclhnl"   "prtclcno"  
##  [81] "prtcljpl"   "prtclgpt"   "prtclbrs"   "prtclesk"   "prtclgsi"  
##  [86] "prtclhes"   "prtcldse"   "prtclhch"   "prtcldgb"   "prtdgcl"   
##  [91] "lrscale"    "stflife"    "stfeco"     "stfgov"     "stfdem"    
##  [96] "stfedu"     "stfhlth"    "gincdif"    "freehms"    "hmsfmlsh"  
## [101] "hmsacld"    "euftf"      "lrnobed"    "loylead"    "imsmetn"   
## [106] "imdfetn"    "impcntr"    "imbgeco"    "imueclt"    "imwbcnt"   
## [111] "happy"      "sclmeet"    "inprdsc"    "sclact"     "crmvct"    
## [116] "aesfdrk"    "health"     "hlthhmp"    "atchctr"    "atcherp"   
## [121] "rlgblg"     "rlgdnm"     "rlgdnbat"   "rlgdnacy"   "rlgdnafi"  
## [126] "rlgdnade"   "rlgdnagr"   "rlgdnhu"    "rlgdnais"   "rlgdnie"   
## [131] "rlgdnlt"    "rlgdnanl"   "rlgdnno"    "rlgdnapl"   "rlgdnapt"  
## [136] "rlgdnrs"    "rlgdnask"   "rlgdnase"   "rlgdnach"   "rlgdngb"   
## [141] "rlgblge"    "rlgdnme"    "rlgdebat"   "rlgdeacy"   "rlgdeafi"  
## [146] "rlgdeade"   "rlgdeagr"   "rlgdehu"    "rlgdeais"   "rlgdeie"   
## [151] "rlgdelt"    "rlgdeanl"   "rlgdeno"    "rlgdeapl"   "rlgdeapt"  
## [156] "rlgders"    "rlgdeask"   "rlgdease"   "rlgdeach"   "rlgdegb"   
## [161] "rlgdgr"     "rlgatnd"    "pray"       "dscrgrp"    "dscrrce"   
## [166] "dscrntn"    "dscrrlg"    "dscrlng"    "dscretn"    "dscrage"   
## [171] "dscrgnd"    "dscrsex"    "dscrdsb"    "dscroth"    "dscrdk"    
## [176] "dscrref"    "dscrnap"    "dscrna"     "ctzcntr"    "brncntr"   
## [181] "cntbrthd"   "livecnta"   "lnghom1"    "lnghom2"    "feethngr"  
## [186] "facntr"     "fbrncntc"   "mocntr"     "mbrncntc"   "ccnthum"   
## [191] "ccrdprs"    "wrclmch"    "admrclc"    "testjc34"   "testjc35"  
## [196] "testjc36"   "testjc37"   "testjc38"   "testjc39"   "testjc40"  
## [201] "testjc41"   "testjc42"   "vteurmmb"   "vteubcmb"   "ctrlife"   
## [206] "etfruit"    "eatveg"     "dosprt"     "cgtsmok"    "alcfreq"   
## [211] "alcwkdy"    "alcwknd"    "icgndra"    "alcbnge"    "height"    
## [216] "weighta"    "dshltgp"    "dshltms"    "dshltnt"    "dshltref"  
## [221] "dshltdk"    "dshltna"    "medtrun"    "medtrnp"    "medtrnt"   
## [226] "medtroc"    "medtrnl"    "medtrwl"    "medtrnaa"   "medtroth"  
## [231] "medtrnap"   "medtrref"   "medtrdk"    "medtrna"    "medtrnu"   
## [236] "hlpfmly"    "hlpfmhr"    "trhltacu"   "trhltacp"   "trhltcm"   
## [241] "trhltch"    "trhltos"    "trhltho"    "trhltht"    "trhlthy"   
## [246] "trhltmt"    "trhltpt"    "trhltre"    "trhltsh"    "trhltnt"   
## [251] "trhltref"   "trhltdk"    "trhltna"    "fltdpr"     "flteeff"   
## [256] "slprl"      "wrhpp"      "fltlnl"     "enjlf"      "fltsd"     
## [261] "cldgng"     "hltprhc"    "hltprhb"    "hltprbp"    "hltpral"   
## [266] "hltprbn"    "hltprpa"    "hltprpf"    "hltprsd"    "hltprsc"   
## [271] "hltprsh"    "hltprdi"    "hltprnt"    "hltprref"   "hltprdk"   
## [276] "hltprna"    "hltphhc"    "hltphhb"    "hltphbp"    "hltphal"   
## [281] "hltphbn"    "hltphpa"    "hltphpf"    "hltphsd"    "hltphsc"   
## [286] "hltphsh"    "hltphdi"    "hltphnt"    "hltphnap"   "hltphref"  
## [291] "hltphdk"    "hltphna"    "hltprca"    "cancfre"    "cnfpplh"   
## [296] "fnsdfml"    "jbexpvi"    "jbexpti"    "jbexpml"    "jbexpmc"   
## [301] "jbexpnt"    "jbexpnap"   "jbexpref"   "jbexpdk"    "jbexpna"   
## [306] "jbexevl"    "jbexevh"    "jbexevc"    "jbexera"    "jbexecp"   
## [311] "jbexebs"    "jbexent"    "jbexenap"   "jbexeref"   "jbexedk"   
## [316] "jbexena"    "nobingnd"   "likrisk"    "liklead"    "sothnds"   
## [321] "actcomp"    "mascfel"    "femifel"    "impbemw"    "trmedmw"   
## [326] "trwrkmw"    "trplcmw"    "trmdcnt"    "trwkcnt"    "trplcnt"   
## [331] "eqwrkbg"    "eqpolbg"    "eqmgmbg"    "eqpaybg"    "eqparep"   
## [336] "eqparlv"    "freinsw"    "fineqpy"    "wsekpwr"    "weasoff"   
## [341] "wlespdm"    "wexashr"    "wprtbym"    "wbrgwrm"    "hhmmb"     
## [346] "gndr"       "gndr2"      "gndr3"      "gndr4"      "gndr5"     
## [351] "gndr6"      "gndr7"      "gndr8"      "gndr9"      "gndr10"    
## [356] "gndr11"     "gndr12"     "yrbrn"      "agea"       "yrbrn2"    
## [361] "yrbrn3"     "yrbrn4"     "yrbrn5"     "yrbrn6"     "yrbrn7"    
## [366] "yrbrn8"     "yrbrn9"     "yrbrn10"    "yrbrn11"    "yrbrn12"   
## [371] "rshipa2"    "rshipa3"    "rshipa4"    "rshipa5"    "rshipa6"   
## [376] "rshipa7"    "rshipa8"    "rshipa9"    "rshipa10"   "rshipa11"  
## [381] "rshipa12"   "rshpsts"    "rshpsgb"    "lvgptnea"   "dvrcdeva"  
## [386] "marsts"     "marstgb"    "maritalb"   "chldhhe"    "domicil"   
## [391] "paccmoro"   "paccdwlr"   "pacclift"   "paccnbsh"   "paccocrw"  
## [396] "paccxhoc"   "paccnois"   "paccinro"   "paccnt"     "paccref"   
## [401] "paccdk"     "paccna"     "edulvlb"    "eisced"     "edlveat"   
## [406] "edlvebe"    "edlvehr"    "edlvgcy"    "edlvdfi"    "edlvdfr"   
## [411] "edudde1"    "educde2"    "edlvegr"    "edlvdahu"   "edlvdis"   
## [416] "edlvdie"    "edlvfit"    "edlvdlt"    "edlvenl"    "edlveno"   
## [421] "edlvipl"    "edlvept"    "edlvdrs"    "edlvdsk"    "edlvesi"   
## [426] "edlvies"    "edlvdse"    "edlvdch"    "educgb1"    "edubgb2"   
## [431] "edagegb"    "eduyrs"     "pdwrk"      "edctn"      "uempla"    
## [436] "uempli"     "dsbld"      "rtrd"       "cmsrv"      "hswrk"     
## [441] "dngoth"     "dngref"     "dngdk"      "dngna"      "mainact"   
## [446] "mnactic"    "crpdwk"     "pdjobev"    "pdjobyr"    "emplrel"   
## [451] "emplno"     "wrkctra"    "estsz"      "jbspv"      "njbspv"    
## [456] "wkdcorga"   "iorgact"    "wkhct"      "wkhtot"     "nacer2"    
## [461] "tporgwk"    "isco08"     "wrkac6m"    "uemp3m"     "uemp12m"   
## [466] "uemp5yr"    "mbtru"      "hincsrca"   "hinctnta"   "hincfel"   
## [471] "edulvlpb"   "eiscedp"    "edlvpfat"   "edlvpebe"   "edlvpehr"  
## [476] "edlvpgcy"   "edlvpdfi"   "edlvpdfr"   "edupdde1"   "edupcde2"  
## [481] "edlvpegr"   "edlvpdahu"  "edlvpdis"   "edlvpdie"   "edlvpfit"  
## [486] "edlvpdlt"   "edlvpenl"   "edlvpeno"   "edlvphpl"   "edlvpept"  
## [491] "edlvpdrs"   "edlvpdsk"   "edlvpesi"   "edlvphes"   "edlvpdse"  
## [496] "edlvpdch"   "edupcgb1"   "edupbgb2"   "edagepgb"   "pdwrkp"    
## [501] "edctnp"     "uemplap"    "uemplip"    "dsbldp"     "rtrdp"     
## [506] "cmsrvp"     "hswrkp"     "dngothp"    "dngdkp"     "dngnapp"   
## [511] "dngrefp"    "dngnap"     "mnactp"     "crpdwkp"    "isco08p"   
## [516] "emprelp"    "wkhtotp"    "edulvlfb"   "eiscedf"    "edlvfeat"  
## [521] "edlvfebe"   "edlvfehr"   "edlvfgcy"   "edlvfdfi"   "edlvfdfr"  
## [526] "edufcde1"   "edufbde2"   "edlvfegr"   "edlvfdahu"  "edlvfdis"  
## [531] "edlvfdie"   "edlvffit"   "edlvfdlt"   "edlvfenl"   "edlvfeno"  
## [536] "edlvfgpl"   "edlvfept"   "edlvfdrs"   "edlvfdsk"   "edlvfesi"  
## [541] "edlvfges"   "edlvfdse"   "edlvfdch"   "edufcgb1"   "edufbgb2"  
## [546] "edagefgb"   "emprf14"    "occf14b"    "edulvlmb"   "eiscedm"   
## [551] "edlvmeat"   "edlvmebe"   "edlvmehr"   "edlvmgcy"   "edlvmdfi"  
## [556] "edlvmdfr"   "edumcde1"   "edumbde2"   "edlvmegr"   "edlvmdahu" 
## [561] "edlvmdis"   "edlvmdie"   "edlvmfit"   "edlvmdlt"   "edlvmenl"  
## [566] "edlvmeno"   "edlvmgpl"   "edlvmept"   "edlvmdrs"   "edlvmdsk"  
## [571] "edlvmesi"   "edlvmges"   "edlvmdse"   "edlvmdch"   "edumcgb1"  
## [576] "edumbgb2"   "edagemgb"   "emprm14"    "occm14b"    "atncrse"   
## [581] "anctrya1"   "anctrya2"   "regunit"    "region"     "ipcrtiva"  
## [586] "impricha"   "ipeqopta"   "ipshabta"   "impsafea"   "impdiffa"  
## [591] "ipfrulea"   "ipudrsta"   "ipmodsta"   "ipgdtima"   "impfreea"  
## [596] "iphlppla"   "ipsucesa"   "ipstrgva"   "ipadvnta"   "ipbhprpa"  
## [601] "iprspota"   "iplylfra"   "impenva"    "imptrada"   "impfuna"   
## [606] "testji1"    "testji2"    "testji3"    "testji4"    "testji5"   
## [611] "testji6"    "testji7"    "testji8"    "testji9"    "respc19a"  
## [616] "symtc19"    "symtnc19"   "vacc19"     "recon"      "inwds"     
## [621] "ainws"      "ainwe"      "binwe"      "cinwe"      "dinwe"     
## [626] "einwe"      "finwe"      "hinwe"      "iinwe"      "kinwe"     
## [631] "rinwe"      "inwde"      "jinws"      "jinwe"      "inwtm"     
## [636] "mode"       "domain"     "prob"       "stratum"    "psu"       
## [641] "d20"        "d21"        "d22"        "d23"        "d24"       
## [646] "d25"        "d26"        "d27"        "depression"
library(foreign)
#install.packages("likert") # required to calculate Cronbach's alpha
library(ltm)
library(likert)     # create basic Likert tables and plots
library(kableExtra)


# for datasets, see release guide pp 22ff
# read data and assign to data frame

setwd("/Users/annarendez/Desktop/Master/1.Semester/Quantitavie Forschung/R Data")
df = read.spss("ESS11.sav", to.data.frame = T)
names(df)
##   [1] "name"      "essround"  "edition"   "proddate"  "idno"      "cntry"    
##   [7] "dweight"   "pspwght"   "pweight"   "anweight"  "nwspol"    "netusoft" 
##  [13] "netustm"   "ppltrst"   "pplfair"   "pplhlp"    "polintr"   "psppsgva" 
##  [19] "actrolga"  "psppipla"  "cptppola"  "trstprl"   "trstlgl"   "trstplc"  
##  [25] "trstplt"   "trstprt"   "trstep"    "trstun"    "vote"      "prtvtdat" 
##  [31] "prtvtebe"  "prtvtchr"  "prtvtccy"  "prtvtffi"  "prtvtffr"  "prtvgde1" 
##  [37] "prtvgde2"  "prtvtegr"  "prtvthhu"  "prtvteis"  "prtvteie"  "prtvteit" 
##  [43] "prtvclt1"  "prtvclt2"  "prtvclt3"  "prtvtinl"  "prtvtcno"  "prtvtfpl" 
##  [49] "prtvtept"  "prtvtbrs"  "prtvtesk"  "prtvtgsi"  "prtvtges"  "prtvtdse" 
##  [55] "prtvthch"  "prtvtdgb"  "contplt"   "donprty"   "badge"     "sgnptit"  
##  [61] "pbldmna"   "bctprd"    "pstplonl"  "volunfp"   "clsprty"   "prtcleat" 
##  [67] "prtclebe"  "prtclbhr"  "prtclccy"  "prtclgfi"  "prtclgfr"  "prtclgde" 
##  [73] "prtclegr"  "prtclihu"  "prtcleis"  "prtclfie"  "prtclfit"  "prtclclt" 
##  [79] "prtclhnl"  "prtclcno"  "prtcljpl"  "prtclgpt"  "prtclbrs"  "prtclesk" 
##  [85] "prtclgsi"  "prtclhes"  "prtcldse"  "prtclhch"  "prtcldgb"  "prtdgcl"  
##  [91] "lrscale"   "stflife"   "stfeco"    "stfgov"    "stfdem"    "stfedu"   
##  [97] "stfhlth"   "gincdif"   "freehms"   "hmsfmlsh"  "hmsacld"   "euftf"    
## [103] "lrnobed"   "loylead"   "imsmetn"   "imdfetn"   "impcntr"   "imbgeco"  
## [109] "imueclt"   "imwbcnt"   "happy"     "sclmeet"   "inprdsc"   "sclact"   
## [115] "crmvct"    "aesfdrk"   "health"    "hlthhmp"   "atchctr"   "atcherp"  
## [121] "rlgblg"    "rlgdnm"    "rlgdnbat"  "rlgdnacy"  "rlgdnafi"  "rlgdnade" 
## [127] "rlgdnagr"  "rlgdnhu"   "rlgdnais"  "rlgdnie"   "rlgdnlt"   "rlgdnanl" 
## [133] "rlgdnno"   "rlgdnapl"  "rlgdnapt"  "rlgdnrs"   "rlgdnask"  "rlgdnase" 
## [139] "rlgdnach"  "rlgdngb"   "rlgblge"   "rlgdnme"   "rlgdebat"  "rlgdeacy" 
## [145] "rlgdeafi"  "rlgdeade"  "rlgdeagr"  "rlgdehu"   "rlgdeais"  "rlgdeie"  
## [151] "rlgdelt"   "rlgdeanl"  "rlgdeno"   "rlgdeapl"  "rlgdeapt"  "rlgders"  
## [157] "rlgdeask"  "rlgdease"  "rlgdeach"  "rlgdegb"   "rlgdgr"    "rlgatnd"  
## [163] "pray"      "dscrgrp"   "dscrrce"   "dscrntn"   "dscrrlg"   "dscrlng"  
## [169] "dscretn"   "dscrage"   "dscrgnd"   "dscrsex"   "dscrdsb"   "dscroth"  
## [175] "dscrdk"    "dscrref"   "dscrnap"   "dscrna"    "ctzcntr"   "brncntr"  
## [181] "cntbrthd"  "livecnta"  "lnghom1"   "lnghom2"   "feethngr"  "facntr"   
## [187] "fbrncntc"  "mocntr"    "mbrncntc"  "ccnthum"   "ccrdprs"   "wrclmch"  
## [193] "admrclc"   "testjc34"  "testjc35"  "testjc36"  "testjc37"  "testjc38" 
## [199] "testjc39"  "testjc40"  "testjc41"  "testjc42"  "vteurmmb"  "vteubcmb" 
## [205] "ctrlife"   "etfruit"   "eatveg"    "dosprt"    "cgtsmok"   "alcfreq"  
## [211] "alcwkdy"   "alcwknd"   "icgndra"   "alcbnge"   "height"    "weighta"  
## [217] "dshltgp"   "dshltms"   "dshltnt"   "dshltref"  "dshltdk"   "dshltna"  
## [223] "medtrun"   "medtrnp"   "medtrnt"   "medtroc"   "medtrnl"   "medtrwl"  
## [229] "medtrnaa"  "medtroth"  "medtrnap"  "medtrref"  "medtrdk"   "medtrna"  
## [235] "medtrnu"   "hlpfmly"   "hlpfmhr"   "trhltacu"  "trhltacp"  "trhltcm"  
## [241] "trhltch"   "trhltos"   "trhltho"   "trhltht"   "trhlthy"   "trhltmt"  
## [247] "trhltpt"   "trhltre"   "trhltsh"   "trhltnt"   "trhltref"  "trhltdk"  
## [253] "trhltna"   "fltdpr"    "flteeff"   "slprl"     "wrhpp"     "fltlnl"   
## [259] "enjlf"     "fltsd"     "cldgng"    "hltprhc"   "hltprhb"   "hltprbp"  
## [265] "hltpral"   "hltprbn"   "hltprpa"   "hltprpf"   "hltprsd"   "hltprsc"  
## [271] "hltprsh"   "hltprdi"   "hltprnt"   "hltprref"  "hltprdk"   "hltprna"  
## [277] "hltphhc"   "hltphhb"   "hltphbp"   "hltphal"   "hltphbn"   "hltphpa"  
## [283] "hltphpf"   "hltphsd"   "hltphsc"   "hltphsh"   "hltphdi"   "hltphnt"  
## [289] "hltphnap"  "hltphref"  "hltphdk"   "hltphna"   "hltprca"   "cancfre"  
## [295] "cnfpplh"   "fnsdfml"   "jbexpvi"   "jbexpti"   "jbexpml"   "jbexpmc"  
## [301] "jbexpnt"   "jbexpnap"  "jbexpref"  "jbexpdk"   "jbexpna"   "jbexevl"  
## [307] "jbexevh"   "jbexevc"   "jbexera"   "jbexecp"   "jbexebs"   "jbexent"  
## [313] "jbexenap"  "jbexeref"  "jbexedk"   "jbexena"   "nobingnd"  "likrisk"  
## [319] "liklead"   "sothnds"   "actcomp"   "mascfel"   "femifel"   "impbemw"  
## [325] "trmedmw"   "trwrkmw"   "trplcmw"   "trmdcnt"   "trwkcnt"   "trplcnt"  
## [331] "eqwrkbg"   "eqpolbg"   "eqmgmbg"   "eqpaybg"   "eqparep"   "eqparlv"  
## [337] "freinsw"   "fineqpy"   "wsekpwr"   "weasoff"   "wlespdm"   "wexashr"  
## [343] "wprtbym"   "wbrgwrm"   "hhmmb"     "gndr"      "gndr2"     "gndr3"    
## [349] "gndr4"     "gndr5"     "gndr6"     "gndr7"     "gndr8"     "gndr9"    
## [355] "gndr10"    "gndr11"    "gndr12"    "yrbrn"     "agea"      "yrbrn2"   
## [361] "yrbrn3"    "yrbrn4"    "yrbrn5"    "yrbrn6"    "yrbrn7"    "yrbrn8"   
## [367] "yrbrn9"    "yrbrn10"   "yrbrn11"   "yrbrn12"   "rshipa2"   "rshipa3"  
## [373] "rshipa4"   "rshipa5"   "rshipa6"   "rshipa7"   "rshipa8"   "rshipa9"  
## [379] "rshipa10"  "rshipa11"  "rshipa12"  "rshpsts"   "rshpsgb"   "lvgptnea" 
## [385] "dvrcdeva"  "marsts"    "marstgb"   "maritalb"  "chldhhe"   "domicil"  
## [391] "paccmoro"  "paccdwlr"  "pacclift"  "paccnbsh"  "paccocrw"  "paccxhoc" 
## [397] "paccnois"  "paccinro"  "paccnt"    "paccref"   "paccdk"    "paccna"   
## [403] "edulvlb"   "eisced"    "edlveat"   "edlvebe"   "edlvehr"   "edlvgcy"  
## [409] "edlvdfi"   "edlvdfr"   "edudde1"   "educde2"   "edlvegr"   "edlvdahu" 
## [415] "edlvdis"   "edlvdie"   "edlvfit"   "edlvdlt"   "edlvenl"   "edlveno"  
## [421] "edlvipl"   "edlvept"   "edlvdrs"   "edlvdsk"   "edlvesi"   "edlvies"  
## [427] "edlvdse"   "edlvdch"   "educgb1"   "edubgb2"   "edagegb"   "eduyrs"   
## [433] "pdwrk"     "edctn"     "uempla"    "uempli"    "dsbld"     "rtrd"     
## [439] "cmsrv"     "hswrk"     "dngoth"    "dngref"    "dngdk"     "dngna"    
## [445] "mainact"   "mnactic"   "crpdwk"    "pdjobev"   "pdjobyr"   "emplrel"  
## [451] "emplno"    "wrkctra"   "estsz"     "jbspv"     "njbspv"    "wkdcorga" 
## [457] "iorgact"   "wkhct"     "wkhtot"    "nacer2"    "tporgwk"   "isco08"   
## [463] "wrkac6m"   "uemp3m"    "uemp12m"   "uemp5yr"   "mbtru"     "hincsrca" 
## [469] "hinctnta"  "hincfel"   "edulvlpb"  "eiscedp"   "edlvpfat"  "edlvpebe" 
## [475] "edlvpehr"  "edlvpgcy"  "edlvpdfi"  "edlvpdfr"  "edupdde1"  "edupcde2" 
## [481] "edlvpegr"  "edlvpdahu" "edlvpdis"  "edlvpdie"  "edlvpfit"  "edlvpdlt" 
## [487] "edlvpenl"  "edlvpeno"  "edlvphpl"  "edlvpept"  "edlvpdrs"  "edlvpdsk" 
## [493] "edlvpesi"  "edlvphes"  "edlvpdse"  "edlvpdch"  "edupcgb1"  "edupbgb2" 
## [499] "edagepgb"  "pdwrkp"    "edctnp"    "uemplap"   "uemplip"   "dsbldp"   
## [505] "rtrdp"     "cmsrvp"    "hswrkp"    "dngothp"   "dngdkp"    "dngnapp"  
## [511] "dngrefp"   "dngnap"    "mnactp"    "crpdwkp"   "isco08p"   "emprelp"  
## [517] "wkhtotp"   "edulvlfb"  "eiscedf"   "edlvfeat"  "edlvfebe"  "edlvfehr" 
## [523] "edlvfgcy"  "edlvfdfi"  "edlvfdfr"  "edufcde1"  "edufbde2"  "edlvfegr" 
## [529] "edlvfdahu" "edlvfdis"  "edlvfdie"  "edlvffit"  "edlvfdlt"  "edlvfenl" 
## [535] "edlvfeno"  "edlvfgpl"  "edlvfept"  "edlvfdrs"  "edlvfdsk"  "edlvfesi" 
## [541] "edlvfges"  "edlvfdse"  "edlvfdch"  "edufcgb1"  "edufbgb2"  "edagefgb" 
## [547] "emprf14"   "occf14b"   "edulvlmb"  "eiscedm"   "edlvmeat"  "edlvmebe" 
## [553] "edlvmehr"  "edlvmgcy"  "edlvmdfi"  "edlvmdfr"  "edumcde1"  "edumbde2" 
## [559] "edlvmegr"  "edlvmdahu" "edlvmdis"  "edlvmdie"  "edlvmfit"  "edlvmdlt" 
## [565] "edlvmenl"  "edlvmeno"  "edlvmgpl"  "edlvmept"  "edlvmdrs"  "edlvmdsk" 
## [571] "edlvmesi"  "edlvmges"  "edlvmdse"  "edlvmdch"  "edumcgb1"  "edumbgb2" 
## [577] "edagemgb"  "emprm14"   "occm14b"   "atncrse"   "anctrya1"  "anctrya2" 
## [583] "regunit"   "region"    "ipcrtiva"  "impricha"  "ipeqopta"  "ipshabta" 
## [589] "impsafea"  "impdiffa"  "ipfrulea"  "ipudrsta"  "ipmodsta"  "ipgdtima" 
## [595] "impfreea"  "iphlppla"  "ipsucesa"  "ipstrgva"  "ipadvnta"  "ipbhprpa" 
## [601] "iprspota"  "iplylfra"  "impenva"   "imptrada"  "impfuna"   "testji1"  
## [607] "testji2"   "testji3"   "testji4"   "testji5"   "testji6"   "testji7"  
## [613] "testji8"   "testji9"   "respc19a"  "symtc19"   "symtnc19"  "vacc19"   
## [619] "recon"     "inwds"     "ainws"     "ainwe"     "binwe"     "cinwe"    
## [625] "dinwe"     "einwe"     "finwe"     "hinwe"     "iinwe"     "kinwe"    
## [631] "rinwe"     "inwde"     "jinws"     "jinwe"     "inwtm"     "mode"     
## [637] "domain"    "prob"      "stratum"   "psu"
vnames = c("fltdpr", "flteeff", "slprl", "wrhpp", "fltlnl", "enjlf", "fltsd", "cldgng")
likert_df = df[,vnames]

#Nur UK Daten

#df_uk = df[df$cntry == "United Kingdom", ]
# check

#df_uk$depression = rowSums(df_uk[, c("d20", "d21", "d22", "d23", "d24", "d25", "d26", "d27")]) / 8

#Likert Scale

likert_table = likert(likert_df)$results 
likert_numeric_df = as.data.frame(lapply((df[,vnames]), as.numeric))
likert_table$Mean = unlist(lapply((likert_numeric_df[,vnames]), mean, na.rm=T)) 
# ... and append new columns to the data frame
likert_table$Count = unlist(lapply((likert_numeric_df[,vnames]), function (x) sum(!is.na(x))))
likert_table$Item = c(
  d20="how much of the time during the past week you felt depressed?",
  d21="…you felt that everything you did was an effort?",
  d22="…your sleep was restless?",
  d23="…you were happy?",
  d24="…you felt lonely?",
  d25="…you enjoyed life?",
  d26="…you felt sad?",
  d27="…you could not get going?")
likert_table
##                                                            Item
## 1 how much of the time during the past week you felt depressed?
## 2              …you felt that everything you did was an effort?
## 3                                     …your sleep was restless?
## 4                                              …you were happy?
## 5                                             …you felt lonely?
## 6                                            …you enjoyed life?
## 7                                                …you felt sad?
## 8                                     …you could not get going?
##   None or almost none of the time Some of the time Most of the time
## 1                       64.915835         29.06631         4.557165
## 2                       48.395568         38.42383         9.814171
## 3                       43.873854         39.87056        11.625059
## 4                        4.003510         23.53973        48.886939
## 5                       68.136458         24.27532         5.302253
## 6                        5.338783         24.82572        44.804153
## 7                       52.489933         41.07451         4.859808
## 8                       55.673484         36.10353         6.217928
##   All or almost all of the time     Mean Count
## 1                      1.460694 1.425627 39981
## 2                      3.366431 1.681515 39983
## 3                      4.630532 1.770123 40017
## 4                     23.569817 2.920231 39890
## 5                      2.285972 1.417377 39983
## 6                     25.031346 2.895281 39878
## 7                      1.575748 1.555214 39981
## 8                      2.005056 1.545546 39949
# round all percentage values to 1 decimal digit
likert_table[,2:6] = round(likert_table[,2:6],1)
# round means to 3 decimal digits
likert_table[,7] = round(likert_table[,7],3)

# create formatted table
kable_styling(kable(likert_table,
                    format="html",
                    caption = "Distribution of answers regarding same sex partnerships (ESS round 11, all countries)"
                    )
              )
Distribution of answers regarding same sex partnerships (ESS round 11, all countries)
Item None or almost none of the time Some of the time Most of the time All or almost all of the time Mean Count
how much of the time during the past week you felt depressed? 64.9 29.1 4.6 1.5 1.4 39981
…you felt that everything you did was an effort? 48.4 38.4 9.8 3.4 1.7 39983
…your sleep was restless? 43.9 39.9 11.6 4.6 1.8 40017
…you were happy? 4.0 23.5 48.9 23.6 2.9 39890
…you felt lonely? 68.1 24.3 5.3 2.3 1.4 39983
…you enjoyed life? 5.3 24.8 44.8 25.0 2.9 39878
…you felt sad? 52.5 41.1 4.9 1.6 1.6 39981
…you could not get going? 55.7 36.1 6.2 2.0 1.5 39949
# create basic plot (code also valid)
plot(likert(summary=likert_table[,1:6])) # limit to columns 1:6 to skip mean and count


Furthermore we looked at the frequency distribution of Depression in the UK. We also identified the Mean Depression Score in the UK. The mean is 1.73.


library(kableExtra)
library(knitr)
# check further (frequency table)
table(df_uk$depression)
## 
##     1 1.125  1.25 1.375   1.5 1.625  1.75 1.875     2 2.125  2.25 2.375   2.5 
##   103    98   172   201   167   158   146   144    94    78    55    43    34 
## 2.625  2.75 2.875     3 3.125  3.25 3.375   3.5 3.625  3.75 3.875     4 
##    35    27    14    15    11    11     9     9     1     3     3     4
table_dep=data.frame(table(df_uk$depression))



#kable(table_dep,
      #col.names = c("Depression Score","Frequency"),
      #caption = "Frequency Distribution of Depressionscores in the UK")

#kable_styling(
 # kable(table_dep,
     # col.names = c("Depression Score","Frequency"),
      #caption = "Frequency Distribution of Depressionscores in the UK"
      #),full_width = F, font_size = 13, bootstrap_options = c("hover", #"condensed"))

scroll_box(
  kable_styling(
  kable(table_dep, col.names = c("Depression Score","Frequency"),
      caption = "Frequency Distribution of Depressionscores in the UK"
      ),full_width = F, font_size = 13, bootstrap_options = c("hover", "condensed")),height="300px")
Frequency Distribution of Depressionscores in the UK
Depression Score Frequency
1 103
1.125 98
1.25 172
1.375 201
1.5 167
1.625 158
1.75 146
1.875 144
2 94
2.125 78
2.25 55
2.375 43
2.5 34
2.625 35
2.75 27
2.875 14
3 15
3.125 11
3.25 11
3.375 9
3.5 9
3.625 1
3.75 3
3.875 3
4 4

table_dep=data.frame(table(df_uk$depression))

# frequency distribution of the new variable (depression)
# interpretation:
# min. is 1, max. is 4
# we have at least one individual who answered all items by 1 (lowest possible depression level) and at least on individual who answered all answers by 4 (highest possible depression level)
# most participants report low to moderate depression:
# median (1.625) and mean (1.730) are relatively low, indicating that most participants fall on the lower half of the depression scale (1 to 2 = 1283 participants - see below)
# only a few participants report higher to high levels of the depression scale (> 2 to 4 = 352 participants - see below)
# median is higher than the mean - right skew
# but missing data (49 NA's)
### just for a further check:
# counting participants with depression scores between 1 and 2
# counting participants with depression scores > 2 (up to 4)
# store the frequency table uk - depression in a new variable
depression_table_uk = table(df_uk$depression)
depression_table_uk 
## 
##     1 1.125  1.25 1.375   1.5 1.625  1.75 1.875     2 2.125  2.25 2.375   2.5 
##   103    98   172   201   167   158   146   144    94    78    55    43    34 
## 2.625  2.75 2.875     3 3.125  3.25 3.375   3.5 3.625  3.75 3.875     4 
##    35    27    14    15    11    11     9     9     1     3     3     4
# print
# sum of participants between 1 and 2 (inclusive)
depression_scale_1_to_2 = sum(depression_table_uk[names(depression_table_uk) >= 1 & names(depression_table_uk) <= 2])
depression_scale_1_to_2 # print
## [1] 1283
# sum of participants > 2 (up to 4)
depression_scale_gt2 = sum(depression_table_uk[names(depression_table_uk) > 2])
depression_scale_gt2 # print
## [1] 352
# double-check
sum(1283, 352) # 1635 participants (uk - depression), excluding 49 NA's
## [1] 1635
# HYPOTHESIS BUIDLING
# determinants of depression
# variables:
# dscrsex: discrimination based on respondent's sexuality
# dscrrce: discrimination based on respondent's colour and race
# agea: age of respondent
# gndr: gender of respondent (male, female)
# hypothesis (all referring to the United Kingdom)
# H1: prevalence of depression increases with experienced discrimination based on an individual's sexuality
# H2: prevalence of depression increases with experienced discrimination based on an individual's skin colour or race
# H3: prevalence of depression decreases with age 
# H4: prevalence of depression among females compared to males is higher


# BIVARIATE ANALYSIS AND OPERATIONALIZATION (check these hypotheses on a bivariate level )
# hypothesis 1: prevalence of depression increases with experienced discrimination (sexuality; UK)
by(df_uk$depression, df_uk$dscrsex, mean, na.rm=T)
## df_uk$dscrsex: Not marked
## [1] 1.724875
## ------------------------------------------------------------ 
## df_uk$dscrsex: Marked
## [1] 1.927632
means_df=data.frame (by(df_uk$depression, df_uk$dscrsex, mean, na.rm=T, weights=pspwght))

#means_df

#kable(means_df)
Depression score related to Sexuality
Gay or Straight Average Depression Score
Not marked 1.724875
Marked 1.927632
#model = lm(depression ~ dscrsex + dscrrce + age + female, data=df_uk,weights=pspwght)

#model = lm(depression ~ dscrsex + dscrrce + age + female, data=df_uk)

Discussion

Our results mirror the results in other papers. For example that LGTBQ+ people are more likely to suffer from depression than straight people. The United Kingdom Survey on the Mental Health of LGBTQ+ (2024), highlighted that problem before us and claimed that victimization, discrimination, and lack of access to affirming spaces result in poorer mental health status. With our data we can confirm those findings.

As well as our findings that different skin colour contributes to higher depression scores than white people, could be linked to higher rates of discrimination, victimization and lack of affirming spaces. According to ”Stop Hate UK” a help organization against hate crime in the UK, 43% of all hate crimes reported to their helpline were because of racism. This could result from the historical legacy of Colonialism and Empire, where racism is deeply rooted in. Another possible explanation could be the Lack of Representation, Ethnic minorities are underrepresented in positions of power across politics, media, and business.

Our results concerning the correlation between age and depression showed little to none significance. Age does not seem to have an influence on depression scores. The slight negative correlation could be interpreted that with age resilience rises and that people are more settled to stand against depression.

The gender gap between men and women continues with depression scores. We found a significant difference in depression scores between men and women. Possible explanations for these findings could be the higher strain women face in our society. From poorer payment, responsibility at home and parenting.

Nevertheless our Regression Analysis showed little impact of sexuality and gender on depression. Therefore further research is needed to identify bigger drivers of depression. According to the “Mental Health Foundation, UK”- “People living in the lowest socioeconomic groups are more likely to experience common mental health problems such as depression and anxiety.”-. Loneliness is another strong driver of depression, especially in elderly people (Sheffield Hallam University, 2025). Furthermore a lack of access and inequalities in health care services in the UK account for higher depression rates (Royal College of Psychiatrist, 2025). These variables could be more dominant when looking at determinants of depression as well as exercise, food and lifestyle choices. Further research has to be done to verify these associations.

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.