Import Data

load("~/madness/nmhss_2019_puf_R.RData")

load("~/madness/N-MHSS-2010-DS0001-data-r.rda")

rename data sets

treatments_2019 <- PUF
treatments_2010 <- da34945.0001

Clean 2019 data

library(dplyr)
library(tidyr)

treat_cleaned_2019 <- treatments_2019 %>%
  #select treatment variable
  select(starts_with("TREAT")) %>%
  pivot_longer(cols = everything(), names_to = "treatment",
values_to = "count") %>%
  #compute percentages of facilities that offer the treatment
  group_by(treatment) %>%
  summarise(percent2019 = mean(count)) %>%
  mutate(treatment = case_when(
    treatment == "TREATPSYCHOTHRPY" ~ "psychotherapy",
    treatment == "TREATFAMTHRPY" ~ "family therapy",
    treatment == "TREATGRPTHRPY" ~ "group therapy",
    treatment == "TREATCOGTHRPY" ~ "cognitive behavioral therapy",
    treatment == "TREATDIALTHRPY" ~ "dialectical behavior therapy",
    treatment == "TREATBEHAVMOD" ~ "behavior modification",
    treatment == "TREATDUALMHSA" ~ "integrated dual disorders treatment",
    treatment == "TREATTRAUMATHRPY" ~ "trauma therapy",
    treatment == "TREATACTVTYTHRPY" ~ "activity therapy",
    treatment == "TREATELECTRO" ~ "electroconvulsive therapy",
    treatment == "TREATTELEMEDINCE" ~ "telemedicine therapy",
    treatment == "TREATPSYCHOMED" ~ "psychotropic medication",
    treatment == "TREATOTH" ~ "mentalhealth treatment approach",
    treatment == "TREATMT" ~ "substanceuse treatment",
    TRUE ~ as.character(treatment)))



treat_cleaned_2019
## # A tibble: 14 x 2
##    treatment                           percent2019
##    <chr>                                     <dbl>
##  1 activity therapy                         0.446 
##  2 behavior modification                    0.660 
##  3 cognitive behavioral therapy             0.902 
##  4 dialectical behavior therapy             0.563 
##  5 integrated dual disorders treatment      0.566 
##  6 electroconvulsive therapy                0.0410
##  7 family therapy                           0.725 
##  8 group therapy                            0.856 
##  9 substanceuse treatment                   0.563 
## 10 mentalhealth treatment approach          0.0585
## 11 psychotropic medication                  0.818 
## 12 psychotherapy                            0.916 
## 13 telemedicine therapy                     0.380 
## 14 trauma therapy                           0.773

Clean 2010 data

treat_cleaned_2010 <- treatments_2010 %>%
  select(starts_with("TREAT")) %>%
  pivot_longer(cols = everything(), names_to = "treatment", values_to = "count") %>%
  mutate(count = readr::parse_number(as.character(count))) %>%
  group_by(treatment) %>%
  summarise(percent2010 = mean(count, na.rm = TRUE)) %>%
  mutate(treatment = case_when(
    treatment == "TREATPSYCHOTHRPY" ~ "psychotherapy",
    treatment == "TREATFAMTHRPY" ~ "family therapy",
    treatment == "TREATGRPTHRPY" ~ "group therapy",
    treatment == "TREATCOGTHRPY" ~ "cognitive behavioral therapy",
    treatment == "TREATDIALTHRPY" ~ "dialectical behavior therapy",
    treatment == "TREATBEHAVMOD" ~ "behavior modification",
    treatment == "TREATDUALMHSA" ~ "integrated dual disorders treatment",
    treatment == "TREATTRAUMATHRPY" ~ "trauma therapy",
    treatment == "TREATACTVTYTHRPY" ~ "activity therapy",
    treatment == "TREATELECTRO" ~ "electroconvulsive therapy",
    treatment == "TREATTELEMEDINCE" ~ "telemedicine therapy",
    treatment == "TREATPSYCHOMED" ~ "psychotropic medication",
    treatment == "TREATOTH" ~ "mentalhealth treatment approach",
    treatment == "TREATMT" ~ "substanceuse treatment",
    TRUE ~ as.character(treatment)))

  
