The Pandemic’s Toll on Mental Health: A Look at the Tech Sector
Author
Miguel Curiel
Published
March 21, 2023
Research Question
The technology industry - aka tech - has been one of the highest employers in the twenty-first century. Not only that, but it has been praised for having some of the happiest workers12.
But, what has made this industry so appealing? A case study on Google published in the International Journal of Corporate Social Responsibility in 20173 points to several elements that make high-tech unique, such as having a distinct culture proposition, aligning individual behaviors to company-wide goals, having managers be coaches rather than bosses, and being able to interact with people from other cultures.
Evidently, Google is one-in-a-million high-tech company, but there are certainly commonalities shared with smaller new tech (startup) companies. Culture Amp, a company focused on surveying employees in startups, elaborated an analysis based on their results from 2015-2020 surveys4 and mention that elements such as an open and honest two-way communication, workplace flexibility, and fair division of workload, are what make new tech companies valued.
However, the previous data omits the downsides of such cultures. Besides the multiple blog posts and news articles one can find talking about burnout5, the darker side of tech also includes (but is not limited to) ageism6, gender inequality78, and even migration issues910.
Additionally, a survey lead by Blind in 202111 found that, out of 2400 workers in tech, 64% said their mental health is worse after the pandemic. What’s more, layoffs by the thousands, plummeting stock prices, and generalized revaluation of an entire industry’s value, are just few words that can describe what has happened to tech in 2022 and 2023. An industry that once employed over 5 million people in the US alone12 and had nearly 700 billion dollars in funding worldwide13 has now laid off over 300 thousand people14 and nearly halved in funding.
It is reasonable to hypothesize that the aforementioned events will take a toll on the workers of this industry, but what has been the actual mental health state of the actors involved? More specifically, the proposed research question is:
What is the trend in mental health issues among workers in the technology industry from 2017 to 2021, as measured by survey data, and what factors may contribute to these changes?
Hypothesis
Based on the present research question and on previous studies, these are the hypotheses that come to mind:
H1: There has been an increase in the prevalence of mental health issues among workers in the technology industry from 2017 to 2021.
H2: There has been no significant change in the prevalence of mental health issues among workers in the technology industry from 2017 to 2021.
H3: The increase in mental health issues among workers in the technology industry from 2017 to 2021 is related to factors such as age, gender, and company policies with regards to mental health care.
H4: The increase in mental health issues among workers in the technology industry from 2017 to 2021 is not related to any specific factors but rather a general trend across all demographics.
Descriptive Statistics
To analyze the state of mental health and the contributing factors, I will rely on data provided by the Open Sourcing Mental Health (OSMH), specifically using their Mental Health in Tech Survey.
OSMH15 is a non-profit dedicated to raising awareness, educating, and providing resources to support mental wellness in the tech and open source communities. It began operations in 2013 and since 2014 it has conducted and published an annual or bi-annual survey analyzing several mental health indicators.
As of March 21, 2023, the 2022 survey has not yet been published. Therefore, this analysis employs historical data, specifically utilizing surveys conducted from 2017 through 2021. All datasets are publicly available on OSMH’s website or on Kaggle:
https://osmhhelp.org/research.html
https://www.kaggle.com/osmihelp/datasets
Given the size of the data, both files were appended using Microsoft Excel and were then exported to a CSV file. Also, there was not a 100% match between columns in both files, and some re-coding had to be implemented before importing into R. The steps taken to consolidate both files offline are noted in the section below.
Note
A “year” column was added to differentiate between both files.
Data pertaining to insurance information (e.g., “Does you company provide a mental health insurance plan?”) was removed because in the 2019 it was optional and was, therefore, almost entirely blank.
Both files contained columns pertaining to the mental disorder each respondent may or may not have. However, these columns were inconsistent and could not be interpreted without making assumptions which may lead to an incorrect interpretation of the data. For that reason, these columns were removed.
The raw data files followed a title case naming convention (e.g., “Does your employer provide mental health resources?”). All column names were changed to a snake_case format (e.g., “employer_provides_mental_health_resources”).
The rest of the columns and data therein contained is left as is.
The raw consolidated file contains over 70 columns. After reviewing findings from past research and taking the present research question into consideration, the following are the variables of interest:
DEPENDENT VARIABLE
has_mental_disorder: Do you currently have a mental health disorder?
INDEPENDENT VARIABLES
age: What is your age?
gender: What is your gender?
race: What is your race?
family_history_mental_illness: Do you have a family history of mental illness?
had_mental_disorder: Have you had a mental health disorder in the past?
sought_treatment: Have you ever sought treatment for a mental health disorder from a mental health professional?
willingness_to_share_with_friends: How willing would you be to share with friends and family that you have a mental illness?
tech_industry_supports_mh: Overall, how well do you think the tech industry supports employees with mental health issues?
number_of_employees: How many employees does your company or organization have?
company_provides_mhcare: Does your employer provide mental health benefits as part of healthcare coverage?
anonymity_protected_if_use_resources: Is your anonymity protected if you choose to take advantage of mental health or substance abuse treatment resources provided by your employer?
easy_to_leave_for_mhcare: If a mental health issue prompted you to request a medical leave from work, how easy or difficult would it be to ask for that leave?
comfortable_talking_to_supervisor: Would you feel comfortable discussing a mental health issue with your direct supervisor(s)?
comfortable_talking_to_coworkers_about_mh: Would you feel comfortable discussing a mental health issue with your coworkers?
employer_mh_importance: Overall, how much importance does your employer place on mental health?
current_or_previous_employer_supportive: Have you observed or experienced a supportive or well handled response to a mental health issue in your current or previous workplace?
year: In what year was the survey conducted?
After manually merging the files in R, some additional cleansing is still entailed before the data is fully operational. These changes are easier to implement in R, can be found in the code chunk below and include steps such as treating inconsistent categorical columns. Once these changes are made, a summary of the resulting dataframe is created:
Code
# load neccesary packageslibrary(tidyverse) # used for elementary data wrangling and visualizationlibrary(naniar) # used for missing values visualizationlibrary(summarytools) # used for table summarizing descriptive statistics# temporarily set working directory to read in datasetwd("/Users/macuriels/Documents/Umass/umass_dacss_quantitativeanalysis/posts/_data")# read in consolidated file with 2019 and 2021 datadf <-read_csv("mhit.csv")# treating inconsistent binary code in column(s) of interestdf$sought_treatment <-ifelse(df$sought_treatment =="TRUE", 1, 0)# treating inconsistent gender naming conventionsdf$gender <-ifelse(grepl("female", df$gender, ignore.case =TRUE), "Female" ,ifelse(grepl("male", df$gender, ignore.case =TRUE), "Male" ,"Other"))# create new dataframe with columns of interestdf <- df |>select( year ,has_mental_disorder ,age ,gender ,race ,family_history_mental_illness ,had_mental_disorder ,sought_treatment ,willingness_to_share_with_friends ,tech_industry_supports_mh ,number_of_employees ,company_provides_mhcare ,anonymity_protected_if_use_resources ,easy_to_leave_for_mhcare ,comfortable_talking_to_supervisor ,comfortable_talking_to_coworkers_about_mh ,employer_mh_importance ,current_or_previous_employer_supportive )# remove rows with missing valuesdf <- df[complete.cases(df),]# remove columns with missing valuesdf <- df[,colSums(is.na(df)) ==0]# summarize resulting dataframedfSummary(df)
Data Frame Summary
df
Dimensions: 988 x 18
Duplicates: 0
-----------------------------------------------------------------------------------------------------------------------------------------------
No Variable Stats / Values Freqs (% of Valid) Graph Valid Missing
---- ------------------------------------------- ------------------------------ -------------------- --------------------- ---------- ---------
1 year Mean (sd) : 2018 (1.1) 2017 : 432 (43.7%) IIIIIIII 988 0
[numeric] min < med < max: 2018 : 272 (27.5%) IIIII (100.0%) (0.0%)
2017 < 2018 < 2021 2019 : 182 (18.4%) III
IQR (CV) : 2 (0) 2020 : 56 ( 5.7%) I
2021 : 46 ( 4.7%)
2 has_mental_disorder 1. Don't Know 52 ( 5.3%) I 988 0
[character] 2. No 243 (24.6%) IIII (100.0%) (0.0%)
3. Possibly 195 (19.7%) III
4. Yes 498 (50.4%) IIIIIIIIII
3 age 1. 30 67 ( 6.8%) I 988 0
[character] 2. 37 54 ( 5.5%) I (100.0%) (0.0%)
3. 28 53 ( 5.4%) I
4. 27 47 ( 4.8%)
5. 32 45 ( 4.6%)
6. 35 45 ( 4.6%)
7. 34 44 ( 4.5%)
8. 36 42 ( 4.3%)
9. 31 38 ( 3.8%)
10. 33 38 ( 3.8%)
[ 38 others ] 515 (52.1%) IIIIIIIIII
4 gender 1. Female 285 (28.8%) IIIII 988 0
[character] 2. Male 525 (53.1%) IIIIIIIIII (100.0%) (0.0%)
3. Other 178 (18.0%) III
5 race 1. American Indian or Alaska 1 ( 0.1%) 988 0
[character] 2. Asian 48 ( 4.9%) (100.0%) (0.0%)
3. Black or African American 15 ( 1.5%)
4. Caucasian 1 ( 0.1%)
5. Hispanic 1 ( 0.1%)
6. I prefer not to answer 28 ( 2.8%)
7. More than one of the abov 34 ( 3.4%)
8. White 859 (86.9%) IIIIIIIIIIIIIIIII
9. White Hispanic 1 ( 0.1%)
6 family_history_mental_illness 1. I don't know 242 (24.5%) IIII 988 0
[character] 2. No 219 (22.2%) IIII (100.0%) (0.0%)
3. Yes 527 (53.3%) IIIIIIIIII
7 had_mental_disorder 1. Don't Know 64 ( 6.5%) I 988 0
[character] 2. No 248 (25.1%) IIIII (100.0%) (0.0%)
3. Possibly 167 (16.9%) III
4. Yes 509 (51.5%) IIIIIIIIII
8 sought_treatment Min : 0 0 : 857 (86.7%) IIIIIIIIIIIIIIIII 988 0
[numeric] Mean : 0.1 1 : 131 (13.3%) II (100.0%) (0.0%)
Max : 1
9 willingness_to_share_with_friends 1. 0 30 ( 3.0%) 988 0
[character] 2. 1 23 ( 2.3%) (100.0%) (0.0%)
3. 10 176 (17.8%) III
4. 2 48 ( 4.9%)
5. 3 47 ( 4.8%)
6. 4 42 ( 4.3%)
7. 5 117 (11.8%) II
8. 6 88 ( 8.9%) I
9. 7 146 (14.8%) II
10. 8 158 (16.0%) III
11. 9 113 (11.4%) II
10 tech_industry_supports_mh Mean (sd) : 2.6 (0.9) 1 : 121 (12.2%) II 988 0
[numeric] min < med < max: 2 : 301 (30.5%) IIIIII (100.0%) (0.0%)
1 < 3 < 5 3 : 406 (41.1%) IIIIIIII
IQR (CV) : 1 (0.4) 4 : 150 (15.2%) III
5 : 10 ( 1.0%)
11 number_of_employees 1. 1-5 22 ( 2.2%) 988 0
[character] 2. 100-500 269 (27.2%) IIIII (100.0%) (0.0%)
3. 26-100 179 (18.1%) III
4. 500-1000 86 ( 8.7%) I
5. 6-25 118 (11.9%) II
6. More than 1000 314 (31.8%) IIIIII
12 company_provides_mhcare 1. I don't know 239 (24.2%) IIII 988 0
[character] 2. No 46 ( 4.7%) (100.0%) (0.0%)
3. Not eligible for coverage 29 ( 2.9%)
4. Yes 674 (68.2%) IIIIIIIIIIIII
13 anonymity_protected_if_use_resources 1. I don't know 585 (59.2%) IIIIIIIIIII 988 0
[character] 2. No 29 ( 2.9%) (100.0%) (0.0%)
3. Yes 374 (37.9%) IIIIIII
14 easy_to_leave_for_mhcare 1. Difficult 88 ( 8.9%) I 988 0
[character] 2. I don't know 184 (18.6%) III (100.0%) (0.0%)
3. Neither easy nor difficul 114 (11.5%) II
4. Somewhat difficult 125 (12.7%) II
5. Somewhat easy 270 (27.3%) IIIII
6. Very easy 207 (21.0%) IIII
15 comfortable_talking_to_supervisor 1. Maybe 345 (34.9%) IIIIII 988 0
[character] 2. No 256 (25.9%) IIIII (100.0%) (0.0%)
3. Yes 387 (39.2%) IIIIIII
16 comfortable_talking_to_coworkers_about_mh 1. Maybe 448 (45.3%) IIIIIIIII 988 0
[character] 2. No 242 (24.5%) IIII (100.0%) (0.0%)
3. Yes 298 (30.2%) IIIIII
17 employer_mh_importance Mean (sd) : 5.1 (2.4) 11 distinct values : 988 0
[numeric] min < med < max: : (100.0%) (0.0%)
0 < 5 < 10 : .
IQR (CV) : 4 (0.5) : . : . : : : :
: : : : : : : : . .
18 current_or_previous_employer_supportive 1. Maybe/Not sure 246 (24.9%) IIII 988 0
[character] 2. No 333 (33.7%) IIIIII (100.0%) (0.0%)
3. Yes, I experienced 214 (21.7%) IIII
4. Yes, I observed 195 (19.7%) III
-----------------------------------------------------------------------------------------------------------------------------------------------
At this point, the dataset contains responses of nearly 1,000 participants, it has no null values and categorical variables have been harmonized.
Footnotes
Fox, M. (2016, November 11). Why Are Tech Workers So Satisfied With Their Jobs? Retrieved March 17, 2023, from https://www.forbes.com/sites/meimeifox/2016/11/11/why-are-tech-workers-so-satisfied-with-their-jobs/?sh=4eac1918a059↩︎
Wronski, L., & Cohen, J. (2019, November 4). This is the industry sector that has some of the happiest workers in America. Retrieved March 17, 2023, from https://www.cnbc.com/2019/11/04/this-is-the-industry-that-has-some-of-the-happiness-workers-in-america.html↩︎
Kim, K. T. (2017). GOOGLE: A reflection of culture, leader, and management. International Journal of Corporate Social Responsibility, 2(10). https://doi.org/10.1186/s40991-017-0021-0↩︎
McPherson, J. (n.d.). Tech company cultures are not all the same. Culture Amp. Retrieved March 17, 2023, from https://www.cultureamp.com/blog/tech-company-culture↩︎
Goncharov, A. (2023, March 13). How I burnt out in FAANG, but my job was not the problem. Blog.Goncharov.ai. Retrieved March 17, 2023, from https://blog.goncharov.ai/how-i-burnt-out-in-faang-but-my-job-was-not-the-problem↩︎
Rosales, A., & Jakob, S. (2021). Perceptions of age in contemporary tech. Sciendo, 42(1), 79-91. https://doi.org/10.2478/nor-2021-0021↩︎
Mickey, E. L. (2021). The Organization of Networking and Gender Inequality in the New Economy: Evidence from the Tech Industry. Work & Occupations, 49(4), 383-420. https://doi.org/10.1177/07308884221102134↩︎
Hardey, M. (2020). The Culture of Women in Tech : An Unsuitable Job for a Woman (1st ed.). Emerald Publishing.↩︎
Banerjee, P., & Rincón, L. (2019). Trouble in Tech Paradise. Journal of Water Resources Planning & Management, 145(4), 24-29. https://doi.org/10.1177/1536504219854714↩︎
Matloff, N. (2013). Immigration and the tech industry: As a labour shortage remedy, for innovation, or for cost savings? Migration Letters, 10(2), 210-227. ISSN: 1741-8984 Online ISSN: 1741-8992↩︎
Blind (2021, January 29). Deteriorating Mental Health In The Workplace. Retrieved March 17, 2023, from https://www.teamblind.com/blog/index.php/2021/01/29/deteriorating-mental-health-in-the-workplace/↩︎
The United States Bureau of Labor and Statistics via CompTIA (2023, March 3). Cyberstates 2021: The Definitive Guide to the Tech Industry and Workforce. Retrieved March 17, 2023, from https://www.comptia.org/content/tech-jobs-report↩︎
Crunchbase News. (2023, January 5). Global VC Funding on a Slide since Q4 2022. Retrieved March 17, 2023, from https://news.crunchbase.com/venture/global-vc-funding-slide-q4-2022↩︎
Layoffs.fyi. (n.d.). Layoffs.fyi - Tracking all tech startup layoffs since COVID-19. https://layoffs.fyi↩︎
Open Sourcing Mental Health (n.d.). About OSMH. Retrieved March 18, 2023, from https://osmhhelp.org/about/about-osmi.html↩︎
Source Code
---title: "Final Project Check In 1"author: "Miguel Curiel"description: "The Pandemic's Toll on Mental Health: A Look at the Tech Sector"date: "03/21/2023"format: html: toc: true code-fold: true code-copy: true code-tools: truecategories: - finalpart1 - mental health - tech industry - covid-19 - layoffs---```{r setup, include=FALSE}knitr::opts_chunk$set(warning =FALSE, message =FALSE) ```# Research QuestionThe technology industry - aka tech - has been one of the highest employers in the twenty-first century. Not only that, but it has been praised for having some of the happiest workers[^1][^2].[^1]: Fox, M. (2016, November 11). *Why Are Tech Workers So Satisfied With Their Jobs?* Retrieved March 17, 2023, from https://www.forbes.com/sites/meimeifox/2016/11/11/why-are-tech-workers-so-satisfied-with-their-jobs/?sh=4eac1918a059[^2]: Wronski, L., & Cohen, J. (2019, November 4). *This is the industry sector that has some of the happiest workers in America*. Retrieved March 17, 2023, from https://www.cnbc.com/2019/11/04/this-is-the-industry-that-has-some-of-the-happiness-workers-in-america.htmlBut, what has made this industry so appealing? A case study on Google published in the International Journal of Corporate Social Responsibility in 2017[^3] points to several elements that make high-tech unique, such as having a distinct culture proposition, aligning individual behaviors to company-wide goals, having managers be coaches rather than bosses, and being able to interact with people from other cultures.[^3]: Kim, K. T. (2017). GOOGLE: A reflection of culture, leader, and management. *International Journal of Corporate Social Responsibility*, *2*(10). https://doi.org/10.1186/s40991-017-0021-0Evidently, Google is one-in-a-million high-tech company, but there are certainly commonalities shared with smaller new tech (startup) companies. Culture Amp, a company focused on surveying employees in startups, elaborated an analysis based on their results from 2015-2020 surveys[^4] and mention that elements such as an open and honest two-way communication, workplace flexibility, and fair division of workload, are what make new tech companies valued.[^4]: McPherson, J. (n.d.). *Tech company cultures are not all the same*. Culture Amp. Retrieved March 17, 2023, from https://www.cultureamp.com/blog/tech-company-cultureHowever, the previous data omits the downsides of such cultures. Besides the multiple blog posts and news articles one can find talking about burnout[^5], the darker side of tech also includes (but is not limited to) ageism[^6], gender inequality[^7][^8], and even migration issues[^9][^10].[^5]: Goncharov, A. (2023, March 13). *How I burnt out in FAANG, but my job was not the problem*. Blog.Goncharov.ai. Retrieved March 17, 2023, from https://blog.goncharov.ai/how-i-burnt-out-in-faang-but-my-job-was-not-the-problem[^6]: Rosales, A., & Jakob, S. (2021). Perceptions of age in contemporary tech. *Sciendo*, *42*(1), 79-91. https://doi.org/10.2478/nor-2021-0021[^7]: Mickey, E. L. (2021). The Organization of Networking and Gender Inequality in the New Economy: Evidence from the Tech Industry. *Work & Occupations*, *49*(4), 383-420. https://doi.org/10.1177/07308884221102134[^8]: Hardey, M. (2020). *The Culture of Women in Tech : An Unsuitable Job for a Woman* (1st ed.). Emerald Publishing.[^9]: Banerjee, P., & Rincón, L. (2019). Trouble in Tech Paradise. *Journal of Water Resources Planning & Management*, *145*(4), 24-29. https://doi.org/10.1177/1536504219854714[^10]: Matloff, N. (2013). Immigration and the tech industry: As a labour shortage remedy, for innovation, or for cost savings? *Migration Letters*, *10*(2), 210-227. ISSN: 1741-8984 Online ISSN: 1741-8992Additionally, a survey lead by Blind in 2021[^11] found that, out of 2400 workers in tech, 64% said their mental health is worse after the pandemic. What's more, layoffs by the thousands, plummeting stock prices, and generalized revaluation of an entire industry's value, are just few words that can describe what has happened to tech in 2022 and 2023. An industry that once employed over 5 million people in the US alone[^12] and had nearly 700 billion dollars in funding worldwide[^13] has now laid off over 300 thousand people[^14] and nearly halved in funding.[^11]: Blind (2021, January 29). *Deteriorating Mental Health In The Workplace*. Retrieved March 17, 2023, from https://www.teamblind.com/blog/index.php/2021/01/29/deteriorating-mental-health-in-the-workplace/[^12]: The United States Bureau of Labor and Statistics via CompTIA (2023, March 3). *Cyberstates 2021: The Definitive Guide to the Tech Industry and Workforce*. Retrieved March 17, 2023, from https://www.comptia.org/content/tech-jobs-report[^13]: Crunchbase News. (2023, January 5). *Global VC Funding on a Slide since Q4 2022*. Retrieved March 17, 2023, from https://news.crunchbase.com/venture/global-vc-funding-slide-q4-2022[^14]: Layoffs.fyi. (n.d.). *Layoffs.fyi - Tracking all tech startup layoffs since COVID-19*. https://layoffs.fyiIt is reasonable to hypothesize that the aforementioned events will take a toll on the workers of this industry, but what has been the actual mental health state of the actors involved? More specifically, the proposed research question is:- **What is the trend in mental health issues among workers in the technology industry from 2017 to 2021, as measured by survey data, and what factors may contribute to these changes?**------------------------------------------------------------------------# HypothesisBased on the present research question and on previous studies, these are the hypotheses that come to mind:- H1: There has been an increase in the prevalence of mental health issues among workers in the technology industry from 2017 to 2021.- H2: There has been no significant change in the prevalence of mental health issues among workers in the technology industry from 2017 to 2021.- H3: The increase in mental health issues among workers in the technology industry from 2017 to 2021 is related to factors such as age, gender, and company policies with regards to mental health care.- H4: The increase in mental health issues among workers in the technology industry from 2017 to 2021 is not related to any specific factors but rather a general trend across all demographics.------------------------------------------------------------------------# Descriptive StatisticsTo analyze the state of mental health and the contributing factors, I will rely on data provided by the Open Sourcing Mental Health (OSMH), specifically using their Mental Health in Tech Survey.OSMH[^15] is a non-profit dedicated to raising awareness, educating, and providing resources to support mental wellness in the tech and open source communities. It began operations in 2013 and since 2014 it has conducted and published an annual or bi-annual survey analyzing several mental health indicators.[^15]: Open Sourcing Mental Health (n.d.). *About OSMH*. Retrieved March 18, 2023, from https://osmhhelp.org/about/about-osmi.htmlAs of March 21, 2023, the 2022 survey has not yet been published. Therefore, this analysis employs historical data, specifically utilizing surveys conducted from 2017 through 2021. All datasets are publicly available on OSMH's website or on Kaggle:- https://osmhhelp.org/research.html- https://www.kaggle.com/osmihelp/datasetsGiven the size of the data, both files were appended using Microsoft Excel and were then exported to a CSV file. Also, there was not a 100% match between columns in both files, and some re-coding had to be implemented before importing into R. The steps taken to consolidate both files offline are noted in the section below.::: {.callout-note collapse="true"}- A "year" column was added to differentiate between both files.- Data pertaining to insurance information (e.g., "Does you company provide a mental health insurance plan?") was removed because in the 2019 it was optional and was, therefore, almost entirely blank.- Both files contained columns pertaining to the mental disorder each respondent may or may not have. However, these columns were inconsistent and could not be interpreted without making assumptions which may lead to an incorrect interpretation of the data. For that reason, these columns were removed.- The raw data files followed a title case naming convention (e.g., "Does your employer provide mental health resources?"). All column names were changed to a snake_case format (e.g., "employer_provides_mental_health_resources").- The rest of the columns and data therein contained is left as is.:::The raw consolidated file contains over 70 columns. After reviewing findings from past research and taking the present research question into consideration, the following are the variables of interest:- **DEPENDENT VARIABLE** - **has_mental_disorder:** Do you currently have a mental health disorder?- **INDEPENDENT VARIABLES** - **age:** What is your age? - **gender:** What is your gender? - **race:** What is your race? - **family_history_mental_illness:** Do you have a family history of mental illness? - **had_mental_disorder:** Have you had a mental health disorder in the past? - **sought_treatment:** Have you ever sought treatment for a mental health disorder from a mental health professional? - **willingness_to_share_with_friends:** How willing would you be to share with friends and family that you have a mental illness? - **tech_industry_supports_mh:** Overall, how well do you think the tech industry supports employees with mental health issues? - **number_of_employees:** How many employees does your company or organization have? - **company_provides_mhcare:** Does your employer provide mental health benefits as part of healthcare coverage? - **anonymity_protected_if_use_resources:** Is your anonymity protected if you choose to take advantage of mental health or substance abuse treatment resources provided by your employer? - **easy_to_leave_for_mhcare:** If a mental health issue prompted you to request a medical leave from work, how easy or difficult would it be to ask for that leave? - **comfortable_talking_to_supervisor:** Would you feel comfortable discussing a mental health issue with your direct supervisor(s)? - **comfortable_talking_to_coworkers_about_mh:** Would you feel comfortable discussing a mental health issue with your coworkers? - **employer_mh_importance:** Overall, how much importance does your employer place on mental health? - **current_or_previous_employer_supportive:** Have you observed or experienced a supportive or well handled response to a mental health issue in your current or previous workplace? - **year**: In what year was the survey conducted?After manually merging the files in R, some additional cleansing is still entailed before the data is fully operational. These changes are easier to implement in R, can be found in the code chunk below and include steps such as treating inconsistent categorical columns. Once these changes are made, a summary of the resulting dataframe is created:```{r, eval=TRUE}# load neccesary packageslibrary(tidyverse) # used for elementary data wrangling and visualizationlibrary(naniar) # used for missing values visualizationlibrary(summarytools) # used for table summarizing descriptive statistics# temporarily set working directory to read in datasetwd("/Users/macuriels/Documents/Umass/umass_dacss_quantitativeanalysis/posts/_data")# read in consolidated file with 2019 and 2021 datadf <-read_csv("mhit.csv")# treating inconsistent binary code in column(s) of interestdf$sought_treatment <-ifelse(df$sought_treatment =="TRUE", 1, 0)# treating inconsistent gender naming conventionsdf$gender <-ifelse(grepl("female", df$gender, ignore.case =TRUE), "Female" ,ifelse(grepl("male", df$gender, ignore.case =TRUE), "Male" ,"Other"))# create new dataframe with columns of interestdf <- df |>select( year ,has_mental_disorder ,age ,gender ,race ,family_history_mental_illness ,had_mental_disorder ,sought_treatment ,willingness_to_share_with_friends ,tech_industry_supports_mh ,number_of_employees ,company_provides_mhcare ,anonymity_protected_if_use_resources ,easy_to_leave_for_mhcare ,comfortable_talking_to_supervisor ,comfortable_talking_to_coworkers_about_mh ,employer_mh_importance ,current_or_previous_employer_supportive )# remove rows with missing valuesdf <- df[complete.cases(df),]# remove columns with missing valuesdf <- df[,colSums(is.na(df)) ==0]# summarize resulting dataframedfSummary(df)```At this point, the dataset contains responses of nearly 1,000 participants, it has no null values and categorical variables have been harmonized.