Executive summary

Many people in the modern society use social media. Some people use social media with a clear purpose to get information or have their own profile, but most people use it without much purpose, such as because their friends do it or to take time away. On social media, a space that opens itself up to not only close acquaintances but also strangers, people do not want to show their dirty work or bad work. They only want to show their success, living well, and being happy. Therefore, people on social media are only people with money and happiness without worries. When you encounter these images every day, you are forced to compare their situation with your own, and you lament your situation and fall into depression. In social media that is used for no purpose, people are stressed and depressed by comparing them to others without knowing.

Our team would like to talk about the impact of this use of social media on mental health.

Data background

This data was investigated to examine the effect of social media use on mental health in statistics lecture at university. Mental health-related questions are provided on a Likert scale along with data such as age, social media in use, social media usage time and etc. This data contains a five-point Likert scale survey of various variables such as comparison with others, depression, and sleep disorders. Through five point scale variables, the correlation between social media use and mental health can be found.

Data Cleaning

The original dataset contains responses from a total of 481 participants, ranging from teenagers to those aged 70 and above, with one timestamp and responses to 20 questions. To focus on the analysis of the most active age group, the respondents in their 20s, three data preprocessing steps were undertaken.

  1. The column names were redefined.

In the original dataset, the names were defined as long sentences in question form to elicit responses. In order to reprocess and analyze it smoothly, it was redefined as a new name. It was set in a short form so that only the core of the question could be known.

  1. Invalid values were removed.

While there were no missing values for the timestamp and responses to the 20 questions, some data contained invalid values (e.g., age - 26.7). For rows containing such invalid values, the appropriateness of the other responses was deemed uncertain. Hence, these rows were filtered out, and the analysis proceeded. Since a proper response for “age” should be an integer, erroneous non-integer data were filtered out. The filtered valid data were then converted to integers and saved.

  1. The data was filtered to limit the age range to the 20s.

The original dataset encompassed individuals aged 10 to 70 and above. However, respondents in their 20s constituted an overwhelming majority, with 335 out of 481 participants, accounting for approximately 69.7%. Therefore, rather than analyzing the entire age range, focusing on the 20s, which constitute over half of the total responses and have a significant association with social media, was deemed more meaningful. Consequently, the data was filtered to include individuals aged 20 to less than 30.

smmh <- read_csv("data/smmh.csv")
## Rows: 481 Columns: 21
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (8): Timestamp, 2. Gender, 3. Relationship Status, 4. Occupation Status...
## dbl (13): 1. What is your age?, 9. How often do you find yourself using Soci...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# Redefining Names for Each Column
colnames(smmh) <- c("timestamp","age","gender","relationship","occupation",
                    "affiliated_organizations","use_social_media","social_media_platforms","daily_time","without_purpose",
                    "distracted","restless","distractibility","worry","difficulty_concentrating",
                    "compare","fellings_comparisons","validation","depressed","fluctuation","sleepissues")  

# Removing invalid values
smmh <- smmh %>%
  filter(!is.na(as.integer(age)))

# Converting Response Data for Age to Integer
smmh$age <- as.integer(smmh$age)

# Filtering for the 20s
smmh_cleaned <- smmh %>%
    filter(age >= 20 & age <30)

smmh_cleaned
## # A tibble: 335 × 21
##    timestamp           age gender relationship occupation affiliated_organizat…¹
##    <chr>             <int> <chr>  <chr>        <chr>      <chr>                 
##  1 4/19/2022 9:17:32    20 Female In a relati… Universit… University            
##  2 4/19/2022 21:15:…    20 Female Single       Universit… University            
##  3 4/20/2022 10:51:…    20 Male   Single       Universit… University            
##  4 5/11/2022 20:41:…    20 Female Single       Universit… University            
##  5 5/11/2022 21:19:…    20 Male   Single       Universit… University            
##  6 5/11/2022 21:34:…    20 Female In a relati… Universit… University            
##  7 5/11/2022 22:55:…    20 Male   Single       Salaried … Company               
##  8 5/12/2022 0:41:56    20 Male   Divorced     Universit… University            
##  9 5/12/2022 3:02:05    20 Male   Single       Universit… School, University    
## 10 5/13/2022 0:27:42    20 Female Single       Universit… University            
## # ℹ 325 more rows
## # ℹ abbreviated name: ¹​affiliated_organizations
## # ℹ 15 more variables: use_social_media <chr>, social_media_platforms <chr>,
## #   daily_time <chr>, without_purpose <dbl>, distracted <dbl>, restless <dbl>,
## #   distractibility <dbl>, worry <dbl>, difficulty_concentrating <dbl>,
## #   compare <dbl>, fellings_comparisons <dbl>, validation <dbl>,
## #   depressed <dbl>, fluctuation <dbl>, sleepissues <dbl>