treat_cleaned_2010
## # A tibble: 11 x 2
##    treatment                           percent2010
##    <chr>                                     <dbl>
##  1 activity therapy                         0.515 
##  2 behavior modification                    0.655 
##  3 cognitive behavioral therapy             0.887 
##  4 integrated dual disorders treatment      0.549 
##  5 electroconvulsive therapy                0.0634
##  6 family therapy                           0.675 
##  7 group therapy                            0.852 
##  8 mentalhealth treatment approach          0.0835
##  9 psychotropic medication                  0.837 
## 10 psychotherapy                            0.863 
## 11 telemedicine therapy                     0.157

Join data

treat <- full_join(treat_cleaned_2010, treat_cleaned_2019) %>%
  mutate(percent2010 = ifelse(is.na(percent2010),0,percent2010)) %>%
  pivot_longer(cols = -treatment, names_to = "year", values_to = "percent")%>%
  mutate(year=stringr::str_remove(year,"percent"))

treat
## # A tibble: 28 x 3
##    treatment                           year  percent
##    <chr>                               <chr>   <dbl>
##  1 activity therapy                    2010   0.515 
##  2 activity therapy                    2019   0.446 
##  3 behavior modification               2010   0.655 
##  4 behavior modification               2019   0.660 
##  5 cognitive behavioral therapy        2010   0.887 
##  6 cognitive behavioral therapy        2019   0.902 
##  7 integrated dual disorders treatment 2010   0.549 
##  8 integrated dual disorders treatment 2019   0.566 
##  9 electroconvulsive therapy           2010   0.0634
## 10 electroconvulsive therapy           2019   0.0410
## # ... with 18 more rows

Visualize data

library(ggplot2)
ggplot(treat,
       aes(x=percent,
           y= treatment,
           fill = year))+
  geom_bar(stat = "identity", position = "dodge") + 
  scale_x_continuous(labels = scales::percent_format())+
  labs(title = "Popular Mental Illness Treatments in the US",
       y = NULL,
       x = "Percent of Facilities",
       caption = "Data Source: SAMHSA, National Mental Health Services Survey")

Unit 3 Reaction

Mental Illnesses have been treated in numerous ways throughout history. Treatment of these illnesses has allowed those afflicted with them to live normal and healthy lives, without being hindered by their health. Often, medication is used to help those with illnesses, with varying degree of success, depending on a number of factors such as the illness involved, and the medication prescribed. In other scenarios, the patient is hospitalized, and received therapy and assistance in a psychiatric ward.

Treatment of mental illnesses has progressed from a limited understanding of the matter to a more comprehensive understanding. Learning more about illnesses has allowed doctors to address their patients needs better, and to better their health more quickly. One example of using new knowledge to assist patients comes from Aaron T. Beck, who found out that attempting to use past experiences/memories in a therapeutic session may not always help someone, and it may be better to not address them. “In short, contrary to psychoanalytic wisdom, it was not necessary to explore deeply into one’s past.”1 Instead of relaying on older treatment methods, using new strategies and techniques to treat patients according to their needs, instead of those what worked in the past, doctors and nurses are able to better help their patients.

As displayed in data, the use of specific treatments have both increased and decreased over time.2 One treatment that has more than doubled over the past decade (from 2010 to 2019), is the use of telemedicine therapy. This form of therapy allows the patient to remain in the safety and comfort of their chosen location, as their doctor is communicating with them via a communication device, such as a cellphone.3 Telemedicine further assists those who are unable to leave their houses, such as the disabled or elderly, making it easier for them to receive treatment. The growth of telemedicine in the US is likely tied with the growth and usage of cellphones, as most modern cellphones allow some form of video communication, allowing a patient and doctor to see one another via their phones, despite possibly being miles away from each other.


  1. Eghigian, Greg. From Madness to Mental Health : Psychiatric Disorder and Its Treatment in Western Civilization. New Brunswick, N.J.: Rutgers University Press, 2010. 383↩︎

  2. https://courses.lumenlearning.com/wsu-sandbox/chapter/mental-health-treatment-past-and-present/↩︎

  3. https://chironhealth.com/telemedicine/providers/telemedicine_for_therapists/↩︎

  4. Malcolm Tatum. “What Is Activity Therapy?” What is Activity Therapy? (with pictures), n.d. https://www.wise-geek.com/what-is-activity-therapy.htm.↩︎