1. Study background

a. Goal of the study

This research project is based on the umbrella project “Pandemic Emergency in Social Perspective. Evidence from a large Web-survey research”, designed and organized by principal investigators Linda Lombi (Università Cattolica del Sacro Cuore, Milan) and Marco Terraneo (Università Bicocca-Milano).

The principal goal of the international cross-sectional study is to explore the predictors of depression within the European context of the Covid-19 pandemic, specifically during the lockdown and social distancing period of March-April 2020.

Our team has decided to primarily focus on the impact of modifiable behavioral/lifestyle factors, such as exercise, alcohol and tobacco consumption, but, also, the usage of social media as a source of information about the pandemic. Our intention is to create and validate a depression model that these literature-based predictors should predict. Furthermore, we intend to explore the indirect pathway between social media consumption and depression mediated by the level of anxiety.

Supplementary data for this project, such as the survey questionnaire, original dataset and are accessible in our Open Science Framework repository.

b. Sampling

Given the rapidly-developing nature of the Covid-19 pandemic, the principal research team (Lombi & Terraneo) chose a convenience sample, recruited through Facebook national groups using a snowballing technique. The goal was to collect at least 1000 responses per country.

The data collection has been conducted between March-April 2020 in the following eight countries: Italy, France, Germany, Spain, United Kingdom, Sweden, Poland, Czech Republic and were conducted by the members of the respective national teams (please see the research protocol in the OSF repository.

This relatively non-random sampling is likely to result in a non-representative sample for the national populations. This is one of the limitations of this research and is reflected in the “data collection and sampling” part of the research protocol outlined by Linda Lombi and Marco Terraneo.

This approach, therefore, does not aim to compare country-samples, but, rather, to compare segments of the national samples, with a particular focus on the vulnerable social groups, determined by socio-demographic, lifestyle professional and living condition aspects.

c. Analysis plan

In order to comply with the principles of Open Science, we intend to split our analysis to two parts.

  1. Within the first part, we test the literature-derived hypotheses on the Czech sample (n=1484) of the international study and develop models. We also explore the dataset (here referred to as COV19_05_agroup.sav) inductively and consider the formulation of additional hypotheses for other predictors that might have been missed before the beginning of the study. To lower the chance of overfitting, we only consider the adding additional variables that have an empirical support based on our review of the existing literature. Towards the end of the first part of the project, we pre-register our hypotheses and other key research information (including this reproducible R code) at the OSF Registries. While some of the team members have briefly interacted with the international dataset, they have not been involved in the pre-registration and hypothesis forming process in order to reduce biases by separating the exploratory and confirmatory phases of the research.
  2. In the second we will access the international dataset, which will include data from all of the countries that gathered at least 1000 responses. We will conduct confirmatory analyses, testing our models on this international sample, from which we will exclude the Czech sub-sample.

d. Core hypotheses

Alternative Hypotheses Variable Literature
H1: Female gender is associated with higher levels of depression. q01 (Salk, Hyde, and Abramson 2017; Kowal et al. 2020; Wang et al. 2020; Luo et al. 2020; González-Sanguino et al. 2020)
H2: Higher age is associated with lower levels of depression. q02 (Kowal et al. 2020; Shevlin et al. 2020; Taylor et al. 2008; Losada-Baltar et al. 2020; González-Sanguino et al. 2020)
H3: People in a relationship experience lower levels of depression. q03 (Kowal et al. 2020; Jacob, Haro, and Koyanagi 2019)
H4: Parenthood is associated with significantly different levels of depression. q04 (Stanca 2012; Shevlin et al. 2020)
H5: Higher education is associated with lower levels of depression. q11 (Kowal et al. 2020; Gloster et al. 2020; Taylor et al. 2008)
H6: Use of social media is associated with higher levels of depression. q18_02 (Bendau et al. 2020; Dhir et al. 2018; Primack et al. 2017)
H7: Physical contact with friends and family is associated with lower levels of depression. q35_01, q35_03 (Gloster et al. 2020; Tull et al. 2020; Luo et al. 2020)
H8: Regular consumption of alcohol and tobacco is associated with higher levels of depression. q38, q40 (Stanton et al. 2020; Awaworyi Churchill and Farrell 2017)
H9: Regular workouts or physical activity are associated with lower levels of depression. q42 (Harvey et al. 2018; Schuch et al. 2016; Kvam et al. 2016; Krogh et al. 2017; Stubbs et al. 2018)
H10: Worse self-rated health quality is associated with higher levels of depression. q47, q48, q47 (Ambresin et al. 2014; Vindegaard and Benros 2020; Hossain et al. 2020)
H11: In addition to H6, we hypothesize an existence of a causal pathway leading from social media exposure to depression, which is mediated by anxiety and moderated by age. q02, q18_02, anxiety_index (Bendau et al. 2020; Rasmussen et al. 2020; Wheaton, Prikhidko, and Messner 2021; Vannucci, Flannery, and Ohannessian 2017; Mertens et al. 2020)

2. Analysis of the Czech sample

a. Loading the dataset, required R packages and data wrangling

The code below can be run in R or in R IDE, such as R Studio. We used R Markdown within the R Studio to compose this report and used the open-source jamovi software (a R GUI) to conduct some of the exploratory analyses.

#The following packages might need to be installed onto your version of R prior to the running of the code below.

library(udpipe)
library(MASS)
library(medmod)
library(lavaan)
library(lavaanPlot)
library(wordcloud)
library(corrplot)
library(tidytext)
library(tidyverse)
library(haven)
library(jmv)

#Package lavaanPlot is currently not available on CRAN, install through devtools::install_github("alishinski/lavaanPlot")

#We load the original Czech dataset (in SPSS format) from a local directory.
data <- haven::read_sav(file = "COV19_05_agroup.sav")

#We also try to limit the decimals to three significant figures
options(digits = 3)
#Firstly, because the source file is an SPSS file, we need to specify that we would like to see value labels (such as Male/Female) for selected variables, as opposed to just numeric values (such as 1/2). This is not essential for the analysis, but seeing the names of labels will enable better understanding of the results.

data <- data %>% 
        mutate(q01 = haven::as_factor(q01)) %>%
        mutate(q03 = haven::as_factor(q03)) %>%
        mutate(q04 = haven::as_factor(q04)) %>%
        mutate(q11 = haven::as_factor(q11)) %>%
        mutate(q38 = haven::as_factor(q38)) %>%
        mutate(q40 = haven::as_factor(q40)) %>%
        mutate(q42 = haven::as_factor(q42)) %>%
        mutate(q47 = haven::as_factor(q47)) %>%
        mutate(q48 = haven::as_factor(q48)) %>%
        mutate(q49 = haven::as_factor(q49)) %>%
        mutate(Q4_AGE_r = haven::as_factor(Q4_AGE_r, ordered = TRUE))

#For convenience, we translate the core variables labels from Czech to English.

levels(data$q01) <- list(female = "Žena", 
                         male = "Muž")
levels(data$q03) <- list(single = "Svobodný/Svobodná", 
                         relationship = "V partnerském vztahu", 
                         married = "Ženatý/Vdaná", 
                         divorced = "Rozvedený/Rozvedená", 
                         widowed = "Vdovec/Vdova")

levels(data$q04) <- list(yes = "Ano", no = "Ne")
levels(data$q04) <- list(yes = "Ano", no = "Ne")

levels(data$q11) <- list(unfin_element = "Nedokončené základní", 
                         element = "Základní vzdělání", 
                         unfin_hs = "Vyučen/a nebo střední bez maturity", 
                         hs = "Středoškolské s maturitou a vyšší odborné",
                         undergrad = "Vysokoškolské (bakalářský stupeň)", 
                         postgrad = "Vysokoškolské (magisterské, doktorské nebo vyšší)")

levels(data$q38) <- list(yes = "Ano", no = "Ne")
levels(data$q40) <- list(yes = "Ano", no = "Ne")
levels(data$q42) <- list(yes = "Ano", no = "Ne")

levels(data$q47) <- list(excellent = "Velmi dobrý",
                         good = "Dobrý", 
                         neutral = "Ani dobrý ani špatný", 
                         bad = "Špatný", 
                         very_bad = "Velmi špatný")

levels(data$q48) <- list(yes = "Ano", no = "Ne")
levels(data$q49) <- list(limits = "Velmi omezuje", 
                         partially_limits = "Částečně omezuje", 
                         no_limits = "Vůbec neomezuje")

#Secondly, we rename key variables to a more human-readable form.

data <- data %>% 
        rename(q01_gender = q01) %>% 
        rename(q02_age = q02) %>%
        rename(q03_relationship_type = q03) %>%
        rename(q04_children = q04) %>%
        rename(q11_education = q11) %>%
        rename(q18_02_soc_media_info = q18_02) %>%
        rename(q35_01_contact_close_family = q35_01) %>%
        rename(q35_03_contact_friends = q35_03) %>%
        rename(q38_alcohol = q38) %>%
        rename(q40_smoking = q40) %>%
        rename(q42_sport = q42) %>%
        rename(q47_self_reporting_health = q47) %>%
        rename(q48_chronic_illness = q48) %>%
        rename(q49_health_limitations = q49) %>%

#Thirdly, we rename variables related to anxiety, which we will use to construct an anxiety index with factor analysis (to use for path analysis afterwards).
  
        rename(q30_anxiety_infection_covid = q30) %>%
        rename(q31_anxiety_infection_friends = q31) %>%
        rename(q33_01_anxiety_situation = q33_01) %>%
        rename(q33_02_anxiety_low_control = q33_02) %>%
        rename(q33_03_anxiety_survival_covid = q33_03) %>%
        rename(q33_04_anxiety_change_employment = q33_04) %>%
        rename(q33_05_anxiety_infecting_others = q33_05) 

#Finally, we create dummy variable for social media as a source of information by replacing NA values. We also assign it appropriate factor levels

data$q18_02_soc_media_info[is.na(data$q18_02_soc_media_info)] <- 0

data <- data %>% 
        mutate(q18_02_soc_media_info = haven::as_factor(q18_02_soc_media_info, ordered = TRUE))

levels(data$q18_02_soc_media_info) <- list(yes = "Sociální média", no = "0")

b. Sample descriptive statistics: Depression index (PHQ8)

The PHQ-8 dependent variable intend to determine the presence and severity of major depressive disorder. The PHQ-8 construction is standardized and based on the established methodology (Kroenke et al. 2009). The PHQ-8 questionnaire asks the number of days in the past 2 weeks the respondent had experienced a specific depressive symptom.

This variable was recoded by the international team from 8 survey items (see the OSF project page for the precise syntax) and is thus already present in the version of this dataset.

#To summarize the dependent continuous variable, we use the descriptives() function from the jmv package.

jmv::descriptives(
    data = data,
    vars = "PHQ8",
    freq = TRUE,
    box = TRUE,
    median = FALSE,
    range = TRUE,
    se = TRUE, 
    quart = TRUE)
## 
##  DESCRIPTIVES
## 
##  Descriptives                 
##  ──────────────────────────── 
##                       PHQ8    
##  ──────────────────────────── 
##    N                   1484   
##    Missing                0   
##    Mean                4.71   
##    Std. error mean    0.120   
##    Range               24.0   
##    Minimum             0.00   
##    Maximum             24.0   
##    25th percentile     1.00   
##    50th percentile     3.00   
##    75th percentile     7.00   
##  ────────────────────────────

c. Sample descriptive statistics: Demographic characteristics (Czech sample)

In the next step, we asses the demographic characteristics of the respondents in the Czech sample.

#To summarize the key demographic variables, we use the descriptives() function from the jmv package.

jmv::descriptives(
    data = data,
    vars = vars("q01_gender",
                "Q4_AGE_r",
                "q03_relationship_type",
                "q04_children",
                "q11_education"),
    bar = TRUE,
    freq = TRUE,
    missing = FALSE,
    mean = FALSE,
    median = FALSE,
    sd = FALSE,
    min = FALSE,
    max = FALSE)
## 
##  DESCRIPTIVES
## 
##  Descriptives                                                                              
##  ───────────────────────────────────────────────────────────────────────────────────────── 
##         q01_gender    Q4_AGE_r    q03_relationship_type    q04_children    q11_education   
##  ───────────────────────────────────────────────────────────────────────────────────────── 
##    N          1484        1484                     1484            1484             1484   
##  ───────────────────────────────────────────────────────────────────────────────────────── 
## 
## 
##  FREQUENCIES
## 
##  Frequencies of q01_gender                          
##  ────────────────────────────────────────────────── 
##    Levels    Counts    % of Total    Cumulative %   
##  ────────────────────────────────────────────────── 
##    female      1054          71.0            71.0   
##    male         430          29.0           100.0   
##  ────────────────────────────────────────────────── 
## 
## 
##  Frequencies of Q4_AGE_r                                 
##  ─────────────────────────────────────────────────────── 
##    Levels         Counts    % of Total    Cumulative %   
##  ─────────────────────────────────────────────────────── 
##    16-29 years       379          25.5            25.5   
##    30-49 years       440          29.6            55.2   
##    50-64 years       206          13.9            69.1   
##    65+               459          30.9           100.0   
##  ─────────────────────────────────────────────────────── 
## 
## 
##  Frequencies of q03_relationship_type                     
##  ──────────────────────────────────────────────────────── 
##    Levels          Counts    % of Total    Cumulative %   
##  ──────────────────────────────────────────────────────── 
##    single             332          22.4            22.4   
##    relationship       283          19.1            41.4   
##    married            586          39.5            80.9   
##    divorced           155          10.4            91.4   
##    widowed            128           8.6           100.0   
##  ──────────────────────────────────────────────────────── 
## 
## 
##  Frequencies of q04_children                        
##  ────────────────────────────────────────────────── 
##    Levels    Counts    % of Total    Cumulative %   
##  ────────────────────────────────────────────────── 
##    yes          937          63.1            63.1   
##    no           547          36.9           100.0   
##  ────────────────────────────────────────────────── 
## 
## 
##  Frequencies of q11_education                              
##  ───────────────────────────────────────────────────────── 
##    Levels           Counts    % of Total    Cumulative %   
##  ───────────────────────────────────────────────────────── 
##    unfin_element         5           0.3             0.3   
##    element             109           7.3             7.7   
##    unfin_hs             74           5.0            12.7   
##    hs                  537          36.2            48.9   
##    undergrad           152          10.2            59.1   
##    postgrad            607          40.9           100.0   
##  ─────────────────────────────────────────────────────────

3. Building regression model to predict PHQ8

After descriptive statistics, we continue with building and fitting of the regression model based on our hypotheses.

The model has one independent continuous variable - PHQ8. The only other continuous variable in the model is q02_age, which is inputted as a covariate. The rest of the variables are either categorical (both nominal and ordinal) or binary. The linreg() function from the jmv package automatically handles them as dummy variables with reference levels and it is thus not necessary to create further dummy variables prior to this analysis.

a. Overview of correlations between individual predictors and outcome

As a first step in the regression model creation, we conduct a correlation analysis. Since we do not presume linearity between all of the variables, we use Spearman’s rank coefficient instead of Pearson’s r. The results below need to be interpreted with caution, since some of the variables are categorical (such as q03_relationship_type), without a defined order. For categorical variables, comparisons using Chi-Square test would be more appropriate, however, in this step, we are primarily looking at the relationship between the outcome (PHQ8) and the theorized predictors.

#While the dataset has been already imported, the values of factor variables were changed from numerics to text strings, therefore that dataset is unsuitable for correlation analysis. To solve this, we create a parallel dataset, again renaming the key variables to a more understandable form.

data_corr <- read_sav(file = "COV19_05_agroup.sav")
options(digits = 3)

data_corr <- data_corr %>% 
              rename(q01_gender = q01) %>% 
              rename(q02_age = q02) %>% 
              rename(q03_relationship_type = q03) %>% 
              rename(q04_children = q04) %>% 
              rename(q11_education = q11) %>% 
              rename(q18_02_soc_media_info = q18_02) %>% 
              rename(q35_01_contact_close_family = q35_01) %>% 
              rename(q35_03_contact_friends = q35_03) %>% 
              rename(q38_alcohol = q38) %>% 
              rename(q40_smoking = q40) %>% 
              rename(q42_sport = q42) %>% 
              rename(q47_self_reporting_health = q47) %>% 
              rename(q48_chronic_illness = q48) %>% 
              rename(q49_health_limitations = q49)

data_corr$q18_02_soc_media_info[is.na(data_corr$q18_02_soc_media_info)] <- 0

#Dataset simplification to only the variables specified with hypotheses

data_vars <- c("PHQ8", 
               "q02_age",
               "q01_gender", 
               "q04_children", 
               "q42_sport", 
               "q40_smoking", 
               "q38_alcohol", 
               "q35_01_contact_close_family", 
               "q35_03_contact_friends", 
               "q18_02_soc_media_info", 
               "q03_relationship_type", 
               "q47_self_reporting_health", 
               "q49_health_limitations", 
               "q11_education", 
               "q48_chronic_illness")

data_corr <- data_corr[data_vars]

#SPEARMAN CORRELATION
corr_spearman <- cor(data_corr, method = "spearman", use = "complete.obs")

corrplot(corr_spearman, method = "color")

print(corr_spearman)
##                                PHQ8 q02_age q01_gender q04_children q42_sport
## PHQ8                         1.0000 -0.3125   -0.08050       0.2598    0.0272
## q02_age                     -0.3125  1.0000   -0.12945      -0.6552    0.1679
## q01_gender                  -0.0805 -0.1295    1.00000       0.1555   -0.0382
## q04_children                 0.2598 -0.6552    0.15555       1.0000   -0.1219
## q42_sport                    0.0272  0.1679   -0.03822      -0.1219    1.0000
## q40_smoking                 -0.0734  0.0779   -0.00954      -0.0545   -0.1106
## q38_alcohol                 -0.0390  0.1416   -0.15814      -0.1365    0.0938
## q35_01_contact_close_family  0.1016 -0.3148    0.11691       0.1797   -0.0775
## q35_03_contact_friends       0.0397 -0.0648    0.07751       0.0944    0.0303
## q18_02_soc_media_info        0.1886 -0.3475    0.00616       0.2114   -0.0165
## q03_relationship_type       -0.2103  0.7162   -0.20108      -0.6772    0.1122
## q47_self_reporting_health    0.1845  0.2575   -0.00484      -0.1461    0.2626
## q49_health_limitations      -0.1448 -0.2395    0.00610       0.1123   -0.1607
## q11_education               -0.1286  0.2393   -0.03178      -0.2322   -0.1017
## q48_chronic_illness         -0.0835 -0.2811    0.03011       0.1528   -0.1617
##                             q40_smoking q38_alcohol q35_01_contact_close_family
## PHQ8                           -0.07337     -0.0390                      0.1016
## q02_age                         0.07788      0.1416                     -0.3148
## q01_gender                     -0.00954     -0.1581                      0.1169
## q04_children                   -0.05446     -0.1365                      0.1797
## q42_sport                      -0.11059      0.0938                     -0.0775
## q40_smoking                     1.00000      0.0826                     -0.0301
## q38_alcohol                     0.08264      1.0000                     -0.0661
## q35_01_contact_close_family    -0.03008     -0.0661                      1.0000
## q35_03_contact_friends         -0.09691      0.0180                      0.1312
## q18_02_soc_media_info          -0.10582     -0.0246                      0.0778
## q03_relationship_type           0.07538      0.1632                     -0.2498
## q47_self_reporting_health      -0.04259      0.1538                     -0.0655
## q49_health_limitations         -0.03849     -0.1438                      0.0903
## q11_education                   0.08480     -0.1065                     -0.0804
## q48_chronic_illness            -0.06276     -0.0881                      0.0947
##                             q35_03_contact_friends q18_02_soc_media_info
## PHQ8                                        0.0397               0.18859
## q02_age                                    -0.0648              -0.34752
## q01_gender                                  0.0775               0.00616
## q04_children                                0.0944               0.21142
## q42_sport                                   0.0303              -0.01654
## q40_smoking                                -0.0969              -0.10582
## q38_alcohol                                 0.0180              -0.02457
## q35_01_contact_close_family                 0.1312               0.07776
## q35_03_contact_friends                      1.0000               0.07890
## q18_02_soc_media_info                       0.0789               1.00000
## q03_relationship_type                      -0.0746              -0.23494
## q47_self_reporting_health                  -0.0116              -0.06681
## q49_health_limitations                      0.0134               0.05345
## q11_education                              -0.0759              -0.12047
## q48_chronic_illness                         0.0166               0.08028
##                             q03_relationship_type q47_self_reporting_health
## PHQ8                                      -0.2103                   0.18453
## q02_age                                    0.7162                   0.25751
## q01_gender                                -0.2011                  -0.00484
## q04_children                              -0.6772                  -0.14615
## q42_sport                                  0.1122                   0.26260
## q40_smoking                                0.0754                  -0.04259
## q38_alcohol                                0.1632                   0.15378
## q35_01_contact_close_family               -0.2498                  -0.06555
## q35_03_contact_friends                    -0.0746                  -0.01156
## q18_02_soc_media_info                     -0.2349                  -0.06681
## q03_relationship_type                      1.0000                   0.19053
## q47_self_reporting_health                  0.1905                   1.00000
## q49_health_limitations                    -0.2078                  -0.46591
## q11_education                              0.1888                  -0.09659
## q48_chronic_illness                       -0.2113                  -0.43942
##                             q49_health_limitations q11_education
## PHQ8                                       -0.1448      -0.12859
## q02_age                                    -0.2395       0.23927
## q01_gender                                  0.0061      -0.03178
## q04_children                                0.1123      -0.23216
## q42_sport                                  -0.1607      -0.10165
## q40_smoking                                -0.0385       0.08480
## q38_alcohol                                -0.1438      -0.10647
## q35_01_contact_close_family                 0.0903      -0.08044
## q35_03_contact_friends                      0.0134      -0.07589
## q18_02_soc_media_info                       0.0535      -0.12047
## q03_relationship_type                      -0.2078       0.18877
## q47_self_reporting_health                  -0.4659      -0.09659
## q49_health_limitations                      1.0000       0.04214
## q11_education                               0.0421       1.00000
## q48_chronic_illness                         0.4639      -0.00365
##                             q48_chronic_illness
## PHQ8                                   -0.08345
## q02_age                                -0.28108
## q01_gender                              0.03011
## q04_children                            0.15278
## q42_sport                              -0.16171
## q40_smoking                            -0.06276
## q38_alcohol                            -0.08812
## q35_01_contact_close_family             0.09473
## q35_03_contact_friends                  0.01659
## q18_02_soc_media_info                   0.08028
## q03_relationship_type                  -0.21127
## q47_self_reporting_health              -0.43942
## q49_health_limitations                  0.46390
## q11_education                          -0.00365
## q48_chronic_illness                     1.00000

b. Theory derived, inductively built regression model

In the first set of models, we avoid potentially biased modifications, such as pairwise comparisons, which could lead to overfitting. Instead, we build five successive models in total (“blocks” in the syntax).

First model (from the set of 5) uses only the demographic characteristics as predictors. Second model add the effect of the social media consumption. Third model adds lifestyle variables, such as alcohol, smoking, sport and social contacts. The fourth model further adds the variables related to self-rated health quality. Finally, the fifth model controls for the age by adding it as a covariate. The performance of each model could be seen in the output below.

jmv::linReg(
    data = data,
    dep = "PHQ8",
    covs = "q02_age",
    factors = vars("q01_gender", 
                   "q04_children", 
                   "q42_sport", 
                   "q40_smoking", 
                   "q38_alcohol", 
                   "q35_01_contact_close_family", 
                   "q35_03_contact_friends", 
                   "q18_02_soc_media_info", 
                   "q03_relationship_type", 
                   "q47_self_reporting_health", 
                   "q49_health_limitations", 
                   "q11_education", 
                   "q48_chronic_illness"),
    blocks = list(
        list(
            "q01_gender",
            "q03_relationship_type",
            "q04_children",
            "q11_education"),
        list(
            "q18_02_soc_media_info"),
        list(
            "q40_smoking",
            "q42_sport",
            "q38_alcohol",
            "q35_01_contact_close_family",
            "q35_03_contact_friends"),
        list(
            "q47_self_reporting_health",
            "q48_chronic_illness",
            "q49_health_limitations"),
        list(
            "q02_age")),
    refLevels = list(
        list(
            var="q01_gender",
            ref="female"),
        list(
            var="q04_children",
            ref="no"),
        list(
            var="q42_sport",
            ref="no"),
        list(
            var="q40_smoking",
            ref="yes"),
        list(
            var="q38_alcohol",
            ref="yes"),
        list(
            var="q35_01_contact_close_family",
            ref="1"),
        list(
            var="q35_03_contact_friends",
            ref="1"),
        list(
            var="q18_02_soc_media_info",
            ref="yes"),
        list(
            var="q03_relationship_type",
            ref="single"),
        list(
            var="q47_self_reporting_health",
            ref="very_bad"),
        list(
            var="q49_health_limitations",
            ref="limits"),
        list(
            var="q11_education",
            ref="unfin_element"),
        list(
            var="q48_chronic_illness",
            ref="yes")),
    r2Adj = TRUE,
    aic = TRUE,
    bic = TRUE,
    rmse = TRUE,
    modelTest = TRUE,
    anova = TRUE,
    ci = TRUE,
    stdEst = TRUE,
    ciStdEst = TRUE,
    durbin = TRUE,
    collin = TRUE)
## 
##  LINEAR REGRESSION
## 
##  Model Fit Measures                                                                                    
##  ───────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Model    R        R²        Adjusted R²    AIC     BIC     RMSE    F        df1    df2     p        
##  ───────────────────────────────────────────────────────────────────────────────────────────────────── 
##        1    0.297    0.0880         0.0811    8518    8587    4.42    12.73     11    1450    < .001   
##        2    0.320    0.1022         0.0948    8497    8571    4.38    13.75     12    1449    < .001   
##        3    0.336    0.1132         0.1015    8493    8604    4.35     9.69     19    1442    < .001   
##        4    0.446    0.1989         0.1844    8358    8507    4.14    13.71     26    1435    < .001   
##        5    0.484    0.2346         0.2202    8294    8447    4.05    16.28     27    1434    < .001   
##  ───────────────────────────────────────────────────────────────────────────────────────────────────── 
## 
## 
##  Model Comparisons                                                   
##  ─────────────────────────────────────────────────────────────────── 
##    Model         Model    ΔR²       F        df1    df2     p        
##  ─────────────────────────────────────────────────────────────────── 
##        1    -        2    0.0142    22.89      1    1449    < .001   
##        2    -        3    0.0110     2.55      7    1442     0.013   
##        3    -        4    0.0857    21.93      7    1435    < .001   
##        4    -        5    0.0357    66.88      1    1434    < .001   
##  ─────────────────────────────────────────────────────────────────── 
## 
## 
##  MODEL SPECIFIC RESULTS
## 
##  MODEL 1
## 
##  Omnibus ANOVA Test                                                                    
##  ───────────────────────────────────────────────────────────────────────────────────── 
##                             Sum of Squares    df      Mean Square    F        p        
##  ───────────────────────────────────────────────────────────────────────────────────── 
##    q01_gender                          332       1          331.8    16.87    < .001   
##    q03_relationship_type               167       4           41.8     2.13     0.075   
##    q04_children                        362       1          362.0    18.41    < .001   
##    q11_education                       246       5           49.2     2.50     0.029   
##    Residuals                         28515    1450           19.7                      
##  ───────────────────────────────────────────────────────────────────────────────────── 
##    Note. Type 3 sum of squares
## 
## 
##  Model Coefficients - PHQ8                                                                                                           
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Predictor                      Estimate    SE       Lower    Upper     t         p         Stand. Estimate    Lower     Upper     
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Intercept                 ᵃ       6.008    2.008     2.07     9.947     2.993     0.003                                           
##    q01_gender:                                                                                                                       
##    male – female                    -1.096    0.267    -1.62    -0.573    -4.108    < .001            -0.2370    -0.350    -0.1238   
##    q03_relationship_type:                                                                                                            
##    relationship – single            -0.612    0.384    -1.37     0.142    -1.593     0.111            -0.1323    -0.295     0.0306   
##    married – single                 -1.141    0.443    -2.01    -0.272    -2.576     0.010            -0.2467    -0.435    -0.0588   
##    divorced – single                -0.781    0.542    -1.84     0.282    -1.442     0.150            -0.1688    -0.399     0.0609   
##    widowed – single                 -1.423    0.558    -2.52    -0.328    -2.550     0.011            -0.3076    -0.544    -0.0710   
##    q04_children:                                                                                                                     
##    yes – no                         -1.572    0.366    -2.29    -0.853    -4.290    < .001            -0.3399    -0.495    -0.1845   
##    q11_education:                                                                                                                    
##    element – unfin_element           2.058    2.037    -1.94     6.053     1.011     0.312             0.4449    -0.419     1.3085   
##    unfin_hs – unfin_element          1.155    2.058    -2.88     5.191     0.561     0.575             0.2496    -0.623     1.1221   
##    hs – unfin_element                0.871    1.996    -3.05     4.787     0.436     0.663             0.1882    -0.658     1.0347   
##    undergrad – unfin_element         0.952    2.020    -3.01     4.915     0.471     0.637             0.2058    -0.651     1.0624   
##    postgrad – unfin_element          0.387    1.994    -3.52     4.297     0.194     0.846             0.0836    -0.762     0.9289   
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    ᵃ Represents reference level
## 
## 
##  ASSUMPTION CHECKS
## 
##  Durbin–Watson Test for Autocorrelation       
##  ──────────────────────────────────────────── 
##    Autocorrelation    DW Statistic    p       
##  ──────────────────────────────────────────── 
##             0.0456            1.91    0.062   
##  ──────────────────────────────────────────── 
## 
## 
##  Collinearity Statistics                        
##  ────────────────────────────────────────────── 
##                             VIF     Tolerance   
##  ────────────────────────────────────────────── 
##    q01_gender               1.05        0.956   
##    q03_relationship_type    1.12        0.891   
##    q04_children             1.52        0.656   
##    q11_education            1.03        0.971   
##  ────────────────────────────────────────────── 
## 
## 
##  MODEL 2
## 
##  Omnibus ANOVA Test                                                                    
##  ───────────────────────────────────────────────────────────────────────────────────── 
##                             Sum of Squares    df      Mean Square    F        p        
##  ───────────────────────────────────────────────────────────────────────────────────── 
##    q01_gender                          308       1          308.2    15.91    < .001   
##    q03_relationship_type               115       4           28.7     1.48     0.205   
##    q04_children                        321       1          321.1    16.57    < .001   
##    q11_education                       207       5           41.4     2.14     0.059   
##    q18_02_soc_media_info               444       1          443.5    22.89    < .001   
##    Residuals                         28071    1449           19.4                      
##  ───────────────────────────────────────────────────────────────────────────────────── 
##    Note. Type 3 sum of squares
## 
## 
##  Model Coefficients - PHQ8                                                                                                             
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Predictor                      Estimate    SE       Lower    Upper      t         p         Stand. Estimate    Lower     Upper      
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Intercept                 ᵃ       6.614    1.997     2.70    10.5310     3.312    < .001                                            
##    q01_gender:                                                                                                                         
##    male – female                    -1.057    0.265    -1.58    -0.5372    -3.988    < .001             -0.228    -0.341    -0.11611   
##    q03_relationship_type:                                                                                                              
##    relationship – single            -0.680    0.382    -1.43     0.0684    -1.782     0.075             -0.147    -0.309     0.01479   
##    married – single                 -0.975    0.441    -1.84    -0.1095    -2.210     0.027             -0.211    -0.398    -0.02368   
##    divorced – single                -0.670    0.538    -1.73     0.3861    -1.244     0.214             -0.145    -0.373     0.08347   
##    widowed – single                 -1.071    0.559    -2.17     0.0252    -1.916     0.056             -0.231    -0.468     0.00546   
##    q04_children:                                                                                                                       
##    yes – no                         -1.483    0.364    -2.20    -0.7683    -4.071    < .001             -0.321    -0.475    -0.16608   
##    q11_education:                                                                                                                      
##    element – unfin_element           2.164    2.021    -1.80     6.1293     1.070     0.285              0.468    -0.389     1.32490   
##    unfin_hs – unfin_element          1.236    2.042    -2.77     5.2427     0.605     0.545              0.267    -0.599     1.13327   
##    hs – unfin_element                0.998    1.982    -2.89     4.8851     0.504     0.615              0.216    -0.625     1.05596   
##    undergrad – unfin_element         1.062    2.005    -2.87     4.9952     0.529     0.597              0.229    -0.621     1.07976   
##    postgrad – unfin_element          0.599    1.979    -3.28     4.4814     0.303     0.762              0.129    -0.710     0.96870   
##    q18_02_soc_media_info:                                                                                                              
##    no – yes                         -1.282    0.268    -1.81    -0.7563    -4.785    < .001             -0.277    -0.391    -0.16349   
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    ᵃ Represents reference level
## 
## 
##  ASSUMPTION CHECKS
## 
##  Durbin–Watson Test for Autocorrelation       
##  ──────────────────────────────────────────── 
##    Autocorrelation    DW Statistic    p       
##  ──────────────────────────────────────────── 
##             0.0382            1.92    0.120   
##  ──────────────────────────────────────────── 
## 
## 
##  Collinearity Statistics                        
##  ────────────────────────────────────────────── 
##                             VIF     Tolerance   
##  ────────────────────────────────────────────── 
##    q01_gender               1.05        0.955   
##    q03_relationship_type    1.13        0.888   
##    q04_children             1.53        0.655   
##    q11_education            1.03        0.970   
##    q18_02_soc_media_info    1.04        0.958   
##  ────────────────────────────────────────────── 
## 
## 
##  MODEL 3
## 
##  Omnibus ANOVA Test                                                                           
##  ──────────────────────────────────────────────────────────────────────────────────────────── 
##                                   Sum of Squares    df      Mean Square    F         p        
##  ──────────────────────────────────────────────────────────────────────────────────────────── 
##    q01_gender                             347.64       1         347.64    18.079    < .001   
##    q03_relationship_type                  101.47       4          25.37     1.319     0.261   
##    q04_children                           321.13       1         321.13    16.700    < .001   
##    q11_education                          162.04       5          32.41     1.685     0.135   
##    q18_02_soc_media_info                  400.55       1         400.55    20.831    < .001   
##    q40_smoking                             47.46       1          47.46     2.468     0.116   
##    q42_sport                              151.15       1         151.15     7.861     0.005   
##    q38_alcohol                             24.07       1          24.07     1.252     0.263   
##    q35_01_contact_close_family             87.11       2          43.55     2.265     0.104   
##    q35_03_contact_friends                   9.08       2           4.54     0.236     0.790   
##    Residuals                            27727.79    1442          19.23                       
##  ──────────────────────────────────────────────────────────────────────────────────────────── 
##    Note. Type 3 sum of squares
## 
## 
##  Model Coefficients - PHQ8                                                                                                                     
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Predictor                         Estimate    SE       Lower      Upper      t          p         Stand. Estimate    Lower       Upper      
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Intercept                    ᵃ      7.1830    2.028     3.2048    11.1612     3.5419    < .001                                              
##    q01_gender:                                                                                                                                 
##    male – female                      -1.1365    0.267    -1.6607    -0.6122    -4.2520    < .001           -0.24566    -0.35899    -0.13232   
##    q03_relationship_type:                                                                                                                      
##    relationship – single              -0.6549    0.382    -1.4041     0.0942    -1.7149     0.087           -0.14157    -0.30350     0.02037   
##    married – single                   -0.8872    0.442    -1.7543    -0.0201    -2.0072     0.045           -0.19178    -0.37921    -0.00435   
##    divorced – single                  -0.5314    0.541    -1.5924     0.5296    -0.9825     0.326           -0.11487    -0.34421     0.11447   
##    widowed – single                   -0.9802    0.566    -2.0897     0.1294    -1.7328     0.083           -0.21187    -0.45172     0.02798   
##    q04_children:                                                                                                                               
##    yes – no                           -1.4940    0.366    -2.2112    -0.7769    -4.0866    < .001           -0.32295    -0.47796    -0.16793   
##    q11_education:                                                                                                                              
##    element – unfin_element             2.2846    2.023    -1.6836     6.2528     1.1294     0.259            0.49384    -0.36393     1.35161   
##    unfin_hs – unfin_element            1.2582    2.039    -2.7418     5.2582     0.6170     0.537            0.27197    -0.59267     1.13661   
##    hs – unfin_element                  1.1801    1.983    -2.7090     5.0692     0.5952     0.552            0.25509    -0.58558     1.09575   
##    undergrad – unfin_element           1.3243    2.008    -2.6153     5.2639     0.6594     0.510            0.28626    -0.56533     1.13785   
##    postgrad – unfin_element            0.8562    1.982    -3.0308     4.7433     0.4321     0.666            0.18509    -0.65514     1.02531   
##    q18_02_soc_media_info:                                                                                                                      
##    no – yes                           -1.2261    0.269    -1.7531    -0.6991    -4.5641    < .001           -0.26504    -0.37895    -0.15113   
##    q40_smoking:                                                                                                                                
##    no – yes                           -0.5417    0.345    -1.2180     0.1346    -1.5711     0.116           -0.11709    -0.26329     0.02910   
##    q42_sport:                                                                                                                                  
##    yes – no                           -0.6723    0.240    -1.1426    -0.2019    -2.8037     0.005           -0.14532    -0.24699    -0.04365   
##    q38_alcohol:                                                                                                                                
##    no – yes                           -0.2760    0.247    -0.7600     0.2079    -1.1188     0.263           -0.05966    -0.16427     0.04495   
##    q35_01_contact_close_family:                                                                                                                
##    2 – 1                              -0.0122    0.257    -0.5169     0.4924    -0.0475     0.962           -0.00264    -0.11173     0.10644   
##    3 – 1                               0.7723    0.385     0.0164     1.5282     2.0042     0.045            0.16694     0.00355     0.33033   
##    q35_03_contact_friends:                                                                                                                     
##    2 – 1                               0.4077    0.613    -0.7942     1.6096     0.6654     0.506            0.08813    -0.17168     0.34794   
##    3 – 1                               0.2754    1.409    -2.4877     3.0386     0.1955     0.845            0.05953    -0.53775     0.65681   
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    ᵃ Represents reference level
## 
## 
##  ASSUMPTION CHECKS
## 
##  Durbin–Watson Test for Autocorrelation       
##  ──────────────────────────────────────────── 
##    Autocorrelation    DW Statistic    p       
##  ──────────────────────────────────────────── 
##             0.0332            1.93    0.164   
##  ──────────────────────────────────────────── 
## 
## 
##  Collinearity Statistics                              
##  ──────────────────────────────────────────────────── 
##                                   VIF     Tolerance   
##  ──────────────────────────────────────────────────── 
##    q01_gender                     1.06        0.944   
##    q03_relationship_type          1.13        0.882   
##    q04_children                   1.54        0.650   
##    q11_education                  1.04        0.960   
##    q18_02_soc_media_info          1.05        0.952   
##    q40_smoking                    1.03        0.972   
##    q42_sport                      1.04        0.965   
##    q38_alcohol                    1.05        0.956   
##    q35_01_contact_close_family    1.04        0.964   
##    q35_03_contact_friends         1.02        0.982   
##  ──────────────────────────────────────────────────── 
## 
## 
##  MODEL 4
## 
##  Omnibus ANOVA Test                                                                            
##  ───────────────────────────────────────────────────────────────────────────────────────────── 
##                                   Sum of Squares    df      Mean Square    F          p        
##  ───────────────────────────────────────────────────────────────────────────────────────────── 
##    q01_gender                            450.278       1        450.278    25.7967    < .001   
##    q03_relationship_type                 237.479       4         59.370     3.4013     0.009   
##    q04_children                          333.208       1        333.208    19.0897    < .001   
##    q11_education                         147.134       5         29.427     1.6859     0.135   
##    q18_02_soc_media_info                 433.458       1        433.458    24.8331    < .001   
##    q40_smoking                            36.725       1         36.725     2.1040     0.147   
##    q42_sport                               1.605       1          1.605     0.0919     0.762   
##    q38_alcohol                           137.581       1        137.581     7.8821     0.005   
##    q35_01_contact_close_family           113.124       2         56.562     3.2405     0.039   
##    q35_03_contact_friends                 21.632       2         10.816     0.6196     0.538   
##    q47_self_reporting_health            1067.666       4        266.916    15.2918    < .001   
##    q48_chronic_illness                     0.680       1          0.680     0.0390     0.844   
##    q49_health_limitations                248.520       2        124.260     7.1189    < .001   
##    Residuals                           25047.725    1435         17.455                        
##  ───────────────────────────────────────────────────────────────────────────────────────────── 
##    Note. Type 3 sum of squares
## 
## 
##  Model Coefficients - PHQ8                                                                                                                   
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Predictor                         Estimate    SE       Lower     Upper       t         p         Stand. Estimate    Lower      Upper      
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Intercept                    ᵃ     11.0446    2.608     5.929    16.16033     4.235    < .001                                             
##    q01_gender:                                                                                                                               
##    male – female                      -1.2957    0.255    -1.796    -0.79527    -5.079    < .001           -0.28008    -0.3882    -0.17191   
##    q03_relationship_type:                                                                                                                    
##    relationship – single              -0.7688    0.365    -1.485    -0.05276    -2.106     0.035           -0.16619    -0.3210    -0.01140   
##    married – single                   -1.1604    0.423    -1.990    -0.33095    -2.744     0.006           -0.25083    -0.4301    -0.07154   
##    divorced – single                  -0.9934    0.518    -2.010     0.02346    -1.916     0.056           -0.21474    -0.4346     0.00507   
##    widowed – single                   -1.9693    0.548    -3.044    -0.89416    -3.593    < .001           -0.42568    -0.6581    -0.19328   
##    q04_children:                                                                                                                             
##    yes – no                           -1.5232    0.349    -2.207    -0.83934    -4.369    < .001           -0.32926    -0.4771    -0.18143   
##    q11_education:                                                                                                                            
##    element – unfin_element             3.1013    1.932    -0.689     6.89110     1.605     0.109            0.67038    -0.1488     1.48958   
##    unfin_hs – unfin_element            1.5954    1.947    -2.224     5.41449     0.819     0.413            0.34485    -0.4807     1.17040   
##    hs – unfin_element                  2.2107    1.896    -1.509     5.93028     1.166     0.244            0.47786    -0.3262     1.28189   
##    undergrad – unfin_element           2.4573    1.921    -1.310     6.22475     1.279     0.201            0.53116    -0.2832     1.34554   
##    postgrad – unfin_element            1.9542    1.895    -1.764     5.67239     1.031     0.303            0.42242    -0.3813     1.22614   
##    q18_02_soc_media_info:                                                                                                                    
##    no – yes                           -1.2779    0.256    -1.781    -0.77489    -4.983    < .001           -0.27624    -0.3850    -0.16750   
##    q40_smoking:                                                                                                                              
##    no – yes                           -0.4795    0.331    -1.128     0.16896    -1.451     0.147           -0.10365    -0.2438     0.03652   
##    q42_sport:                                                                                                                                
##    yes – no                           -0.0711    0.234    -0.531     0.38871    -0.303     0.762           -0.01536    -0.1147     0.08402   
##    q38_alcohol:                                                                                                                              
##    no – yes                           -0.6664    0.237    -1.132    -0.20079    -2.808     0.005           -0.14406    -0.2447    -0.04340   
##    q35_01_contact_close_family:                                                                                                              
##    2 – 1                               0.0349    0.245    -0.446     0.51629     0.142     0.887            0.00755    -0.0965     0.11160   
##    3 – 1                               0.9026    0.367     0.182     1.62349     2.456     0.014            0.19512     0.0393     0.35093   
##    q35_03_contact_friends:                                                                                                                   
##    2 – 1                               0.6399    0.584    -0.507     1.78637     1.095     0.274            0.13831    -0.1095     0.38614   
##    3 – 1                               0.3221    1.344    -2.315     2.95908     0.240     0.811            0.06963    -0.5004     0.63963   
##    q47_self_reporting_health:                                                                                                                
##    excellent – very_bad               -4.1412    1.794    -7.661    -0.62130    -2.308     0.021           -0.89515    -1.6560    -0.13430   
##    good – very_bad                    -3.4874    1.777    -6.973    -0.00214    -1.963     0.050           -0.75384    -1.5072    -4.64e-4   
##    neutral – very_bad                 -1.9461    1.774    -5.426     1.53345    -1.097     0.273           -0.42066    -1.1728     0.33147   
##    bad – very_bad                      0.4448    1.790    -3.067     3.95698     0.248     0.804            0.09615    -0.6630     0.85534   
##    q48_chronic_illness:                                                                                                                      
##    no – yes                           -0.0525    0.266    -0.574     0.46914    -0.197     0.844           -0.01134    -0.1241     0.10141   
##    q49_health_limitations:                                                                                                                   
##    partially_limits – limits          -1.1321    0.644    -2.396     0.13132    -1.758     0.079           -0.24472    -0.5178     0.02839   
##    no_limits – limits                 -1.9976    0.660    -3.292    -0.70351    -3.028     0.003           -0.43180    -0.7115    -0.15207   
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    ᵃ Represents reference level
## 
## 
##  ASSUMPTION CHECKS
## 
##  Durbin–Watson Test for Autocorrelation       
##  ──────────────────────────────────────────── 
##    Autocorrelation    DW Statistic    p       
##  ──────────────────────────────────────────── 
##             0.0463            1.90    0.048   
##  ──────────────────────────────────────────── 
## 
## 
##  Collinearity Statistics                              
##  ──────────────────────────────────────────────────── 
##                                   VIF     Tolerance   
##  ──────────────────────────────────────────────────── 
##    q01_gender                     1.06        0.942   
##    q03_relationship_type          1.14        0.876   
##    q04_children                   1.54        0.650   
##    q11_education                  1.05        0.954   
##    q18_02_soc_media_info          1.05        0.950   
##    q40_smoking                    1.04        0.966   
##    q42_sport                      1.06        0.941   
##    q38_alcohol                    1.06        0.946   
##    q35_01_contact_close_family    1.04        0.963   
##    q35_03_contact_friends         1.02        0.980   
##    q47_self_reporting_health      1.09        0.918   
##    q48_chronic_illness            1.20        0.834   
##    q49_health_limitations         1.19        0.844   
##  ──────────────────────────────────────────────────── 
## 
## 
##  MODEL 5
## 
##  Omnibus ANOVA Test                                                                           
##  ──────────────────────────────────────────────────────────────────────────────────────────── 
##                                   Sum of Squares    df      Mean Square    F         p        
##  ──────────────────────────────────────────────────────────────────────────────────────────── 
##    q01_gender                              380.8       1         380.83    22.820    < .001   
##    q03_relationship_type                   148.8       4          37.20     2.229     0.064   
##    q04_children                             53.6       1          53.62     3.213     0.073   
##    q11_education                            43.0       5           8.60     0.515     0.765   
##    q18_02_soc_media_info                   145.1       1         145.10     8.695     0.003   
##    q40_smoking                              30.5       1          30.47     1.826     0.177   
##    q42_sport                                10.6       1          10.63     0.637     0.425   
##    q38_alcohol                             114.1       1         114.14     6.839     0.009   
##    q35_01_contact_close_family              40.0       2          20.01     1.199     0.302   
##    q35_03_contact_friends                   35.1       2          17.57     1.053     0.349   
##    q47_self_reporting_health              1187.5       4         296.87    17.789    < .001   
##    q48_chronic_illness                      17.9       1          17.88     1.071     0.301   
##    q49_health_limitations                  307.3       2         153.63     9.206    < .001   
##    q02_age                                1116.1       1        1116.10    66.878    < .001   
##    Residuals                             23931.6    1434          16.69                       
##  ──────────────────────────────────────────────────────────────────────────────────────────── 
##    Note. Type 3 sum of squares
## 
## 
##  Model Coefficients - PHQ8                                                                                                                     
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Predictor                         Estimate    SE         Lower      Upper      t          p         Stand. Estimate    Lower      Upper     
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Intercept                    ᵃ     14.4098    2.58304     9.3429    19.4768     5.5786    < .001                                            
##    q01_gender:                                                                                                                                 
##    male – female                      -1.1931    0.24976    -1.6830    -0.7032    -4.7770    < .001           -0.25790    -0.3638    -0.1520   
##    q03_relationship_type:                                                                                                                      
##    relationship – single              -0.8067    0.35698    -1.5069    -0.1064    -2.2597     0.024           -0.17437    -0.3257    -0.0230   
##    married – single                   -0.5262    0.42066    -1.3513     0.2990    -1.2508     0.211           -0.11373    -0.2921     0.0646   
##    divorced – single                   0.1274    0.52510    -0.9027     1.1574     0.2426     0.808            0.02754    -0.1951     0.2502   
##    widowed – single                    0.0381    0.58946    -1.1182     1.1944     0.0647     0.948            0.00824    -0.2417     0.2582   
##    q04_children:                                                                                                                               
##    yes – no                           -0.6409    0.35755    -1.3423     0.0605    -1.7925     0.073           -0.13854    -0.2902     0.0131   
##    q11_education:                                                                                                                              
##    element – unfin_element             1.9852    1.89403    -1.7302     5.7005     1.0481     0.295            0.42911    -0.3740     1.2322   
##    unfin_hs – unfin_element            1.1438    1.90452    -2.5921     4.8798     0.6006     0.548            0.24725    -0.5603     1.0548   
##    hs – unfin_element                  1.7382    1.85502    -1.9006     5.3770     0.9370     0.349            0.37573    -0.4108     1.1623   
##    undergrad – unfin_element           1.6541    1.88054    -2.0348     5.3430     0.8796     0.379            0.35755    -0.4398     1.1549   
##    postgrad – unfin_element            1.6105    1.85389    -2.0261     5.2472     0.8687     0.385            0.34814    -0.4380     1.1342   
##    q18_02_soc_media_info:                                                                                                                      
##    no – yes                           -0.7624    0.25856    -1.2696    -0.2552    -2.9486     0.003           -0.16480    -0.2744    -0.0552   
##    q40_smoking:                                                                                                                                
##    no – yes                           -0.4368    0.32329    -1.0710     0.1973    -1.3513     0.177           -0.09443    -0.2315     0.0427   
##    q42_sport:                                                                                                                                  
##    yes – no                           -0.1832    0.22959    -0.6336     0.2672    -0.7980     0.425           -0.03961    -0.1370     0.0577   
##    q38_alcohol:                                                                                                                                
##    no – yes                           -0.6073    0.23222    -1.0628    -0.1518    -2.6152     0.009           -0.13127    -0.2297    -0.0328   
##    q35_01_contact_close_family:                                                                                                                
##    2 – 1                              -0.1732    0.24130    -0.6465     0.3002    -0.7177     0.473           -0.03744    -0.1398     0.0649   
##    3 – 1                               0.3870    0.36481    -0.3286     1.1027     1.0609     0.289            0.08366    -0.0710     0.2383   
##    q35_03_contact_friends:                                                                                                                     
##    2 – 1                               0.8162    0.57191    -0.3056     1.9381     1.4272     0.154            0.17643    -0.0661     0.4189   
##    3 – 1                               0.4104    1.31449    -2.1681     2.9890     0.3122     0.755            0.08872    -0.4687     0.6461   
##    q47_self_reporting_health:                                                                                                                  
##    excellent – very_bad               -4.8721    1.75682    -8.3184    -1.4259    -2.7733     0.006           -1.05316    -1.7981    -0.3082   
##    good – very_bad                    -3.9829    1.73835    -7.3929    -0.5729    -2.2912     0.022           -0.86094    -1.5980    -0.1238   
##    neutral – very_bad                 -2.3948    1.73529    -5.7988     1.0091    -1.3801     0.168           -0.51767    -1.2535     0.2181   
##    bad – very_bad                     -0.0856    1.75192    -3.5222     3.3510    -0.0489     0.961           -0.01850    -0.7614     0.7244   
##    q48_chronic_illness:                                                                                                                        
##    no – yes                           -0.2706    0.26138    -0.7833     0.2422    -1.0351     0.301           -0.05848    -0.1693     0.0523   
##    q49_health_limitations:                                                                                                                     
##    partially_limits – limits          -1.1691    0.62980    -2.4046     0.0663    -1.8564     0.064           -0.25272    -0.5198     0.0143   
##    no_limits – limits                 -2.1602    0.64537    -3.4262    -0.8943    -3.3473    < .001           -0.46695    -0.7406    -0.1933   
##    q02_age                            -0.0726    0.00888    -0.0900    -0.0552    -8.1779    < .001           -0.32301    -0.4005    -0.2455   
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    ᵃ Represents reference level
## 
## 
##  ASSUMPTION CHECKS
## 
##  Durbin–Watson Test for Autocorrelation       
##  ──────────────────────────────────────────── 
##    Autocorrelation    DW Statistic    p       
##  ──────────────────────────────────────────── 
##             0.0379            1.92    0.118   
##  ──────────────────────────────────────────── 
## 
## 
##  Collinearity Statistics                              
##  ──────────────────────────────────────────────────── 
##                                   VIF     Tolerance   
##  ──────────────────────────────────────────────────── 
##    q01_gender                     1.06        0.941   
##    q03_relationship_type          1.18        0.849   
##    q04_children                   1.61        0.620   
##    q11_education                  1.05        0.950   
##    q18_02_soc_media_info          1.09        0.921   
##    q40_smoking                    1.04        0.966   
##    q42_sport                      1.06        0.939   
##    q38_alcohol                    1.06        0.946   
##    q35_01_contact_close_family    1.05        0.955   
##    q35_03_contact_friends         1.02        0.980   
##    q47_self_reporting_health      1.09        0.916   
##    q48_chronic_illness            1.21        0.829   
##    q49_health_limitations         1.19        0.843   
##    q02_age                        1.71        0.585   
##  ────────────────────────────────────────────────────

c. Stepwise regression model, step 1: algorithmic selection

As an alternative approach to the theory-derived, inductively build set of models, we choose to use the stepwise regression - combining forward with stepwise selection of the predictors. By using both of the Akaike information criterion (AIC) and Bayesian information criterion (BIC) to select the best-performing model, the algorithm from the MASS package arrives at a more simple model - 9 predictor variables using AIC and 7 predictor variables using BIC (as opposed to 14 with the previous manual approach). However, while this model performs well with this particular sample, there is a significant chance of underperformance on the international sample, since stepwise regression is prone to overfitting.

#We are using the MASS package, which contains stepAIC() function for stepwise regression model selection

#Dataset simplification to only the variables specified with hypotheses

data_linreg <- data[data_vars]

# Fit the full linear model using lm() function from base R
full.model_MASS <- lm(PHQ8 ~.,
                      data = data_linreg,
                      na.action = na.omit)

# Stepwise regression model using MASS package, ranks on AIC
step.model_AIC <- stepAIC(full.model_MASS, 
                          direction = "both", 
                          trace = FALSE)

# Stepwise regression model using MASS package, ranks on BIC
step.model_BIC <- stepAIC(full.model_MASS, 
                          direction = "both",
                          trace = FALSE, 
                          k = log(nrow(data_linreg)))

# Summary of model based on AIC
base::summary(step.model_AIC)
## 
## Call:
## lm(formula = PHQ8 ~ q02_age + q01_gender + q04_children + q40_smoking + 
##     q38_alcohol + q18_02_soc_media_info + q03_relationship_type + 
##     q47_self_reporting_health + q49_health_limitations, data = data_linreg, 
##     na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -11.408  -2.676  -0.792   1.814  19.958 
## 
## Coefficients:
##                                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                             9.94214    0.88010   11.30  < 2e-16 ***
## q02_age                                -0.07382    0.00839   -8.80  < 2e-16 ***
## q01_gendermale                         -1.14657    0.24372   -4.70  2.8e-06 ***
## q04_childrenno                          0.69569    0.35378    1.97  0.04944 *  
## q40_smokingno                          -0.48830    0.31777   -1.54  0.12459    
## q38_alcoholno                          -0.57567    0.22900   -2.51  0.01205 *  
## q18_02_soc_media_info.L                -0.54033    0.18150   -2.98  0.00296 ** 
## q03_relationship_typerelationship      -0.86034    0.35004   -2.46  0.01410 *  
## q03_relationship_typemarried           -0.60582    0.41427   -1.46  0.14386    
## q03_relationship_typedivorced           0.06784    0.52148    0.13  0.89651    
## q03_relationship_typewidowed            0.04565    0.58606    0.08  0.93792    
## q47_self_reporting_healthgood           0.95560    0.28048    3.41  0.00067 ***
## q47_self_reporting_healthneutral        2.60654    0.36489    7.14  1.4e-12 ***
## q47_self_reporting_healthbad            4.93669    0.64552    7.65  3.7e-14 ***
## q47_self_reporting_healthvery_bad       5.03553    1.74612    2.88  0.00399 ** 
## q49_health_limitationspartially_limits -1.06210    0.61980   -1.71  0.08681 .  
## q49_health_limitationsno_limits        -2.16885    0.63396   -3.42  0.00064 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.08 on 1445 degrees of freedom
##   (22 observations deleted due to missingness)
## Multiple R-squared:  0.23,   Adjusted R-squared:  0.221 
## F-statistic:   27 on 16 and 1445 DF,  p-value: <2e-16
# Summary of model based on BIC
base::summary(step.model_BIC)
## 
## Call:
## lm(formula = PHQ8 ~ q02_age + q01_gender + q04_children + q18_02_soc_media_info + 
##     q47_self_reporting_health + q49_health_limitations, data = data_linreg, 
##     na.action = na.omit)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -12.295  -2.602  -0.827   1.889  19.504 
## 
## Coefficients:
##                                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                             8.53669    0.78167   10.92  < 2e-16 ***
## q02_age                                -0.06945    0.00733   -9.47  < 2e-16 ***
## q01_gendermale                         -1.07301    0.23911   -4.49  7.8e-06 ***
## q04_childrenno                          1.00656    0.29004    3.47  0.00053 ***
## q18_02_soc_media_info.L                -0.55883    0.18096   -3.09  0.00205 ** 
## q47_self_reporting_healthgood           0.95620    0.28129    3.40  0.00069 ***
## q47_self_reporting_healthneutral        2.60287    0.36421    7.15  1.4e-12 ***
## q47_self_reporting_healthbad            4.88445    0.64414    7.58  6.0e-14 ***
## q47_self_reporting_healthvery_bad       4.76829    1.74961    2.73  0.00650 ** 
## q49_health_limitationspartially_limits -1.05367    0.61879   -1.70  0.08882 .  
## q49_health_limitationsno_limits        -2.12026    0.63212   -3.35  0.00082 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.1 on 1451 degrees of freedom
##   (22 observations deleted due to missingness)
## Multiple R-squared:  0.22,   Adjusted R-squared:  0.215 
## F-statistic: 40.9 on 10 and 1451 DF,  p-value: <2e-16

d. Stepwise regression model, step 2: final AIC-driven model

In order to allow direct comparison with the manually-selected model, we input the chosen model (based on the AIC criterion) from the previous step into the linreg() function of the jmv package.

#To construct this regression model, we use the linReg() function from the jmv package.

jmv::linReg(
    data = data,
    dep = "PHQ8",
    covs = "q02_age",
    factors = vars("q01_gender", 
                   "q40_smoking", 
                   "q04_children", 
                   "q38_alcohol", 
                   "q18_02_soc_media_info", 
                   "q03_relationship_type", 
                   "q47_self_reporting_health", 
                   "q49_health_limitations"),
    blocks = list(
        list(
            "q02_age",
            "q01_gender",
            "q04_children",
            "q47_self_reporting_health",
            "q49_health_limitations",
            "q18_02_soc_media_info"),
          list(
            "q38_alcohol",
            "q40_smoking",
            "q03_relationship_type")),
    refLevels = list(
        list(
            var="q01_gender",
            ref="male"),
        list(
            var="q04_children",
            ref="yes"),
        list(
            var="q38_alcohol",
            ref="yes"),
        list(
            var="q40_smoking",
            ref="yes"),
        list(
            var="q18_02_soc_media_info",
            ref="yes"),
        list(
            var="q03_relationship_type",
            ref="single"),
        list(
            var="q47_self_reporting_health",
            ref="very_bad"),
        list(
            var="q49_health_limitations",
            ref="limits")),
    r2Adj = TRUE,
    aic = TRUE,
    bic = TRUE,
    rmse = TRUE,
    modelTest = TRUE,
    anova = TRUE,
    ci = TRUE,
    stdEst = TRUE,
    ciStdEst = TRUE,
    durbin = TRUE,
    collin = TRUE)
## 
##  LINEAR REGRESSION
## 
##  Model Fit Measures                                                                                  
##  ─────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Model    R        R²       Adjusted R²    AIC     BIC     RMSE    F       df1    df2     p        
##  ─────────────────────────────────────────────────────────────────────────────────────────────────── 
##        1    0.469    0.220          0.215    8288    8351    4.08    40.9     10    1451    < .001   
##        2    0.480    0.230          0.221    8281    8376    4.06    27.0     16    1445    < .001   
##  ─────────────────────────────────────────────────────────────────────────────────────────────────── 
## 
## 
##  Model Comparisons                                                 
##  ───────────────────────────────────────────────────────────────── 
##    Model         Model    ΔR²       F       df1    df2     p       
##  ───────────────────────────────────────────────────────────────── 
##        1    -        2    0.0100    3.14      6    1445    0.005   
##  ───────────────────────────────────────────────────────────────── 
## 
## 
##  MODEL SPECIFIC RESULTS
## 
##  MODEL 1
## 
##  Omnibus ANOVA Test                                                                        
##  ───────────────────────────────────────────────────────────────────────────────────────── 
##                                 Sum of Squares    df      Mean Square    F        p        
##  ───────────────────────────────────────────────────────────────────────────────────────── 
##    q02_age                                1508       1         1507.7    89.70    < .001   
##    q01_gender                              338       1          338.5    20.14    < .001   
##    q04_children                            202       1          202.4    12.04    < .001   
##    q47_self_reporting_health              1424       4          355.9    21.17    < .001   
##    q49_health_limitations                  361       2          180.3    10.73    < .001   
##    q18_02_soc_media_info                   160       1          160.3     9.54     0.002   
##    Residuals                             24390    1451           16.8                      
##  ───────────────────────────────────────────────────────────────────────────────────────── 
##    Note. Type 3 sum of squares
## 
## 
##  Model Coefficients - PHQ8                                                                                                                   
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Predictor                       Estimate    SE         Lower      Upper      t          p         Stand. Estimate    Lower      Upper     
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Intercept                  ᵃ     12.6271    1.77613     9.1431    16.1112     7.1094    < .001                                            
##    q02_age                          -0.0694    0.00733    -0.0838    -0.0551    -9.4708    < .001            -0.3089    -0.3729    -0.2449   
##    q01_gender:                                                                                                                               
##    female – male                     1.0730    0.23911     0.6040     1.5420     4.4875    < .001             0.2319     0.1306     0.3333   
##    q04_children:                                                                                                                             
##    no – yes                          1.0066    0.29004     0.4376     1.5755     3.4704    < .001             0.2176     0.0946     0.3406   
##    q47_self_reporting_health:                                                                                                                
##    excellent – very_bad             -4.7683    1.74961    -8.2003    -1.3363    -2.7253     0.007            -1.0307    -1.7726    -0.2888   
##    good – very_bad                  -3.8121    1.73534    -7.2161    -0.4080    -2.1967     0.028            -0.8240    -1.5598    -0.0882   
##    neutral – very_bad               -2.1654    1.73549    -5.5698     1.2389    -1.2477     0.212            -0.4681    -1.2040     0.2678   
##    bad – very_bad                    0.1162    1.75383    -3.3241     3.5565     0.0662     0.947             0.0251    -0.7185     0.7688   
##    q49_health_limitations:                                                                                                                   
##    partially_limits – limits        -1.0537    0.61879    -2.2675     0.1601    -1.7028     0.089            -0.2278    -0.4901     0.0346   
##    no_limits – limits               -2.1203    0.63212    -3.3602    -0.8803    -3.3542    < .001            -0.4583    -0.7263    -0.1903   
##    q18_02_soc_media_info:                                                                                                                    
##    no – yes                         -0.7903    0.25591    -1.2923    -0.2883    -3.0882     0.002            -0.1708    -0.2793    -0.0623   
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    ᵃ Represents reference level
## 
## 
##  ASSUMPTION CHECKS
## 
##  Durbin–Watson Test for Autocorrelation       
##  ──────────────────────────────────────────── 
##    Autocorrelation    DW Statistic    p       
##  ──────────────────────────────────────────── 
##             0.0394            1.92    0.100   
##  ──────────────────────────────────────────── 
## 
## 
##  Collinearity Statistics                            
##  ────────────────────────────────────────────────── 
##                                 VIF     Tolerance   
##  ────────────────────────────────────────────────── 
##    q02_age                      1.41        0.711   
##    q01_gender                   1.01        0.986   
##    q04_children                 1.30        0.767   
##    q47_self_reporting_health    1.07        0.934   
##    q49_health_limitations       1.14        0.875   
##    q18_02_soc_media_info        1.07        0.934   
##  ────────────────────────────────────────────────── 
## 
## 
##  MODEL 2
## 
##  Omnibus ANOVA Test                                                                        
##  ───────────────────────────────────────────────────────────────────────────────────────── 
##                                 Sum of Squares    df      Mean Square    F        p        
##  ───────────────────────────────────────────────────────────────────────────────────────── 
##    q02_age                              1290.6       1         1290.6    77.46    < .001   
##    q01_gender                            368.8       1          368.8    22.13    < .001   
##    q04_children                           64.4       1           64.4     3.87     0.049   
##    q47_self_reporting_health            1422.5       4          355.6    21.34    < .001   
##    q49_health_limitations                378.5       2          189.3    11.36    < .001   
##    q18_02_soc_media_info                 147.7       1          147.7     8.86     0.003   
##    q38_alcohol                           105.3       1          105.3     6.32     0.012   
##    q40_smoking                            39.3       1           39.3     2.36     0.125   
##    q03_relationship_type                 175.8       4           44.0     2.64     0.033   
##    Residuals                           24075.8    1445           16.7                      
##  ───────────────────────────────────────────────────────────────────────────────────────── 
##    Note. Type 3 sum of squares
## 
## 
##  Model Coefficients - PHQ8                                                                                                                    
##  ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Predictor                       Estimate    SE         Lower       Upper      t          p         Stand. Estimate    Lower      Upper     
##  ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Intercept                  ᵃ     14.2132    1.81886    10.64527    17.7811     7.8143    < .001                                            
##    q02_age                          -0.0738    0.00839    -0.09027    -0.0574    -8.8011    < .001           -0.32837     -0.402    -0.2552   
##    q01_gender:                                                                                                                                
##    female – male                     1.1466    0.24372     0.66849     1.6247     4.7045    < .001            0.24784      0.145     0.3512   
##    q04_children:                                                                                                                              
##    no – yes                          0.6957    0.35378     0.00171     1.3897     1.9664     0.049            0.15038    3.69e-4     0.3004   
##    q47_self_reporting_health:                                                                                                                 
##    excellent – very_bad             -5.0355    1.74612    -8.46072    -1.6103    -2.8838     0.004           -1.08848     -1.829    -0.3481   
##    good – very_bad                  -4.0799    1.73172    -7.47688    -0.6830    -2.3560     0.019           -0.88192     -1.616    -0.1476   
##    neutral – very_bad               -2.4290    1.73158    -5.82566     0.9677    -1.4028     0.161           -0.52505     -1.259     0.2092   
##    bad – very_bad                   -0.0988    1.74868    -3.52906     3.3314    -0.0565     0.955           -0.02137     -0.763     0.7201   
##    q49_health_limitations:                                                                                                                    
##    partially_limits – limits        -1.0621    0.61980    -2.27790     0.1537    -1.7136     0.087           -0.22958     -0.492     0.0332   
##    no_limits – limits               -2.1689    0.63396    -3.41244    -0.9253    -3.4211    < .001           -0.46882     -0.738    -0.2000   
##    q18_02_soc_media_info:                                                                                                                     
##    no – yes                         -0.7641    0.25668    -1.26765    -0.2606    -2.9770     0.003           -0.16518     -0.274    -0.0563   
##    q38_alcohol:                                                                                                                               
##    no – yes                         -0.5757    0.22900    -1.02488    -0.1265    -2.5139     0.012           -0.12444     -0.222    -0.0273   
##    q40_smoking:                                                                                                                               
##    no – yes                         -0.4883    0.31777    -1.11163     0.1350    -1.5367     0.125           -0.10555     -0.240     0.0292   
##    q03_relationship_type:                                                                                                                     
##    relationship – single            -0.8603    0.35004    -1.54698    -0.1737    -2.4578     0.014           -0.18597     -0.334    -0.0375   
##    married – single                 -0.6058    0.41427    -1.41846     0.2068    -1.4624     0.144           -0.13095     -0.307     0.0447   
##    divorced – single                 0.0678    0.52148    -0.95510     1.0908     0.1301     0.897            0.01467     -0.206     0.2358   
##    widowed – single                  0.0457    0.58606    -1.10396     1.1953     0.0779     0.938            0.00987     -0.239     0.2584   
##  ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    ᵃ Represents reference level
## 
## 
##  ASSUMPTION CHECKS
## 
##  Durbin–Watson Test for Autocorrelation       
##  ──────────────────────────────────────────── 
##    Autocorrelation    DW Statistic    p       
##  ──────────────────────────────────────────── 
##             0.0385            1.92    0.128   
##  ──────────────────────────────────────────── 
## 
## 
##  Collinearity Statistics                            
##  ────────────────────────────────────────────────── 
##                                 VIF     Tolerance   
##  ────────────────────────────────────────────────── 
##    q02_age                      1.62        0.619   
##    q01_gender                   1.04        0.963   
##    q04_children                 1.60        0.626   
##    q47_self_reporting_health    1.07        0.931   
##    q49_health_limitations       1.15        0.870   
##    q18_02_soc_media_info        1.08        0.927   
##    q38_alcohol                  1.04        0.958   
##    q40_smoking                  1.02        0.982   
##    q03_relationship_type        1.17        0.858   
##  ──────────────────────────────────────────────────

4. Anxiety factor as a mediator for depression

a. Creation of the Anxiety index, step 1: overview of survey items

Aside from the regression model, we intend to explore the mediating role of anxiety between the consumption of social media and depression through a mediation/moderation analysis (in section 5).

In this section, we aim to construct an anxiety index from several survey items. As a first step, we select the survey items, which should be the manifestation of the latent factor of anxiety.

These survey items are:

Survey question (1-10 scale) Original variable Renamed variable name
How scared are you of the risk of getting sick? q30 q30_anxiety_infection_covid
How scared are you of the risk that someone in your family or network of friends will get COVID-19? q31 q31_anxiety_infection_friends
I feel very anxious about the health emergency. q33_01 q33_01_anxiety_situation
I think I have little control over whether I get the infection. q33_02 q33_02_anxiety_low_control
I am scared that I will not be able to survive if I get sick due to COVID-19 or I got sick and I was scared that I would not survive. q33_03 q33_03_anxiety_survival_covid
I thought about quitting my job / dropping out of school due to COVID-19. q33_04 q33_04_anxiety_change_employment
I am afraid of transmitting the coronavirus to others. q33_05 q33_05_anxiety_infecting_others

b. Creation of the Anxiety index, step 2: anxiety items descriptives

After the selection, we analyze these survey items with a set of descriptive statistics. To follow the established principles pertaining to the factor analyses, we also split the sample into two randomly chosen halves. The first half of the data set will be used for the Exploratory Factor Analysis, while the second half will be used by the Reliability and Confirmatory Factor Analyses.

jmv::descriptives(
    data = data,
    vars = vars("q30_anxiety_infection_covid", 
                "q31_anxiety_infection_friends", 
                "q33_01_anxiety_situation", 
                "q33_02_anxiety_low_control", 
                "q33_03_anxiety_survival_covid", 
                "q33_04_anxiety_change_employment", 
                "q33_05_anxiety_infecting_others"),
    hist = TRUE,
    min = FALSE,
    max = FALSE)
## 
##  DESCRIPTIVES
## 
##  Descriptives                                                                                                                                                                                                                                  
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##               q30_anxiety_infection_covid    q31_anxiety_infection_friends    q33_01_anxiety_situation    q33_02_anxiety_low_control    q33_03_anxiety_survival_covid    q33_04_anxiety_change_employment    q33_05_anxiety_infecting_others   
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    N                                 1482                             1482                        1484                          1484                             1484                                1484                               1484   
##    Missing                              2                                2                           0                             0                                0                                   0                                  0   
##    Mean                              4.30                             5.78                        5.70                          4.36                             3.24                                1.82                               5.76   
##    Median                            4.00                             6.00                        5.00                          4.00                             2.00                                1.00                               6.00   
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

# We also split the sample into two halfs. The "training" half, on which we conduct the EFA analysis and "test" part, on which we test our construct through CFA.

set.seed(2021)
train_set <- data %>% slice_sample(n = 742)
test_set <- setdiff(data,train_set)

c. Creation of the Anxiety index, step 3: Exploratory Factor Analysis of anxiety items

In the next step, we conduct an Exploratory Factor Analysis on these variables.

In line with best practices, we conduct the assumption checks (KMO and Bartlett’s Sphericity tests), set a cutoff for eigenvalue of >1 and hide factor loading below 0.4.

The result is therefore a one-factor construct, which includes all of the variables, except for the “q33_04_anxiety_change_employment”, which does not seem to be a good fit for the manifestation of anxiety within this group of variables.

#To conduct the EFA, we use the efa() function from the jmv package on the "train" data set (as opposed to the "test" dataset used for CFA)

jmv::efa(
    data = train_set,
    vars = vars("q30_anxiety_infection_covid", 
                "q31_anxiety_infection_friends", 
                "q33_01_anxiety_situation", 
                "q33_02_anxiety_low_control", 
                "q33_03_anxiety_survival_covid", 
                "q33_04_anxiety_change_employment", 
                "q33_05_anxiety_infecting_others"),
    nFactorMethod = "eigen",
    nFactors = 1,
    minEigen = 1,
    rotation = "promax",
    hideLoadings = 0.4,
    screePlot = TRUE,
    factorSummary = TRUE,
    kmo = TRUE,
    bartlett = TRUE)
## 
##  EXPLORATORY FACTOR ANALYSIS
## 
##  Factor Loadings                                             
##  ─────────────────────────────────────────────────────────── 
##                                        1        Uniqueness   
##  ─────────────────────────────────────────────────────────── 
##    q30_anxiety_infection_covid         0.861         0.258   
##    q31_anxiety_infection_friends       0.813         0.340   
##    q33_01_anxiety_situation            0.577         0.667   
##    q33_02_anxiety_low_control          0.443         0.804   
##    q33_03_anxiety_survival_covid       0.454         0.794   
##    q33_04_anxiety_change_employment                  0.953   
##    q33_05_anxiety_infecting_others     0.533         0.716   
##  ─────────────────────────────────────────────────────────── 
##    Note. 'Minimum residual' extraction method was used
##    in combination with a 'promax' rotation
## 
## 
##  FACTOR STATISTICS
## 
##  Summary                                                    
##  ────────────────────────────────────────────────────────── 
##    Factor    SS Loadings    % of Variance    Cumulative %   
##  ────────────────────────────────────────────────────────── 
##    1                2.47             35.3            35.3   
##  ────────────────────────────────────────────────────────── 
## 
## 
##  ASSUMPTION CHECKS
## 
##  Bartlett's Test of Sphericity 
##  ───────────────────────────── 
##    χ²      df    p        
##  ───────────────────────────── 
##    1376    21    < .001   
##  ───────────────────────────── 
## 
## 
##  KMO Measure of Sampling Adequacy              
##  ───────────────────────────────────────────── 
##                                        MSA     
##  ───────────────────────────────────────────── 
##    Overall                             0.779   
##    q30_anxiety_infection_covid         0.743   
##    q31_anxiety_infection_friends       0.719   
##    q33_01_anxiety_situation            0.883   
##    q33_02_anxiety_low_control          0.849   
##    q33_03_anxiety_survival_covid       0.823   
##    q33_04_anxiety_change_employment    0.730   
##    q33_05_anxiety_infecting_others     0.812   
##  ─────────────────────────────────────────────

d. Creation of the Anxiety index, step 3: Reliability Analysis of the index items

Secondly, we conduct a reliability analysis of the anxiety factor. We use a cutoff value of 0.7 for both McDonald’s omega and Cronbach’s Alpha. The scale passes this cutoff and the statistics would not be improved if any of the items were dropped.

#To conduct the reliability analysis, we use the reliability() function from the jmv package on the "test" data set (as opposed to the "train" dataset used for EFA)

jmv::reliability(
    data = test_set,
    vars = vars("q30_anxiety_infection_covid", 
                "q31_anxiety_infection_friends", 
                "q33_01_anxiety_situation", 
                "q33_02_anxiety_low_control", 
                "q33_03_anxiety_survival_covid", 
                "q33_05_anxiety_infecting_others"),
    omegaScale = TRUE,
    alphaItems = TRUE,
    omegaItems = TRUE)
## 
##  RELIABILITY ANALYSIS
## 
##  Scale Reliability Statistics              
##  ───────────────────────────────────────── 
##             Cronbach's α    McDonald's ω   
##  ───────────────────────────────────────── 
##    scale           0.784           0.797   
##  ───────────────────────────────────────── 
## 
## 
##  Item Reliability Statistics                                         
##  ─────────────────────────────────────────────────────────────────── 
##                                       Cronbach's α    McDonald's ω   
##  ─────────────────────────────────────────────────────────────────── 
##    q30_anxiety_infection_covid               0.719           0.726   
##    q31_anxiety_infection_friends             0.724           0.738   
##    q33_01_anxiety_situation                  0.752           0.772   
##    q33_02_anxiety_low_control                0.761           0.782   
##    q33_03_anxiety_survival_covid             0.775           0.790   
##    q33_05_anxiety_infecting_others           0.773           0.784   
##  ───────────────────────────────────────────────────────────────────

e. Creation of the Anxiety index, step 4: Confirmatory Factor Analysis of the index items

According to the commonly used cut-offs for estimating CFA fit, we report that the chi-square is 159 (p < 0.001) and the Standardized Root Mean Square Residual is 0.0521 (cut-off SRMR <0.08), which indicates a good fit. However, Root Mean Square Error of Approximation (90% CI) is 0.130-0.171 (cut-off < 0.08) and the Comparative Fit Index is 0.887 (cut-off ≥.90), which does not indicate a good-fit.

#To conduct the CFA, we use the cfa() function from the jmv package on the "test" data set (as opposed to the "train" dataset used for EFA)

jmv::cfa(
    data = test_set,
    factors = list(
        list(
            label="Anxiety",
            vars=c(
                "q30_anxiety_infection_covid",
                "q31_anxiety_infection_friends",
                "q33_01_anxiety_situation",
                "q33_02_anxiety_low_control",
                "q33_03_anxiety_survival_covid",
                "q33_05_anxiety_infecting_others"))),
    resCov = list(),
    ci = TRUE,
    stdEst = TRUE,
    factCovEst = FALSE,
    fitMeasures = c("cfi", "tli", "rmsea", "srmr"),
    corRes = TRUE)
## 
##  CONFIRMATORY FACTOR ANALYSIS
## 
##  Factor Loadings                                                                                                             
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Factor     Indicator                          Estimate    SE        Lower    Upper    Z       p         Stand. Estimate   
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Anxiety    q30_anxiety_infection_covid            1.99    0.0787     1.84     2.15    25.3    < .001              0.834   
##               q31_anxiety_infection_friends          2.08    0.0869     1.91     2.25    23.9    < .001              0.800   
##               q33_01_anxiety_situation               1.57    0.1015     1.37     1.77    15.4    < .001              0.566   
##               q33_02_anxiety_low_control             1.27    0.0962     1.08     1.45    13.1    < .001              0.495   
##               q33_03_anxiety_survival_covid          1.31    0.1037     1.11     1.51    12.6    < .001              0.480   
##               q33_05_anxiety_infecting_others        1.70    0.1198     1.46     1.93    14.2    < .001              0.534   
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
## 
## 
##  MODEL FIT
## 
##  Test for Exact Fit      
##  ─────────────────────── 
##    χ²     df    p        
##  ─────────────────────── 
##    159     9    < .001   
##  ─────────────────────── 
## 
## 
##  Fit Measures                                            
##  ─────────────────────────────────────────────────────── 
##    CFI      TLI      SRMR      RMSEA    Lower    Upper   
##  ─────────────────────────────────────────────────────── 
##    0.887    0.812    0.0521    0.150    0.130    0.171   
##  ─────────────────────────────────────────────────────── 
## 
## 
##  POST-HOC MODEL PERFORMANCE
## 
##  Residuals for Observed Correlation Matrix                                                                                                                                                                                         
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##                                       q30_anxiety_infection_covid    q31_anxiety_infection_friends    q33_01_anxiety_situation    q33_02_anxiety_low_control    q33_03_anxiety_survival_covid    q33_05_anxiety_infecting_others   
##  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    q30_anxiety_infection_covid                                                               0.021                      -0.028                        -0.005                            0.057                             -0.075   
##    q31_anxiety_infection_friends                                                                                        -0.016                        -0.084                           -0.099                              0.098   
##    q33_01_anxiety_situation                                                                                                                            0.128                            0.035                              0.009   
##    q33_02_anxiety_low_control                                                                                                                                                           0.120                              0.026   
##    q33_03_anxiety_survival_covid                                                                                                                                                                                          -0.060   
##    q33_05_anxiety_infecting_others                                                                                                                                                                                                 
##  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

f. Creation of Anxiety Index , step 5: creation and descriptives

After Reliability analysis and CFA, we combine the multiple variables into one named anxiety_index. We also render visualization and descriptive statistics for the new anxiety_index variable.

#Creating the anxiety index, consisting of the average the values of the multiple variables selected through factor analysis to represent the underlying construct of anxiety.

anxiety_index <- apply(cbind(data$q30_anxiety_infection_covid,
                             data$q31_anxiety_infection_friends,
                             data$q33_01_anxiety_situation,
                             data$q33_02_anxiety_low_control,
                             data$q33_03_anxiety_survival_covid,
                             data$q33_05_anxiety_infecting_others), 1, mean)

#Adding the vector as an column to the existing dataset.

data <- cbind(data, anxiety_index)

#To summarize the anxiety_index variable, we use the descriptives() function from the jmv package.

jmv::descriptives(
    data = data,
    missing = TRUE,
    vars = "anxiety_index",
    sd = TRUE,
    median = FALSE,
    quart = TRUE,
    range = TRUE,
    box = TRUE)
## 
##  DESCRIPTIVES
## 
##  Descriptives                            
##  ─────────────────────────────────────── 
##                          anxiety_index   
##  ─────────────────────────────────────── 
##    N                              1482   
##    Missing                           2   
##    Mean                           4.86   
##    Standard deviation             1.86   
##    Range                          9.00   
##    Minimum                        1.00   
##    Maximum                        10.0   
##    25th percentile                3.50   
##    50th percentile                4.83   
##    75th percentile                6.17   
##  ───────────────────────────────────────

5. Simplified age-moderated & anxiety-mediated model

a. Simple mediation model (without moderator)

To explore our hypothesized pathway (see H11) between social media exposure and depression, partially mediated by anxiety, we conduct a mediation analysis.

#To create the mediation model, we use the med() function from the medmod package.Before running the model, we need to transform the social media string dummy (yes/no) back to its numeric form.

levels(data$q18_02_soc_media_info) <- list("1" = "yes", "2" = "no")
data$q18_02_soc_media_info <- as.numeric(as.character(data$q18_02_soc_media_info))

# Centering continuous variables (without scaling)
data <- data %>% 
        mutate(PHQ8.c = scale(PHQ8, scale = FALSE)) %>% 
        mutate(q02_age.c = scale(q02_age, scale = FALSE)) %>%
        filter(!is.na(anxiety_index)) %>%
        mutate(anxiety_index.c = scale(anxiety_index, scale = FALSE)) %>%
        mutate(q18_02_soc_media_info.c = scale(q18_02_soc_media_info, 
                                               scale = FALSE))

#Seed for reproducibility of the results (due to bootstrap)
set.seed(2021)

medmod::med(
    data = data,
    dep = "PHQ8.c",
    med = "anxiety_index.c",
    pred = "q18_02_soc_media_info.c",
    estMethod = "bootstrap",
    bootstrap = 1000,
    ci = TRUE,
    pm = TRUE,
    paths = TRUE,
    label = TRUE)
## 
##  MEDIATION
## 
##  Mediation Estimates                                                                                    
##  ────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Effect      Label        Estimate    SE        Lower     Upper      Z        p         % Mediation   
##  ────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    Indirect    a × b         -0.0904    0.0748    -0.249     0.0532    -1.21     0.227           4.74   
##    Direct      c             -1.8179    0.2641    -2.313    -1.2869    -6.88    < .001          95.26   
##    Total       c + a × b     -1.9083    0.2737    -2.414    -1.3789    -6.97    < .001         100.00   
##  ────────────────────────────────────────────────────────────────────────────────────────────────────── 
## 
## 
##  Path Estimates                                                                                                             
##  ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##                                                       Label    Estimate    SE        Lower     Upper      Z        p        
##  ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
##    q18_02_soc_media_info.c    →    anxiety_index.c    a          -0.136    0.1107    -0.358     0.0770    -1.23     0.220   
##    anxiety_index.c            →    PHQ8.c             b           0.667    0.0645     0.546     0.8016    10.34    < .001   
##    q18_02_soc_media_info.c    →    PHQ8.c             c          -1.818    0.2641    -2.313    -1.2869    -6.88    < .001   
##  ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

b. Complex age-moderated mediation model

To account for the significant effect of age, which is presumed to influence both the social media exposure and the depression pathway, we build a complex model using the lavaan package, where age acts as an additional moderator.

#Mediation analysis (path analysis framework, SEM) using lavaan package.

#For reproducibility of results
set.seed(2021)

#First, we specify the pathways
spec_mod <- "
#Regressions
anxiety_index.c ~ a1*q18_02_soc_media_info.c + a2*q02_age.c + a3*q18_02_soc_media_info.c:q02_age.c
PHQ8.c ~ cdash1*q18_02_soc_media_info.c + cdash2*q02_age.c + cdash3*q18_02_soc_media_info.c:q02_age.c + b1*anxiety_index.c

#Mean of centered age moderator (for use in simple slopes)
q02_age.c ~ q02_age.c.mean*1

#Variance of centered age moderator (for use in simple slopes)
q02_age.c ~~ q02_age.c.var*q02_age.c

#Indirect effects conditional on moderator (a1 + a3*ModValue)*b1
indirect.SDbelow := (a1 + a3*(q02_age.c.mean-sqrt(q02_age.c.var)))*b1
indirect.SDabove := (a1 + a3*(q02_age.c.mean+sqrt(q02_age.c.var)))*b1

#Direct effects conditional on moderator (cdash1 + cdash3*ModValue)
direct.SDbelow := cdash1 + cdash3*(q02_age.c.mean-sqrt(q02_age.c.var)) 
direct.SDabove := cdash1 + cdash3*(q02_age.c.mean+sqrt(q02_age.c.var))

#Total effects conditional on moderator
total.SDbelow := direct.SDbelow + indirect.SDbelow
total.SDabove := direct.SDabove + indirect.SDabove

#Proportion mediated conditional on moderator
prop.mediated.SDbelow := indirect.SDbelow / total.SDbelow
prop.mediated.SDabove := indirect.SDabove / total.SDabove

#Index of moderated mediation
index.mod.med := a3*b1
"

#Secondly, we fit/estimate the model
fit_mod <- lavaan::sem(model = spec_mod,
               data = data,
               se = "bootstrap",
               bootstrap = 1000)
## Warning in lavaan::lavaan(model = spec_mod, data = data, se = "bootstrap", :
## lavaan WARNING: syntax contains parameters involving exogenous covariates;
## switching to fixed.x = FALSE
#Finally, we summarize the model
lavaan::summary(fit_mod, 
                fit.measures = FALSE, 
                rsquare = TRUE, 
                standardize = TRUE)
## lavaan 0.6-6 ended normally after 50 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of free parameters                         18
##                                                       
##   Number of observations                          1482
##                                                       
## Model Test User Model:
##                                                       
##   Test statistic                               293.363
##   Degrees of freedom                                 2
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                            Bootstrap
##   Number of requested bootstrap draws             1000
##   Number of successful bootstrap draws            1000
## 
## Regressions:
##                     Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   anxiety_index.c ~                                                      
##     q18_02_   (a1)    -0.031    0.148   -0.209    0.834   -0.031   -0.007
##     q02_g.c   (a2)    -0.002    0.003   -0.668    0.504   -0.002   -0.020
##     q18_02_   (a3)     0.010    0.007    1.472    0.141    0.010    0.046
##   PHQ8.c ~                                                               
##     q18_02_ (cds1)    -0.517    0.284   -1.820    0.069   -0.517   -0.050
##     q02_g.c (cds2)    -0.062    0.006  -10.246    0.000   -0.062   -0.276
##     q18_02_ (cds3)     0.041    0.015    2.668    0.008    0.041    0.074
##     anxty_.   (b1)     0.655    0.064   10.204    0.000    0.655    0.265
## 
## Covariances:
##                              Estimate  Std.Err  z-value  P(>|z|)   Std.lv
##   q18_02_soc_media_info.c ~~                                             
##     q18_02___.:02_             -1.447    0.125  -11.609    0.000   -1.447
##   Std.all
##          
##    -0.391
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     q02_g.c (q02_)    0.022    0.535    0.040    0.968    0.022    0.001
##    .anxty_.          -0.034    0.053   -0.642    0.521   -0.034   -0.018
##    .PHQ8.c           -0.136    0.120   -1.136    0.256   -0.136   -0.030
##     q18_02_           0.000    0.012    0.000    1.000    0.000    0.000
##     q18_02_           3.259    0.208   15.647    0.000    3.259    0.394
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     q02_g.c (q02_)  423.795    9.022   46.974    0.000  423.795    1.000
##    .anxty_.           3.450    0.118   29.277    0.000    3.450    0.997
##    .PHQ8.c           17.749    0.838   21.183    0.000   17.749    0.837
##     q18_02_           0.200    0.005   37.732    0.000    0.200    1.000
##     q18_02_          68.457    2.447   27.976    0.000   68.457    1.000
## 
## R-Square:
##                    Estimate
##     anxiety_indx.c    0.003
##     PHQ8.c            0.163
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     indirect.SDblw   -0.161    0.085   -1.884    0.060   -0.161   -0.014
##     indirect.SDabv    0.121    0.175    0.690    0.490    0.121    0.010
##     direct.SDbelow   -1.363    0.354   -3.846    0.000   -1.363   -0.124
##     direct.SDabove    0.331    0.488    0.678    0.498    0.331    0.024
##     total.SDbelow    -1.524    0.363   -4.199    0.000   -1.524   -0.138
##     total.SDabove     0.451    0.521    0.866    0.387    0.451    0.034
##     prp.mdtd.SDblw    0.106    0.062    1.692    0.091    0.106    0.103
##     prop.mdtd.SDbv    0.268    4.561    0.059    0.953    0.268    0.304
##     index.mod.med     0.007    0.005    1.460    0.144    0.007    0.012
#We can also vizalize the path diagram with lavaanPlot package
lavaanPlot(model = fit_mod)
plot q18_02_soc_media_infoc q18_02_soc_media_infoc anxiety_indexc anxiety_indexc q18_02_soc_media_infoc->anxiety_indexc q18_02_soc_media_infoc:q02_agec->anxiety_indexc PHQ8c PHQ8c q18_02_soc_media_infoc->PHQ8c q18_02_soc_media_infoc:q02_agec->PHQ8c q02_agec q02_agec q02_agec->anxiety_indexc q02_agec->PHQ8c anxiety_indexc->PHQ8c

6. Visualizing the qualitative responses using Word Clouds

Part of the survey (q50) was dedicated to the comments of the respondents on their situation. To visualize this textual data, we use two pairs of two word clouds.

First Word Cloud pair visualizes the most common tokens and lemma (size and color represents frequency of the word). Second Word Cloud pair uses sentiment analysis technique to create two distinct word clouds (using only tokens, not lemma), one visualizes only words with positive emotional sentiment, while the second only words with negative sentiment.

a. Word Clouds of all textual responses, step 1: pre-processing and tokens Word Cloud

#Remove stop words - first, we load the public stop word list
stop_words_cz <- read_csv("https://raw.githubusercontent.com/stopwords-iso/stopwords-cs/master/stopwords-cs.txt", col_names = "word")
   
## Should the above link become obsolete, alternative source can be reached using "stopwords" library: stop_words_cz <- as_tibble_col(stopwords::stopwords("cs", source = "stopwords-iso"), column_name = "word")

#To be able to lemmatize tokens, we need to download Czech model
udmodel <- udpipe_download_model(language = "czech-pdt", overwrite = FALSE)

# Reshape the data frame into one column called "word"
tidy_dat <- gather(dplyr::as_tibble(data$q50), key, word) %>% 
            dplyr::select(word)

# Tokenize - one word per row of a dataframe/tibble
tokens <- tidy_dat %>%
          unnest_tokens(word, word) %>%
          dplyr::count(word, sort = TRUE) %>%
          ungroup()
                       
#Removing stop words by using anti_join() applied on the stop words list

tokens_clean <- tokens %>%
                anti_join(stop_words_cz)

#Next, we remove numbers (optional step)
nums <- tokens_clean %>% 
        dplyr::filter(str_detect(word, "^[0-9]")) %>% 
        dplyr::select(word) %>% unique()

tokens_clean <- tokens_clean %>% 
  anti_join(nums, by = "word")

#We can also remove unique stop words that are still present (optional step)
uni_sw <- data.frame(word = c("např"))

tokens_clean <- tokens_clean %>% 
  anti_join(uni_sw, by = "word")

#Define a color palette for the Word Cloud
palette <- brewer.pal(8,"Dark2")

#Using seed for reproducibility of the Word Cloud look 
set.seed(2021)

#We generate a Word Cloud using tokens
tokens_clean %>% with(wordcloud(word, 
                                n, 
                                random.order = FALSE,
                                scale = c(7,.5), 
                                min.freq = 1, 
                                max.words = 50, 
                                colors = palette))

b. Word Clouds of all textual responses, step 2: pre-processing and lemma Word Cloud

#Lemmatization of tokens, using udpipe package
udpipe_tokens_lemma <- udpipe(x = tokens_clean$word,
                                object = udmodel)

tidy_dat_lemma <- gather(dplyr::as_tibble(udpipe_tokens_lemma$lemma),
                         key, 
                         word) %>% 
                  dplyr::select(word) %>% 
                  dplyr::count(word, sort = TRUE)

tokens_clean_lemma <- tidy_dat_lemma %>%
                      anti_join(stop_words_cz)

#Using seed for reproducibility of the word cloud look 
set.seed(2021)

#We generate a Word Cloud using lemma
tokens_clean_lemma %>% with(wordcloud(word,
                                      n, 
                                      random.order = FALSE, 
                                      scale = c(6,.5), 
                                      min.freq = 1, 
                                      max.words = 50, 
                                      colors = palette))

c. Sentiment analysis of qualitative responses, step 1: pre-processing and Word Cloud with positive valency

#First, we load Czech Subjectivity Lexicon from ÚFAL MFF, which assesses sentiment for every word as positive or negative

sentiment_cz <- read_delim("https://lindat.mff.cuni.cz/repository/xmlui/bitstream/handle/11858/00-097C-0000-0022-FF60-B/sublex_1_0.csv?sequence=1&isAllowed=y",
                           "\t", 
                           escape_double = FALSE, 
                           col_names = FALSE, 
                           trim_ws = TRUE) %>% 
                           rename("word" = "X3", "sentiment" = "X4")

#Next, we create tidy tibble with tokens created in the previous section and we use inner_join function to separately save only the tokens with positive and negative valency

tokens_sentiment_positive <- tokens_clean_lemma %>% 
                             inner_join(sentiment_cz %>% 
                             filter(sentiment == "POS")) %>% 
                             count(word, sort = TRUE)

tokens_sentiment_negative <- tokens_clean_lemma %>% 
                             inner_join(sentiment_cz %>% 
                             filter(sentiment == "NEG")) %>% 
                             count(word, sort = TRUE)

#We generate a Word Cloud using only tokens with positive valency

#Using seed for reproducibility of the Word Cloud look 
set.seed(5471)

tokens_sentiment_positive %>% with(wordcloud(word,
                                             n, 
                                             random.order = FALSE, 
                                             scale = c(5,.5), 
                                             max.words = 50,
                                             min.freq = 1,
                                             colors = palette, 
                                             random.color = TRUE))

d. Sentiment analysis of qualitative responses, step 2: Word Cloud with negative valency

#Finally, a Word Cloud using only tokens with negative valency

#Using seed for reproducibility of the Word Cloud look 
set.seed(5471)

tokens_sentiment_negative %>% with(wordcloud(word,
                                             n, 
                                             random.order = FALSE, 
                                             scale = c(3,.5), 
                                             max.words = 50, 
                                             min.freq = 1,
                                             colors = palette, 
                                             random.color = TRUE))

7. Bibliography

Ambresin, G., P. Chondros, C. Dowrick, H. Herrman, and J. M. Gunn. 2014. “Self-Rated Health and Long-Term Prognosis of Depression.” The Annals of Family Medicine 12 (1): 57–65. https://doi.org/10.1370/afm.1562.

Awaworyi Churchill, S., and L. Farrell. 2017. “Alcohol and Depression: Evidence from the 2014 Health Survey for England.” Drug and Alcohol Dependence 180 (November): 86–92. https://doi.org/10.1016/j.drugalcdep.2017.08.006.

Bendau, Antonia, Moritz Bruno Petzold, Lena Pyrkosch, Lea Mascarell Maricic, Felix Betzler, Janina Rogoll, Julia Große, Andreas Ströhle, and Jens Plag. 2020. “Associations between COVID-19 related media consumption and symptoms of anxiety, depression and COVID-19 related fear in the general population in Germany.” European Archives of Psychiatry and Clinical Neuroscience 1 (July): 3. https://doi.org/10.1007/s00406-020-01171-6.

Dhir, Amandeep, Yossiri Yossatorn, Puneet Kaur, and Sufen Chen. 2018. “Online social media fatigue and psychological wellbeing—A study of compulsive use, fear of missing out, fatigue, anxiety and depression.” International Journal of Information Management 40 (June): 141–52. https://doi.org/10.1016/j.ijinfomgt.2018.01.012.

Gloster, Andrew T., Demetris Lamnisos, Jelena Lubenko, Giovambattista Presti, Valeria Squatrito, Marios Constantinou, Christiana Nicolaou, et al. 2020. “Impact of COVID-19 pandemic on mental health: An international study.” Edited by Joel Msafiri Francis. PLOS ONE 15 (12): e0244809. https://doi.org/10.1371/journal.pone.0244809.

González-Sanguino, Clara, Berta Ausín, Miguel Ángel Castellanos, Jesús Saiz, Aída López-Gómez, Carolina Ugidos, and Manuel Muñoz. 2020. “Mental Health Consequences During the Initial Stage of the 2020 Coronavirus Pandemic (Covid-19) in Spain.” Brain, Behavior, and Immunity 87 (July): 172–76. https://doi.org/10.1016/j.bbi.2020.05.040.

Harvey, Samuel B., Simon Øverland, Stephani L. Hatch, Simon Wessely, Arnstein Mykletun, and Matthew Hotopf. 2018. “Exercise and the Prevention of Depression: Results of the Hunt Cohort Study.” American Journal of Psychiatry 175 (1): 28–36. https://doi.org/10.1176/appi.ajp.2017.16111223.

Hossain, Md. Tanvir, Benojir Ahammed, Sanjoy Kumar Chanda, Nusrat Jahan, Mahfuza Zaman Ela, and Md. Nazrul Islam. 2020. “Social and Electronic Media Exposure and Generalized Anxiety Disorder Among People During Covid-19 Outbreak in Bangladesh: A Preliminary Observation.” Edited by Amir H. Pakpour. PLOS ONE 15 (9): e0238974. https://doi.org/10.1371/journal.pone.0238974.

Jacob, Louis, Josep Maria Haro, and Ai Koyanagi. 2019. “Relationship Between Living Alone and Common Mental Disorders in the 1993, 2000 and 2007 National Psychiatric Morbidity Surveys.” Edited by Soraya Seedat. PLOS ONE 14 (5): e0215182. https://doi.org/10.1371/journal.pone.0215182.

Kowal, Marta, Tao Coll‐Martín, Gözde Ikizer, Jesper Rasmussen, Kristina Eichel, Anna Studzińska, Karolina Koszałkowska, et al. 2020. “Who is the Most Stressed During the COVID‐19 Pandemic? Data From 26 Countries and Areas.” Applied Psychology: Health and Well-Being 12 (4): 946–66. https://doi.org/10.1111/aphw.12234.

Kroenke, Kurt, Tara W. Strine, Robert L. Spitzer, Janet B. W. Williams, Joyce T. Berry, and Ali H. Mokdad. 2009. “The PHQ-8 as a measure of current depression in the general population.” Journal of Affective Disorders 114 (1-3): 163–73. https://doi.org/10.1016/j.jad.2008.06.026.

Krogh, Jesper, Carsten Hjorthøj, Helene Speyer, Christian Gluud, and Merete Nordentoft. 2017. “Exercise for patients with major depression: A systematic review with meta-analysis and trial sequential analysis.” BMJ Open 7 (9): e014820. https://doi.org/10.1136/bmjopen-2016-014820.

Kvam, Siri, Catrine Lykkedrang Kleppe, Inger Hilde Nordhus, and Anders Hovland. 2016. “Exercise as a treatment for depression: A meta-analysis.” Elsevier B.V. https://doi.org/10.1016/j.jad.2016.03.063.

Losada-Baltar, Andrés, Lucía Jiménez-Gonzalo, Laura Gallego-Alberto, María del Sequeros Pedroso-Chaparro, José Fernandes-Pires, and María Márquez-González. 2020. ““We Are Staying at Home.” Association of Self-Perceptions of Aging, Personal and Family Resources, and Loneliness with Psychological Distress During the Lock-down Period of Covid-19.” Edited by Derek Issacowitz. The Journals of Gerontology: Series B 76 (2): e10–e16. https://doi.org/10.1093/geronb/gbaa048.

Luo, Min, Lixia Guo, Mingzhou Yu, Wenying Jiang, and Haiyan Wang. 2020. “The Psychological and Mental Impact of Coronavirus Disease 2019 (Covid-19) on Medical Staff and General Public a Systematic Review and Meta-Analysis.” Psychiatry Research 291 (September): 113190. https://doi.org/10.1016/j.psychres.2020.113190.

Mertens, Gaëtan, Lotte Gerritsen, Stefanie Duijndam, Elske Salemink, and Iris M. Engelhard. 2020. “Fear of the Coronavirus (Covid-19): Predictors in an Online Study Conducted in March 2020.” Journal of Anxiety Disorders 74 (August): 102258. https://doi.org/10.1016/j.janxdis.2020.102258.

Primack, Brian A., Ariel Shensa, César G. Escobar-Viera, Erica L. Barrett, Jaime E. Sidani, Jason B. Colditz, and A. Everette James. 2017. “Use of multiple social media platforms and symptoms of depression and anxiety: A nationally-representative study among U.S. young adults.” Computers in Human Behavior 69 (April): 1–9. https://doi.org/10.1016/j.chb.2016.11.013.

Rasmussen, Eric E., Narissra Punyanunt-Carter, Jenna R. LaFreniere, Mary S. Norman, and Thomas G. Kimball. 2020. “The Serially Mediated Relationship Between Emerging Adults’ Social Media Use and Mental Well-Being.” Computers in Human Behavior 102 (January): 206–13. https://doi.org/10.1016/j.chb.2019.08.019.

Salk, Rachel H., Janet S. Hyde, and Lyn Y. Abramson. 2017. “Gender differences in depression in representative national samples: Meta-analyses of diagnoses and symptoms.” Psychological Bulletin 143 (8): 783–822. https://doi.org/10.1037/bul0000102.

Schuch, Felipe B., Davy Vancampfort, Justin Richards, Simon Rosenbaum, Philip B. Ward, and Brendon Stubbs. 2016. “Exercise as a treatment for depression: A meta-analysis adjusting for publication bias.” Journal of Psychiatric Research 77 (June): 42–51. https://doi.org/10.1016/j.jpsychires.2016.02.023.

Shevlin, Mark, Orla McBride, Jamie Murphy, Jilly Gibson Miller, Todd K. Hartman, Liat Levita, Liam Mason, et al. 2020. “Anxiety, Depression, Traumatic Stress and Covid-19-Related Anxiety in the Uk General Population During the Covid-19 Pandemic.” BJPsych Open 6 (6). https://doi.org/10.1192/bjo.2020.109.

Stanca, Luca. 2012. “Suffer the Little Children: Measuring the Effects of Parenthood on Well-Being Worldwide.” Journal of Economic Behavior & Organization 81 (3): 742–50. https://doi.org/10.1016/j.jebo.2010.12.019.

Stanton, Robert, Quyen G. To, Saman Khalesi, Susan L. Williams, Stephanie J. Alley, Tanya L. Thwaite, Andrew S. Fenning, and Corneel Vandelanotte. 2020. “Depression, Anxiety and Stress During Covid-19: Associations with Changes in Physical Activity, Sleep, Tobacco and Alcohol Use in Australian Adults.” International Journal of Environmental Research and Public Health 17 (11): 4065. https://doi.org/10.3390/ijerph17114065.

Stubbs, Brendon, Davy Vancampfort, Mats Hallgren, Joseph Firth, Nicola Veronese, Marco Solmi, Serge Brand, et al. 2018. “EPA guidance on physical activity as a treatment for severe mental illness: a meta-review of the evidence and Position Statement from the European Psychiatric Association (EPA), supported by the International Organization of Physical Therapists in Mental Health (IOPTMH).” European Psychiatry 54 (October): 124–44. https://doi.org/10.1016/j.eurpsy.2018.07.004.

Taylor, Melanie R, Kingsley E Agho, Garry J Stevens, and Beverley Raphael. 2008. “Factors Influencing Psychological Distress During a Disease Epidemic: Data from Australia’s First Outbreak of Equine Influenza.” BMC Public Health 8 (1). https://doi.org/10.1186/1471-2458-8-347.

Tull, Matthew T., Keith A. Edmonds, Kayla M. Scamaldo, Julia R. Richmond, Jason P. Rose, and Kim L. Gratz. 2020. “Psychological Outcomes Associated with Stay-at-Home Orders and the Perceived Impact of Covid-19 on Daily Life.” Psychiatry Research 289 (July): 113098. https://doi.org/10.1016/j.psychres.2020.113098.

Vannucci, Anna, Kaitlin M. Flannery, and Christine McCauley Ohannessian. 2017. “Social Media Use and Anxiety in Emerging Adults.” Journal of Affective Disorders 207 (January): 163–66. https://doi.org/10.1016/j.jad.2016.08.040.

Vindegaard, Nina, and Michael Eriksen Benros. 2020. “COVID-19 Pandemic and Mental Health Consequences: Systematic Review of the Current Evidence.” Brain, Behavior, and Immunity 89 (October): 531–42. https://doi.org/10.1016/j.bbi.2020.05.048.

Wang, Cuiyan, Riyu Pan, Xiaoyang Wan, Yilin Tan, Linkang Xu, Roger S. McIntyre, Faith N. Choo, et al. 2020. “A Longitudinal Study on the Mental Health of General Population During the Covid-19 Epidemic in China.” Brain, Behavior, and Immunity 87 (July): 40–48. https://doi.org/10.1016/j.bbi.2020.04.028.

Wheaton, Michael G., Alena Prikhidko, and Gabrielle R. Messner. 2021. “Is Fear of Covid-19 Contagious? The Effects of Emotion Contagion and Social Media Use on Anxiety in Response to the Coronavirus Pandemic.” Frontiers in Psychology 11 (January). https://doi.org/10.3389/fpsyg.2020.567379.