Individual figures

Figure 1

smmh_new <- smmh_cleaned %>%
    group_by(age, daily_time) %>%
    summarise_if(is.numeric, funs(mean, sd), na.rm = TRUE) %>%
    ungroup()
## Warning: `funs()` was deprecated in dplyr 0.8.0.
## ℹ Please use a list of either functions or lambdas:
## 
## # Simple named list: list(mean = mean, median = median)
## 
## # Auto named with `tibble::lst()`: tibble::lst(mean, median)
## 
## # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
smmh_new
## # A tibble: 54 × 26
##      age daily_time           without_purpose_mean distracted_mean restless_mean
##    <int> <chr>                               <dbl>           <dbl>         <dbl>
##  1    20 Between 1 and 2 hou…                 3               3.2           1.8 
##  2    20 Between 2 and 3 hou…                 4               3.6           3.4 
##  3    20 Between 3 and 4 hou…                 3.8             3.2           2.3 
##  4    20 Between 4 and 5 hou…                 4.14            4.14          4   
##  5    20 Less than an Hour                    2.67            1.33          1   
##  6    20 More than 5 hours                    4.2             4.07          3.13
##  7    21 Between 1 and 2 hou…                 3.25            3.5           2   
##  8    21 Between 2 and 3 hou…                 3.33            3.53          3.07
##  9    21 Between 3 and 4 hou…                 3.71            3.46          2.62
## 10    21 Between 4 and 5 hou…                 3.46            3.85          3.23
## # ℹ 44 more rows
## # ℹ 21 more variables: distractibility_mean <dbl>, worry_mean <dbl>,
## #   difficulty_concentrating_mean <dbl>, compare_mean <dbl>,
## #   fellings_comparisons_mean <dbl>, validation_mean <dbl>,
## #   depressed_mean <dbl>, fluctuation_mean <dbl>, sleepissues_mean <dbl>,
## #   without_purpose_sd <dbl>, distracted_sd <dbl>, restless_sd <dbl>,
## #   distractibility_sd <dbl>, worry_sd <dbl>, …
p <- ggplot(data = smmh_new,
            mapping = aes(x = without_purpose_mean,
                          y = compare_mean,
                          color = daily_time))
p + geom_point(size = 3) + 
    labs(title = "Correlation between Using without purpose and Compare by Daily Media Use",
         x = "Using Social Media Without Purpose",
         y = "Mean Compare With Others") +
    annotate(geom = "rect", xmin = 3.4, xmax = 5.2,
             ymin = 2.1, ymax = 4.1, fill = "magenta", alpha = 0.05) +
    annotate(geom = "rect", xmin = 0.9, xmax = 2.8,
             ymin = 0.9, ymax = 3.1, fill = "blue", alpha = 0.05)

ggsave(filename = "images/purpose_compare.png")
## Saving 7 x 5 in image

We used dotted graph for examining the degree of comparison with others according to the degree of use of social media. Also, we tried to check whether there is a difference according to the usage time.

Through the part where many dots were gathered, it was confirmed that the higher the degree of use of social media without purpose, the more they compared with others.

When dividing into three groups: low use (less than 1 hour, 1 hour to 2 hours), medium use (2 to 4 hours), and high use (more than 4 hours),

the low-use group had a low degree of use of social media without purpose, and the high-use group had a high degree of use without purpose. The groups showing high comparison with others were the middle use and high use groups.

Through the dotted graph, we could find out that people who spend less time on social media do not use it without purpose and do not compare with others that much. On the other hand, we could find out that people who spend more than 2 hours usually use social media without purpose and they compare with others.

Figure 2

smmh2 <- smmh_cleaned %>%
    group_by(daily_time, compare)%>%
    summarize(mean_compare = mean(compare), mean_depressed = mean(depressed))
## `summarise()` has grouped output by 'daily_time'. You can override using the
## `.groups` argument.
p2 <- ggplot(data = smmh2,
             mapping = aes(x = compare, y = mean_depressed, color = daily_time))
p2 + geom_smooth() +
    labs(title = "Correlation between Compare with others and Feeling Depressed", x = "Compare With Others", y = "Mean Feeling Depressed")
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 4.0804
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 4.0804
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 4.0804
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 4.0804
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 4.0804
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 4.0804
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 4.0804
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 4.0804
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 9.1204
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 9.1204
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 4.0804
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 4.0804
## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

