source:https://health.clevelandclinic.org/mental-health-in-college-students
Introduction:
For this project I will be specifically looking at undergraduate’s mental health in Bangladesh. This project explores the complex sections of socioeconomic status, academic pressure, and mental well-being among the students. As school especially college become demanding, understanding what other factors contribute to students mental health especially depression are vital for developing a support system.
Data:
MLA Format: Citation:
Hasan, Md Zahid. “A Dataset on the Mental Health of Undergraduate Students in Bangladesh.” Mendeley Data, Mendeley Data, 9 Aug. 2024, data.mendeley.com/datasets/f4z2bfv7vk/1.
This data set was collected from a survey of 500 university students ranging from ages 18-28. This focuses specifically on psychological and demographic backgrounds. The data was orginially gathered by researchers investigating student welfare. Authors for this source were :
Md Zahid Hasan
Asadulla - Al - Galib,
Mohammad Shorif Uddin
Methodology: While the ReadMe file was not provided the data structure suggests a cross section survey where students self reported their experiences.
Why I chose this topic:
I chose this topic because as someone who is a freshman in college I saw drastically first hand how my mental health was affected due to different factors, I also wanted to see if the data supports a link between being financially stressed and emotionally distressed.
Observations & variables :
The dataset includes 501 observations as they conducted a survey where the students answered specific questions regarding their mental health, education status, socioeconomic living situation, and more. The data has Age, hours of sleep, and the year they are in for college as their quantitative variables with tons of categorical variables ranging from depression levels, residential areas, and more ( theres a total of 60 variables ).
Categorical Variables:
Socio-economic STATUS(also known as SES): classifies students int groups such as lower-middle,middle, and upper middle to represent their financial background.
Academic year: Recorded as years 1 -4 allowing for analysis of how mental health shifts as students progress in their degrees.
Residential area: Whether the student lives in a hall or outside hall ( in dorm or off campus) which helps in measure the impact of their living enviroment on loneliness.
Quantitative Varibales:
BDI-II score: numerical score from Beck depression inventory used to quantify the severity of depression symptoms.
PHQ-9 score: A standard numerical scale used to screen for and monitor depression
UCLA-8 Loneliness score: A numerical value derived from the UCLA loneliness scale, represents the intensisy of social isolation from the student
Hours of sleep: The average amount of sleep a student gets in a day, which shows if they have a balance between stress and their day-to-day life.
Disclamer: Although these tests are numerical, on the survey they ask them these questions (loneliness and depression) as worded answers so they aren’t technically quantitative but categorical.
By anazlyzing these different variables, this project will determine my research questions:
Research questions:
To what extent does a undergraduates Socio-Economic Status predict the severity of depressive symptoms among university students?
How do depression severity scores vary across academicyears (1-4), and is there a correlation, whether it’s positiveor negative, between these two mental health indicators among students?
Loading libraries
str(data)
## function (..., list = character(), package = NULL, lib.loc = NULL, verbose = getOption("verbose"),
## envir = .GlobalEnv, overwrite = TRUE)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.2.0 ✔ readr 2.2.0
## ✔ forcats 1.0.1 ✔ stringr 1.6.0
## ✔ ggplot2 4.0.2 ✔ tibble 3.3.1
## ✔ lubridate 1.9.5 ✔ tidyr 1.3.2
## ✔ purrr 1.2.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(gganimate)
library(gifski)
readr::read_csv("data.csv")
## Rows: 500 Columns: 63
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (62): Gender, Relationship Status, Academic Status, Do you work as well ...
## dbl (1): Age
##
## ℹ 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.
## # A tibble: 500 × 63
## Gender `Relationship Status` Age `Academic Status` Do you work as well as…¹
## <chr> <chr> <dbl> <chr> <chr>
## 1 Male Single 25 4 Year No
## 2 Female Single 23 3 Year No
## 3 Female Single 22 3 Year No
## 4 Male Single 21 3 Year No
## 5 Male Single 23 3 Year No
## 6 Male Single 23 3 Year No
## 7 Male Single 21 3 Year No
## 8 Male Single 22 3 Year No
## 9 Male Single 23 3 Year No
## 10 Male Single 23 3 Year No
## # ℹ 490 more rows
## # ℹ abbreviated name:
## # ¹`Do you work as well as Study?(পড়াশোনার পাশাপাশি চাকরি করেন?)`
## # ℹ 58 more variables: `Residential Area (আবাসিক এলাকা)` <chr>,
## # `Social Economic Status (আর্থ-সামাজিক অবস্থা)` <chr>,
## # `Do you feel any financial pressure?(আপনি কি কোনো আর্থিক চাপ অনুভব করছেন?)` <chr>,
## # `Does the participant have any debts?(অংশগ্রহণকারী কি কোন ঋণ আছে?)` <chr>, …
# --- Initial Inspection ---
# Checking the first few rows to ensure the data imported correctly
head(data)
##
## 1 function (..., list = character(), package = NULL, lib.loc = NULL,
## 2 verbose = getOption("verbose"), envir = .GlobalEnv, overwrite = TRUE)
## 3 {
## 4 fileExt <- function(x) {
## 5 db <- grepl("\\\\.[^.]+\\\\.(gz|bz2|xz)$", x)
## 6 ans <- sub(".*\\\\.", "", x)
library(gganimate)
library(gifski)
colnames(data)
## NULL
library(janitor)
##
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
library(readr)
library(janitor)
data <- read_csv("data.csv")
## Rows: 500 Columns: 63
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (62): Gender, Relationship Status, Academic Status, Do you work as well ...
## dbl (1): Age
##
## ℹ 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.
data <- clean_names(data)
data <- data %>%
clean_names()
colnames(data)
## [1] "gender"
## [2] "relationship_status"
## [3] "age"
## [4] "academic_status"
## [5] "do_you_work_as_well_as_study_parasonara_pasapasi_cakari_karena"
## [6] "residential_area_abasika_elaka"
## [7] "social_economic_status_artha_samajika_abastha"
## [8] "do_you_feel_any_financial_pressure_apani_ki_kono_arthika_capa_anubhaba_karachena"
## [9] "does_the_participant_have_any_debts_ansagrahanakari_ki_kona_rna_ache"
## [10] "are_you_satisfied_with_your_current_living_environment_apani_ki_apanara_bartamana_basabasera_paribese_santusta"
## [11] "have_you_recently_lost_someone_close_to_you_apani_samprati_apanara_kachera_ka_uke_hariyechena_ki_na"
## [12] "you_are_actively_engaging_as_a_participant_in_physical_exertion_apani_sakriyabhabe_saririka_parisrame_ansagrahanakari_hisabe_jarita"
## [13] "are_you_afflicted_by_any_significant_ailments_apani_ki_kona_o_gurutara_asukhe_bhugachena"
## [14] "are_you_currently_on_any_prescribed_medication_apani_ki_bartamane_kona_o_osudha_sebana_karachena"
## [15] "are_you_accustomed_to_smoking_apani_ki_dhumapane_abhyasta"
## [16] "do_you_consume_alcoholic_beverages_apani_ki_a_yalakohalayukta_paniya_grahana_karena"
## [17] "what_is_your_average_nightly_sleep_duration_in_hours_apanara_ratera_ghumera_gara_samayakala_kata_ghantara_madhye"
## [18] "average_hours_that_the_participant_spends_in_social_network_in_a_day_ansagrahanakari_samajika_neta_oyarke_byaya_kare_emana_gara_ghanta_eka_dine"
## [19] "do_you_have_current_workload_or_academic_demands_apanara_ki_bartamana_kajera_capa_ba_ekademika_cahida_rayeche"
## [20] "presently_i_feel_melancholic_idanim_ami_manamara_thaki"
## [21] "my_future_appears_shrouded_in_darkness_amara_bhabisyat_andhakara_ma_ne_haya"
## [22] "at_present_i_perceive_myself_as_utterly_unsuccessful_as_a_human_being_bartamane_ami_anubhaba_kari_ye_manusa_hisebe_ami_sampurna_byartha"
## [23] "i_find_no_interest_in_anything_whatsoever_ami_kona_kichute_i_agraha_pa_i_na"
## [24] "life_feels_devoid_of_meaning_jibanata_arthahina"
## [25] "i_feel_like_all_has_come_to_an_end_for_me_amara_saba_sesa_haye_geche_emanata_ma_ne_haya"
## [26] "i_feel_remarkably_insignificant_within_myself_nijeke_khuba_chota_mane_haya_amara"
## [27] "everything_seems_to_have_eroded_my_self_confidence_saba_kichute_amara_atmabisbasa_kame_geche"
## [28] "have_you_recently_entertained_any_suicidal_or_self_harming_thoughts_apani_idanim_kono_atmaghati_ba_atma_ksatira_cintabhabana_upabhoga_karechena_ki_na"
## [29] "i_often_get_tears_praya_i_amara_kanna_paya"
## [30] "im_easily_agitated_ami_sahaje_i_uttejita"
## [31] "i_cant_participate_in_social_activities_like_i_used_to_samajika_kajakarme_agera_mato_ansagrahana_karate_pari_na"
## [32] "i_suffer_from_indecisiveness_ami_sid_dhantahinataya_bhugi"
## [33] "i_find_myself_devoid_of_joy_anywhere_ami_kotha_o_ananda_phurti_pa_i_na"
## [34] "how_often_do_you_feel_weak_and_fatigued_easily_apani_kata_ghana_ghana_durbala_ebam_sahaje_i_klanta_bodha_karena"
## [35] "insomnia_difficulty_falling_asleep_broken_sleep_unsatisfying_sleep_fatigue_on_waking_dreams_nightmares_and_night_terrors_anidra_ghumiye_parate_asubidha_bhana_ghuma_atrpta_ghuma_jege_othara_klanti_sbapna_duhsbapna_ebam_ratera_atanka"
## [36] "my_temper_is_irritable_amara_mejaja_khimtakhimte_haye_geche"
## [37] "my_appetite_has_diminished_amara_ksudha_kame_geche"
## [38] "concentrating_on_one_topic_is_quite_taxing_for_me_ekati_bisaye_manonibesa_kara_amara_jan_ya_besa_karakara"
## [39] "i_feel_weak_and_fatigued_easily_ami_sahaje_i_durbala_ebam_klanta_bodha_kari"
## [40] "my_appetite_has_increased_amara_ksudha_bere_geche"
## [41] "lately_i_find_it_challenging_to_focus_on_many_things_ami_ajakala_aneka_kichute_manoyoga_dite_pari_na"
## [42] "i_find_it_difficult_to_speak_in_my_social_environment_amara_samajika_paribese_katha_balate_asubidha_haya"
## [43] "im_plagued_by_a_sense_of_unrest_ami_asthiratara_anubhutite_jarjarita_amara_asanti_lage"
## [44] "i_reckon_life_has_become_exceedingly_arduous_presently_ami_mane_kari_ye_jinabata_bartamane_khuba_besi_kastakara"
## [45] "im_afraid_something_very_bad_will_happen_amara_khuba_kharapa_kichu_ghatabe_bale_asanka_haya"
## [46] "whether_the_participant_has_recently_felt_abused_physically_emotionally_sexual_harassment_or_not_ansagrahanakari_samprati_niryatita_saririka_manasika_yauna_hayarani_anubhaba_karechena_ki_na"
## [47] "i_feel_that_people_show_me_compassion_amara_mane_haya_manusa_amake_karuna_kare"
## [48] "i_find_myself_absence_of_pleasure_everywhere_ami_saba_jayagaya_nijeke_anandera_anupasthiti_khumje_pa_i"
## [49] "presently_im_feeling_down_bartamane_ami_kharapa_bodha_karachi"
## [50] "i_feel_that_people_are_kind_toward_me_ami_anubhaba_kari_ye_lokera_amara_prati_sadaya"
## [51] "i_find_myself_unable_to_perform_educational_and_professional_duties_as_before_siksa_o_pesagata_kajakarma_agera_mato_karate_pari_na"
## [52] "how_often_do_you_feel_like_you_dont_have_anyone_to_share_your_feelings_with_apani_katabara_mane_karena_ye_apanara_sathe_apanara_anubhuti_bhaga_karara_mato_ke_u_ne_i"
## [53] "how_much_do_you_feel_left_out_in_social_situations_samajika_paristhitite_apani_katata_baki_bodha_karena"
## [54] "how_often_do_you_feel_isolated_from_others_apani_katabara_an_yadera_theke_bicchinna_bodha_karena"
## [55] "how_frequently_do_you_feel_there_s_no_one_you_can_rely_on_for_support_apani_kata_ghana_ghana_mane_karena_ye_samarthanera_jan_ya_apani_nirbhara_karate_parena_emana_ke_u_ne_i"
## [56] "how_frequently_do_you_experience_feelings_of_loneliness_apani_kata_ghana_ghana_ekakitbera_anubhuti_anubhaba_karena"
## [57] "how_frequently_do_you_feel_aligned_with_the_emotions_or_thoughts_of_the_people_around_you_apani_kata_ghana_ghana_apanara_carapasera_lokedera_abega_ba_cintara_sathe_ekatrita_bodha_karena"
## [58] "how_frequently_do_you_perceive_that_people_are_around_you_but_not_genuinely_present_with_you_apani_kata_ghana_ghana_bujhate_parena_ye_lokera_apanara_carapase_ache_kintu_satyikarera_apanara_sathe_upasthita_naya"
## [59] "to_what_extent_do_you_experience_your_relationships_with_others_as_being_unimportant_an_yadera_sathe_apanara_samparkake_gurutbahina_bale_apani_katata_anubhaba_karena"
## [60] "depression_level_bdi_ii_20_items"
## [61] "depression_level_phq_9_items"
## [62] "depression_level_ces_d_20_items"
## [63] "loneliness_level_ucla_8_items"
names(data)
## [1] "gender"
## [2] "relationship_status"
## [3] "age"
## [4] "academic_status"
## [5] "do_you_work_as_well_as_study_parasonara_pasapasi_cakari_karena"
## [6] "residential_area_abasika_elaka"
## [7] "social_economic_status_artha_samajika_abastha"
## [8] "do_you_feel_any_financial_pressure_apani_ki_kono_arthika_capa_anubhaba_karachena"
## [9] "does_the_participant_have_any_debts_ansagrahanakari_ki_kona_rna_ache"
## [10] "are_you_satisfied_with_your_current_living_environment_apani_ki_apanara_bartamana_basabasera_paribese_santusta"
## [11] "have_you_recently_lost_someone_close_to_you_apani_samprati_apanara_kachera_ka_uke_hariyechena_ki_na"
## [12] "you_are_actively_engaging_as_a_participant_in_physical_exertion_apani_sakriyabhabe_saririka_parisrame_ansagrahanakari_hisabe_jarita"
## [13] "are_you_afflicted_by_any_significant_ailments_apani_ki_kona_o_gurutara_asukhe_bhugachena"
## [14] "are_you_currently_on_any_prescribed_medication_apani_ki_bartamane_kona_o_osudha_sebana_karachena"
## [15] "are_you_accustomed_to_smoking_apani_ki_dhumapane_abhyasta"
## [16] "do_you_consume_alcoholic_beverages_apani_ki_a_yalakohalayukta_paniya_grahana_karena"
## [17] "what_is_your_average_nightly_sleep_duration_in_hours_apanara_ratera_ghumera_gara_samayakala_kata_ghantara_madhye"
## [18] "average_hours_that_the_participant_spends_in_social_network_in_a_day_ansagrahanakari_samajika_neta_oyarke_byaya_kare_emana_gara_ghanta_eka_dine"
## [19] "do_you_have_current_workload_or_academic_demands_apanara_ki_bartamana_kajera_capa_ba_ekademika_cahida_rayeche"
## [20] "presently_i_feel_melancholic_idanim_ami_manamara_thaki"
## [21] "my_future_appears_shrouded_in_darkness_amara_bhabisyat_andhakara_ma_ne_haya"
## [22] "at_present_i_perceive_myself_as_utterly_unsuccessful_as_a_human_being_bartamane_ami_anubhaba_kari_ye_manusa_hisebe_ami_sampurna_byartha"
## [23] "i_find_no_interest_in_anything_whatsoever_ami_kona_kichute_i_agraha_pa_i_na"
## [24] "life_feels_devoid_of_meaning_jibanata_arthahina"
## [25] "i_feel_like_all_has_come_to_an_end_for_me_amara_saba_sesa_haye_geche_emanata_ma_ne_haya"
## [26] "i_feel_remarkably_insignificant_within_myself_nijeke_khuba_chota_mane_haya_amara"
## [27] "everything_seems_to_have_eroded_my_self_confidence_saba_kichute_amara_atmabisbasa_kame_geche"
## [28] "have_you_recently_entertained_any_suicidal_or_self_harming_thoughts_apani_idanim_kono_atmaghati_ba_atma_ksatira_cintabhabana_upabhoga_karechena_ki_na"
## [29] "i_often_get_tears_praya_i_amara_kanna_paya"
## [30] "im_easily_agitated_ami_sahaje_i_uttejita"
## [31] "i_cant_participate_in_social_activities_like_i_used_to_samajika_kajakarme_agera_mato_ansagrahana_karate_pari_na"
## [32] "i_suffer_from_indecisiveness_ami_sid_dhantahinataya_bhugi"
## [33] "i_find_myself_devoid_of_joy_anywhere_ami_kotha_o_ananda_phurti_pa_i_na"
## [34] "how_often_do_you_feel_weak_and_fatigued_easily_apani_kata_ghana_ghana_durbala_ebam_sahaje_i_klanta_bodha_karena"
## [35] "insomnia_difficulty_falling_asleep_broken_sleep_unsatisfying_sleep_fatigue_on_waking_dreams_nightmares_and_night_terrors_anidra_ghumiye_parate_asubidha_bhana_ghuma_atrpta_ghuma_jege_othara_klanti_sbapna_duhsbapna_ebam_ratera_atanka"
## [36] "my_temper_is_irritable_amara_mejaja_khimtakhimte_haye_geche"
## [37] "my_appetite_has_diminished_amara_ksudha_kame_geche"
## [38] "concentrating_on_one_topic_is_quite_taxing_for_me_ekati_bisaye_manonibesa_kara_amara_jan_ya_besa_karakara"
## [39] "i_feel_weak_and_fatigued_easily_ami_sahaje_i_durbala_ebam_klanta_bodha_kari"
## [40] "my_appetite_has_increased_amara_ksudha_bere_geche"
## [41] "lately_i_find_it_challenging_to_focus_on_many_things_ami_ajakala_aneka_kichute_manoyoga_dite_pari_na"
## [42] "i_find_it_difficult_to_speak_in_my_social_environment_amara_samajika_paribese_katha_balate_asubidha_haya"
## [43] "im_plagued_by_a_sense_of_unrest_ami_asthiratara_anubhutite_jarjarita_amara_asanti_lage"
## [44] "i_reckon_life_has_become_exceedingly_arduous_presently_ami_mane_kari_ye_jinabata_bartamane_khuba_besi_kastakara"
## [45] "im_afraid_something_very_bad_will_happen_amara_khuba_kharapa_kichu_ghatabe_bale_asanka_haya"
## [46] "whether_the_participant_has_recently_felt_abused_physically_emotionally_sexual_harassment_or_not_ansagrahanakari_samprati_niryatita_saririka_manasika_yauna_hayarani_anubhaba_karechena_ki_na"
## [47] "i_feel_that_people_show_me_compassion_amara_mane_haya_manusa_amake_karuna_kare"
## [48] "i_find_myself_absence_of_pleasure_everywhere_ami_saba_jayagaya_nijeke_anandera_anupasthiti_khumje_pa_i"
## [49] "presently_im_feeling_down_bartamane_ami_kharapa_bodha_karachi"
## [50] "i_feel_that_people_are_kind_toward_me_ami_anubhaba_kari_ye_lokera_amara_prati_sadaya"
## [51] "i_find_myself_unable_to_perform_educational_and_professional_duties_as_before_siksa_o_pesagata_kajakarma_agera_mato_karate_pari_na"
## [52] "how_often_do_you_feel_like_you_dont_have_anyone_to_share_your_feelings_with_apani_katabara_mane_karena_ye_apanara_sathe_apanara_anubhuti_bhaga_karara_mato_ke_u_ne_i"
## [53] "how_much_do_you_feel_left_out_in_social_situations_samajika_paristhitite_apani_katata_baki_bodha_karena"
## [54] "how_often_do_you_feel_isolated_from_others_apani_katabara_an_yadera_theke_bicchinna_bodha_karena"
## [55] "how_frequently_do_you_feel_there_s_no_one_you_can_rely_on_for_support_apani_kata_ghana_ghana_mane_karena_ye_samarthanera_jan_ya_apani_nirbhara_karate_parena_emana_ke_u_ne_i"
## [56] "how_frequently_do_you_experience_feelings_of_loneliness_apani_kata_ghana_ghana_ekakitbera_anubhuti_anubhaba_karena"
## [57] "how_frequently_do_you_feel_aligned_with_the_emotions_or_thoughts_of_the_people_around_you_apani_kata_ghana_ghana_apanara_carapasera_lokedera_abega_ba_cintara_sathe_ekatrita_bodha_karena"
## [58] "how_frequently_do_you_perceive_that_people_are_around_you_but_not_genuinely_present_with_you_apani_kata_ghana_ghana_bujhate_parena_ye_lokera_apanara_carapase_ache_kintu_satyikarera_apanara_sathe_upasthita_naya"
## [59] "to_what_extent_do_you_experience_your_relationships_with_others_as_being_unimportant_an_yadera_sathe_apanara_samparkake_gurutbahina_bale_apani_katata_anubhaba_karena"
## [60] "depression_level_bdi_ii_20_items"
## [61] "depression_level_phq_9_items"
## [62] "depression_level_ces_d_20_items"
## [63] "loneliness_level_ucla_8_items"
Cleaning:
head(data)
## # A tibble: 6 × 63
## gender relationship_status age academic_status do_you_work_as_well_as_stud…¹
## <chr> <chr> <dbl> <chr> <chr>
## 1 Male Single 25 4 Year No
## 2 Female Single 23 3 Year No
## 3 Female Single 22 3 Year No
## 4 Male Single 21 3 Year No
## 5 Male Single 23 3 Year No
## 6 Male Single 23 3 Year No
## # ℹ abbreviated name:
## # ¹do_you_work_as_well_as_study_parasonara_pasapasi_cakari_karena
## # ℹ 58 more variables: residential_area_abasika_elaka <chr>,
## # social_economic_status_artha_samajika_abastha <chr>,
## # do_you_feel_any_financial_pressure_apani_ki_kono_arthika_capa_anubhaba_karachena <chr>,
## # does_the_participant_have_any_debts_ansagrahanakari_ki_kona_rna_ache <chr>,
## # are_you_satisfied_with_your_current_living_environment_apani_ki_apanara_bartamana_basabasera_paribese_santusta <chr>, …
data <- readr::read_csv("~/Downloads/data (1).csv")
## Warning: One or more parsing issues, call `problems()` on your data frame for details,
## e.g.:
## dat <- vroom(...)
## problems(dat)
## Rows: 501 Columns: 63
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (62): Gender, Relationship Status, Academic Status, Do you work as well ...
## dbl (1): Age
##
## ℹ 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.
data <- data %>%
clean_names()
print(names(data))
## [1] "gender"
## [2] "relationship_status"
## [3] "age"
## [4] "academic_status"
## [5] "do_you_work_as_well_as_study_parasonara_pasapasi_cakari_karena"
## [6] "residential_area_abasika_elaka"
## [7] "social_economic_status_artha_samajika_abastha"
## [8] "do_you_feel_any_financial_pressure_apani_ki_kono_arthika_capa_anubhaba_karachena"
## [9] "does_the_participant_have_any_debts_ansagrahanakari_ki_kona_rna_ache"
## [10] "are_you_satisfied_with_your_current_living_environment_apani_ki_apanara_bartamana_basabasera_paribese_santusta"
## [11] "have_you_recently_lost_someone_close_to_you_apani_samprati_apanara_kachera_ka_uke_hariyechena_ki_na"
## [12] "you_are_actively_engaging_as_a_participant_in_physical_exertion_apani_sakriyabhabe_saririka_parisrame_ansagrahanakari_hisabe_jarita"
## [13] "are_you_afflicted_by_any_significant_ailments_apani_ki_kona_o_gurutara_asukhe_bhugachena"
## [14] "are_you_currently_on_any_prescribed_medication_apani_ki_bartamane_kona_o_osudha_sebana_karachena"
## [15] "are_you_accustomed_to_smoking_apani_ki_dhumapane_abhyasta"
## [16] "do_you_consume_alcoholic_beverages_apani_ki_a_yalakohalayukta_paniya_grahana_karena"
## [17] "what_is_your_average_nightly_sleep_duration_in_hours_apanara_ratera_ghumera_gara_samayakala_kata_ghantara_madhye"
## [18] "average_hours_that_the_participant_spends_in_social_network_in_a_day_ansagrahanakari_samajika_neta_oyarke_byaya_kare_emana_gara_ghanta_eka_dine"
## [19] "do_you_have_current_workload_or_academic_demands_apanara_ki_bartamana_kajera_capa_ba_ekademika_cahida_rayeche"
## [20] "presently_i_feel_melancholic_idanim_ami_manamara_thaki"
## [21] "my_future_appears_shrouded_in_darkness_amara_bhabisyat_andhakara_ma_ne_haya"
## [22] "at_present_i_perceive_myself_as_utterly_unsuccessful_as_a_human_being_bartamane_ami_anubhaba_kari_ye_manusa_hisebe_ami_sampurna_byartha"
## [23] "i_find_no_interest_in_anything_whatsoever_ami_kona_kichute_i_agraha_pa_i_na"
## [24] "life_feels_devoid_of_meaning_jibanata_arthahina"
## [25] "i_feel_like_all_has_come_to_an_end_for_me_amara_saba_sesa_haye_geche_emanata_ma_ne_haya"
## [26] "i_feel_remarkably_insignificant_within_myself_nijeke_khuba_chota_mane_haya_amara"
## [27] "everything_seems_to_have_eroded_my_self_confidence_saba_kichute_amara_atmabisbasa_kame_geche"
## [28] "have_you_recently_entertained_any_suicidal_or_self_harming_thoughts_apani_idanim_kono_atmaghati_ba_atma_ksatira_cintabhabana_upabhoga_karechena_ki_na"
## [29] "i_often_get_tears_praya_i_amara_kanna_paya"
## [30] "im_easily_agitated_ami_sahaje_i_uttejita"
## [31] "i_cant_participate_in_social_activities_like_i_used_to_samajika_kajakarme_agera_mato_ansagrahana_karate_pari_na"
## [32] "i_suffer_from_indecisiveness_ami_sid_dhantahinataya_bhugi"
## [33] "i_find_myself_devoid_of_joy_anywhere_ami_kotha_o_ananda_phurti_pa_i_na"
## [34] "how_often_do_you_feel_weak_and_fatigued_easily_apani_kata_ghana_ghana_durbala_ebam_sahaje_i_klanta_bodha_karena"
## [35] "insomnia_difficulty_falling_asleep_broken_sleep_unsatisfying_sleep_fatigue_on_waking_dreams_nightmares_and_night_terrors_anidra_ghumiye_parate_asubidha_bhana_ghuma_atrpta_ghuma_jege_othara_klanti_sbapna_duhsbapna_ebam_ratera_atanka"
## [36] "my_temper_is_irritable_amara_mejaja_khimtakhimte_haye_geche"
## [37] "my_appetite_has_diminished_amara_ksudha_kame_geche"
## [38] "concentrating_on_one_topic_is_quite_taxing_for_me_ekati_bisaye_manonibesa_kara_amara_jan_ya_besa_karakara"
## [39] "i_feel_weak_and_fatigued_easily_ami_sahaje_i_durbala_ebam_klanta_bodha_kari"
## [40] "my_appetite_has_increased_amara_ksudha_bere_geche"
## [41] "lately_i_find_it_challenging_to_focus_on_many_things_ami_ajakala_aneka_kichute_manoyoga_dite_pari_na"
## [42] "i_find_it_difficult_to_speak_in_my_social_environment_amara_samajika_paribese_katha_balate_asubidha_haya"
## [43] "im_plagued_by_a_sense_of_unrest_ami_asthiratara_anubhutite_jarjarita_amara_asanti_lage"
## [44] "i_reckon_life_has_become_exceedingly_arduous_presently_ami_mane_kari_ye_jinabata_bartamane_khuba_besi_kastakara"
## [45] "im_afraid_something_very_bad_will_happen_amara_khuba_kharapa_kichu_ghatabe_bale_asanka_haya"
## [46] "whether_the_participant_has_recently_felt_abused_physically_emotionally_sexual_harassment_or_not_ansagrahanakari_samprati_niryatita_saririka_manasika_yauna_hayarani_anubhaba_karechena_ki_na"
## [47] "i_feel_that_people_show_me_compassion_amara_mane_haya_manusa_amake_karuna_kare"
## [48] "i_find_myself_absence_of_pleasure_everywhere_ami_saba_jayagaya_nijeke_anandera_anupasthiti_khumje_pa_i"
## [49] "presently_im_feeling_down_bartamane_ami_kharapa_bodha_karachi"
## [50] "i_feel_that_people_are_kind_toward_me_ami_anubhaba_kari_ye_lokera_amara_prati_sadaya"
## [51] "i_find_myself_unable_to_perform_educational_and_professional_duties_as_before_siksa_o_pesagata_kajakarma_agera_mato_karate_pari_na"
## [52] "how_often_do_you_feel_like_you_dont_have_anyone_to_share_your_feelings_with_apani_katabara_mane_karena_ye_apanara_sathe_apanara_anubhuti_bhaga_karara_mato_ke_u_ne_i"
## [53] "how_much_do_you_feel_left_out_in_social_situations_samajika_paristhitite_apani_katata_baki_bodha_karena"
## [54] "how_often_do_you_feel_isolated_from_others_apani_katabara_an_yadera_theke_bicchinna_bodha_karena"
## [55] "how_frequently_do_you_feel_there_s_no_one_you_can_rely_on_for_support_apani_kata_ghana_ghana_mane_karena_ye_samarthanera_jan_ya_apani_nirbhara_karate_parena_emana_ke_u_ne_i"
## [56] "how_frequently_do_you_experience_feelings_of_loneliness_apani_kata_ghana_ghana_ekakitbera_anubhuti_anubhaba_karena"
## [57] "how_frequently_do_you_feel_aligned_with_the_emotions_or_thoughts_of_the_people_around_you_apani_kata_ghana_ghana_apanara_carapasera_lokedera_abega_ba_cintara_sathe_ekatrita_bodha_karena"
## [58] "how_frequently_do_you_perceive_that_people_are_around_you_but_not_genuinely_present_with_you_apani_kata_ghana_ghana_bujhate_parena_ye_lokera_apanara_carapase_ache_kintu_satyikarera_apanara_sathe_upasthita_naya"
## [59] "to_what_extent_do_you_experience_your_relationships_with_others_as_being_unimportant_an_yadera_sathe_apanara_samparkake_gurutbahina_bale_apani_katata_anubhaba_karena"
## [60] "depression_level_bdi_ii_20_items"
## [61] "depression_level_phq_9_items"
## [62] "depression_level_ces_d_20_items"
## [63] "loneliness_level_ucla_8_items"
names(data)[grep("academic", names(data), ignore.case = TRUE)]
## [1] "academic_status"
## [2] "do_you_have_current_workload_or_academic_demands_apanara_ki_bartamana_kajera_capa_ba_ekademika_cahida_rayeche"
library(plotrix)
names(data)[grep("soc", names(data), ignore.case = TRUE)]
## [1] "social_economic_status_artha_samajika_abastha"
## [2] "average_hours_that_the_participant_spends_in_social_network_in_a_day_ansagrahanakari_samajika_neta_oyarke_byaya_kare_emana_gara_ghanta_eka_dine"
## [3] "i_cant_participate_in_social_activities_like_i_used_to_samajika_kajakarme_agera_mato_ansagrahana_karate_pari_na"
## [4] "i_find_it_difficult_to_speak_in_my_social_environment_amara_samajika_paribese_katha_balate_asubidha_haya"
## [5] "how_much_do_you_feel_left_out_in_social_situations_samajika_paristhitite_apani_katata_baki_bodha_karena"
# 1. Load the necessary library
library(plotrix)
library(tidyverse)
pie_data <- data %>%
# Safely rename the first column containing "econo" to 'ses'
rename(ses = !!names(.)[str_detect(names(.), "econo")][1]) %>%
mutate(ses_clean = case_when(
str_detect(ses, "Upper-Middle|Uper-Middle") ~ "Upper-Middle",
str_detect(ses, "Upper") ~ "Upper",
str_detect(ses, "Lower-Middle|Lowe-Middle") ~ "Lower-Middle",
str_detect(ses, "lower|Lower") ~ "Lower",
str_detect(ses, "Middle") ~ "Middle",
TRUE ~ "Other"
)) %>%
# Command 2: Remove rows with NA or "Other"
filter(!is.na(ses_clean), ses_clean != "Other") %>%
# Command 3: Count students per category
count(ses_clean) %>%
# Command 4: Create percentage labels for the legend
mutate(pct = round(n / sum(n) * 100, 1),
legend_label = paste0(ses_clean, " (", pct, "%)"))
# 3. Create the 3D Visualization
# Define requested colors: Red, Orange, Yellow, Green, Blue
ses_colors <- c("#D62828", "#F77F00", "#FCBF49", "#90BE6D", "#0077B6")
par(mar = c(5, 2, 4, 15))
pie3D(pie_data$n,
labels = NA, # Keep direct labels off to avoid jumbling
explode = 0.1, # Separates the slices for 3D effect
main = "Student Socio-Economic Background Distribution",
col = ses_colors, # Uses non-default custom colors
shade = 0.5,
radius = 0.9)
legend("topright",
legend = pie_data$legend_label,
fill = ses_colors,
cex = 0.8, # Adjusts text size
bty = "n", # No border around legend
xpd = TRUE, # Allows drawing in the wide margin
inset = c(-0.6, 0.2)) # Positions legend clearly on the right
# 5. Add the required data source caption
mtext("Source: Student Mental Health Survey Data", side = 1, line = 2, adj = 1, cex = 0.7)
Explanation:
This 3D pie chart identifies the socio-economic tiers of the undergraduate participants, categorized into five primary levels. By standardizing the data, we can see that students from “Middle” class backgrounds represent the largest segment of the population at over 65%. The use of a vibrant color scale from red to blue( the rainbow) allows for an immediate visual distinction between the lower and upper economic brackets. This is critical for the project’s goal of determining if financial status acts as a predictor for the severity of depressive symptoms.
Multiple Linear Regression:
# 1. Prepare and Clean Data
model_data <- data %>%
rename(
depression_level = !!names(.)[str_detect(names(.), "bdi_ii|depression")][1],
ses = !!names(.)[str_detect(names(.), "econo|socio")][1]
) %>%
mutate(depression_score = case_when(
str_detect(depression_level, "Minimal|Normal") ~ 0,
str_detect(depression_level, "Mild") ~ 1,
str_detect(depression_level, "Moderate") ~ 2,
str_detect(depression_level, "Severe") ~ 3,
TRUE ~ NA_real_
)) %>%
mutate(ses = case_when(
str_detect(ses, "Upper|Uper") ~ "Upper-Middle",
str_detect(ses, "Lower|lower|Lowe") ~ "Lower-Middle",
str_detect(ses, "Middle") ~ "Middle",
TRUE ~ "Other"
)) %>%
# Command 4: Final filter to remove NAs in the NEW numeric column
filter(!is.na(depression_score), ses != "Other")
depression_model <- lm(depression_score ~ ses + gender, data = model_data)
# 3. View Results
summary(depression_model)
##
## Call:
## lm(formula = depression_score ~ ses + gender, data = model_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1155 -1.3318 0.1231 1.2757 1.9705
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.1155 0.1602 13.202 < 2e-16 ***
## sesMiddle -0.3925 0.1438 -2.729 0.006579 **
## sesUpper-Middle -0.6948 0.1836 -3.785 0.000173 ***
## genderMale -0.3912 0.1191 -3.285 0.001093 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.193 on 496 degrees of freedom
## Multiple R-squared: 0.04333, Adjusted R-squared: 0.03754
## F-statistic: 7.488 on 3 and 496 DF, p-value: 6.544e-05
# 4. Diagnostic Plots
par(mfrow = c(2, 2))
plot(depression_model, col = "darkred", pch = 16)
Equation:
Depression Score = beta0 + beta1(ses) + beta2(gender) + e
lm(formula = depression_score ~ ses + gender, data = model_data)
P-values: Check the Pr(>|t|)
column. If the p-value for ses is less than 0.05, you have
found a statistically significant predictor for your first research
question.
Adjusted \(R^2\): the percentage of the “total story” of depression scores explained specifically by SES and Gender
F-statistic: If the p-value for the F-statistic is low, it means your model as a whole is better at predicting depression than a model with no predictors at all.
\(\text{Depression Score}\) : This is a dependent variable. It represents the numerical severity of depression (on your mapped 0–3 scale) that predict.
\(\beta_0\) (Intercept): baseline depression score. It represents the predicted value when the categorical variables (SES and Gender) are at their “reference” levels.
\(\beta_1\) (Coefficient for
ses): This value tells you how much the depression score is
expected to change when comparing different Socio-Economic Status groups
against the reference group, while keeping gender constant.
\(\beta_2\) (Coefficient for
gender): This represents the predicted difference in
depression scores between genders
\(\epsilon\) (Error Term): This accounts for the variation in depression scores that is not explained by SES or Gender.
This 3D pie chart and mutiple linear regression work together to visualize the socio-economic background. While the chart shows that the majority of participants identify as ‘Middle’ class (65.6%), the Multiple Linear Regression model actually quantifies to what extent these categories predict depression severity. By using the regression equation \(y = \beta_0 + \beta_1(ses) + \beta_2(gender) + \epsilon\), we can determine that if you’re considered Lower’ or ‘Lower-Middle’ it correlates with a statistically significant increase in depression scores compared to their ‘Upper’ class peers.”
Tableau Link:
Click
here to view the interactive Tableau Dashboard
explanation on visual:
The Tableau visualization confirms that depression severity varies significantly across the four academic years. By analyzing the trend lines, we see a positive correlation between age and the ‘Minimal’ depression category, suggesting that older students in this sample are more likely to report better mental health. concluding that , there is a negative correlation in the moderate categories, showing a decrease in student counts as they progress in age, which helps answer the secondary part of the research question regarding the direction of the relationship between these indicators. The colors in the chart represent 1st through 4th year which show that students from every year are present in every severity category, but the “Minimal” group which is the most populated across all 4 years.
Conclusion:
To conclude,This study confirms that depression severity varies significantly across all four academic years. While the majority of students report “Minimal” symptoms, the Tableau trend analysis done reveals a positive correlation between age and mental wellness, showing that counts of minimal symptoms increase as students progress.
However, the R regression model and Tableau distribution also highlight that a consistent “Severe” group exists across every year, which is driven by loneliness due to their socioeconomic class as well. In summary, while their mental health outcomes tend to improve with academic maturity mostly , social isolation remained a critical predictor of depression severity throughout the student lifecycle.
Disclamer: Ai was used in aiding me to learn how to make a 3D piechart , errors I came across when realizing that the Depression levels and Loneliness levels aren’t considered quantative but categorical in this dataset, and uploading my tableau work so that it could show up as embedded.