ggsave(filename = "images/compare_depressed.png")
## Saving 7 x 5 in image
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 4.0804
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 4.0804
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 4.0804
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 4.0804
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 4.0804
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 4.0804
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 4.0804
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 4.0804
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 9.1204
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 9.1204
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : span too small.  fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.98
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.02
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 4.0804
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : span too small.  fewer
## data values than degrees of freedom.
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.98
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.02
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 0
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 4.0804
## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

## Warning in max(ids, na.rm = TRUE): max에 전달되는 인자들 중 누락이 있어 -Inf를
## 반환합니다

Second, we looked at the effect of the degree of comparison with others on depression based on social media usage time. At this time, we tried to compare the effects by grouping data into social media usage time.

First of all, “geom_smooth()” was used to show the correlation between the degree of comparison with others and depression. Overall, it can be seen that the degree of comparison with others affects the degree of depression by showing an upward graph.

If we compare the effect of usage time here, we can see that the graph of people who use it for less than an hour is placed at the bottom (blue) and the graph of people who use it for more than five hours is placed at the top (pink).

For the middle-use group that uses 2 to 4 hours, there is no significant difference between each usage time. However, from the clear difference between the high-use and low-use groups, we can see that the more time we spend on social media, the more we compare with others, and the more we feel depression through it. The less time we spend on social media, the less we compare with others, and the less we feel depression.

Figure 3

smmh2 <- smmh_cleaned %>%
    group_by(daily_time) %>% 
    summarize(mean_depressed = mean(depressed), mean_sleepissues = mean(sleepissues))

p3 <- ggplot(data = smmh2,
             mapping = aes(x = mean_depressed,
                           y = mean_sleepissues,
                           label = daily_time,
                           color = daily_time))

p3 + geom_point(size = 3) + 
    geom_text(vjust = -1, size = 3) + 
    labs(title = "<Correlation between Depression and Sleep Issues by Daily Media Use>",
         x = "Mean Depression Level",
         y = "Mean Sleep Issues Scale") +
    annotate(geom = "rect", xmin = 3.55, xmax = 3.9,
             ymin = 3.35, ymax = 3.6, fill = "magenta", alpha = 0.1) +
    annotate(geom = "text", x = 3.55, y = 3.5, color = "magenta",
             label = "High Depression \nHigh Sleep Issues <=", 
             size = 3.5, hjust = 1) +
    annotate(geom = "rect", xmin = 2.45, xmax = 2.75,
             ymin = 2.9, ymax = 3.05, fill = "blue", alpha = 0.1) +
    annotate(geom = "text", x = 2.75, y = 3.0, color = "blue",
             label = "=> Low Depression \n Low Sleep Issues", 
             size = 3.5, hjust = 0) +
    theme(legend.position = "none",
          plot.title = element_text(size = 14, hjust = 0.5, face='bold'))

ggsave(filename = "images/depression_sleep.png")
## Saving 7 x 5 in image

Finally, we compared how the degree of sleep issues appear according to the degree of depression based on the daily using time.

Both depression and sleep disturbances are measured on a 5-point scale, we tried to compare them using mean values. In addition to examining the relationship between depression and sleep disturbances, this involves a triple comparison based on usage levels. To visualize the association for three criteria, we implemented a scatter plot using “geom_point()”.

To implement the graph that examines the distribution of each group, we initially grouped them based on the usage of social media. Subsequently, we calculated the mean values for depression and sleep disturbances in each group. After that, we mapped depression on the x-axis and sleep disturbances on the y-axis to derive the relationship.

The graph reveals several meaningful insights:

  • The group with less than an hour of daily social media usage shows lower levels of both depression and sleep disturbances. (blue box)
  • In cases of excessive social media usage (4 hours or more), both depression and sleep disturbances appear to be high. (pink box)

Through this, we can draw the following insights:

  • Considering the results of the intermediate group with 1-4 hours of usage, it’s evident that the scales of social media usage time, depression, and sleep disturbances are not directly proportional. However, when considering the overall results, a high correlation is observed. Especially, there is a significant difference between the group that hardly uses social media and the group with 4 hours or more of high usage.
  • Considering the results of the “Between 4 and 5 hours” group and the “More than 5 hours” group, it can be assumed that depression does not have a complete causal relationship as a single cause of sleep disorders, but it is generally highly associated

=> Through the three graphs, we can ultimately conclude:

Generally, the more time you spend on social media,
→ More likely to use social media without a specific purpose, and the probability of being overwhelmed by comparison tendencies with others is higher.
→ The higher the degree of comparison tendencies, the higher the level of depression.
→ Depression has a significant correlation with the extent of experiencing sleep disturbances.