1) Import and clean data

Load packages, import Excel file, skip first line, rename data file, convert to tibble, clean up variable names. This gives us a data frame with 1714 observations of 73 variable

library(tidyverse)
library(lubridate)
library(janitor)
library(readxl)
library(rmarkdown)
library(readxl)

ep_data <- read_excel("RVTICN_EP_data.xlsx", 
    skip = 1)
ep_data <- ep_data %>%
  as_tibble(ep_data) %>%
  clean_names() 

ep_data
## # A tibble: 1,714 x 74
##    session        created  modified  ended expired ep_what ep_what_other teacher
##    <chr>          <chr>    <chr>     <chr> <lgl>   <chr>   <lgl>           <dbl>
##  1 <NA>           2023-01~ <NA>      <NA>  NA      <NA>    NA                 NA
##  2 okSk8ugA7x7LS~ 2023-01~ 2023-02-~ <NA>  NA      5, 10   NA                 NA
##  3 <NA>           2023-01~ <NA>      <NA>  NA      <NA>    NA                 NA
##  4 zanyTortoiseX~ 2023-01~ 2023-01-~ <NA>  NA      <NA>    NA                 NA
##  5 darkEelXXXn1b~ 2023-01~ 2023-01-~ <NA>  NA      <NA>    NA                 NA
##  6 <NA>           2023-01~ 2023-01-~ <NA>  NA      <NA>    NA                 NA
##  7 jwfpui27QyMPI~ 2023-01~ <NA>      <NA>  NA      <NA>    NA                 NA
##  8 UfKwkbNB1UQO_~ 2023-01~ 2023-01-~ <NA>  NA      <NA>    NA                 NA
##  9 4XFTbS1lynxtw~ 2023-01~ <NA>      <NA>  NA      <NA>    NA                 NA
## 10 -E0cUzh4UJQpw~ 2023-01~ <NA>      <NA>  NA      <NA>    NA                 NA
## # ... with 1,704 more rows, and 66 more variables: teacher_role <dbl>,
## #   teacher_role_other <chr>, teacher_center <dbl>, teacher_center_other <chr>,
## #   teacher_age <chr>, teacher_suspended <dbl>, teacher_suspended_times <dbl>,
## #   reasons_suspended <chr>, teacher_suspended_steps <chr>,
## #   teacher_suspended_steps_other <lgl>, teacher_expelled <dbl>,
## #   teacher_times_expelled <dbl>, reasons_expelled <chr>,
## #   teacher_expelled_steps <chr>, teacher_expelled_steps_other <lgl>, ...

2) Removing missing data

Drop rows with data missing in the session or modified column. This gives us a data frame with 94 observations of 73 variables

ep_data <-ep_data %>%
  drop_na(session, modified)

ep_data
## # A tibble: 94 x 74
##    session       created  modified  ended  expired ep_what ep_what_other teacher
##    <chr>         <chr>    <chr>     <chr>  <lgl>   <chr>   <lgl>           <dbl>
##  1 okSk8ugA7x7L~ 2023-01~ 2023-02-~ <NA>   NA      5, 10   NA                 NA
##  2 zanyTortoise~ 2023-01~ 2023-01-~ <NA>   NA      <NA>    NA                 NA
##  3 darkEelXXXn1~ 2023-01~ 2023-01-~ <NA>   NA      <NA>    NA                 NA
##  4 UfKwkbNB1UQO~ 2023-01~ 2023-01-~ <NA>   NA      <NA>    NA                 NA
##  5 Q13gEgNnVlr2~ 2023-02~ 2023-02-~ <NA>   NA      13.0    NA                  1
##  6 whkMSapD6z3Q~ 2023-02~ 2023-02-~ 2023-~ NA      <NA>    NA                  1
##  7 0a_xbAPNdpM-~ 2023-02~ 2023-02-~ <NA>   NA      <NA>    NA                 NA
##  8 8HbVA9v6BS98~ 2023-03~ 2023-03-~ <NA>   NA      <NA>    NA                 NA
##  9 0DmnsxoDUAoU~ 2023-03~ 2023-03-~ <NA>   NA      <NA>    NA                 NA
## 10 LyA6W1isX5jE~ 2023-03~ 2023-03-~ <NA>   NA      <NA>    NA                 NA
## # ... with 84 more rows, and 66 more variables: teacher_role <dbl>,
## #   teacher_role_other <chr>, teacher_center <dbl>, teacher_center_other <chr>,
## #   teacher_age <chr>, teacher_suspended <dbl>, teacher_suspended_times <dbl>,
## #   reasons_suspended <chr>, teacher_suspended_steps <chr>,
## #   teacher_suspended_steps_other <lgl>, teacher_expelled <dbl>,
## #   teacher_times_expelled <dbl>, reasons_expelled <chr>,
## #   teacher_expelled_steps <chr>, teacher_expelled_steps_other <lgl>, ...

3 Data Wrangling

Create factor variables with plan English responses, re-level factors into normal order. This gives us a data frame with 94 observations of 119 variables

ep_data <- ep_data %>%
  mutate(ep_role = case_when(teacher == 1 ~ "Teacher", 
                               ep_child == 1 ~ "Caregiver",
                               ep_self == 1 ~ "Self",
                               TRUE ~ "No role specified"))|>
  mutate(zip = case_when(zip_teach  >= 1 ~ zip_teach,
                         zip_child  >= 1 ~ zip_child,
                         zip_adult  >= 1 ~ zip_adult))|>
  mutate(ep_child_f = case_when(ep_child == 1 ~ "Yes",
                                ep_child == 2 ~ "No",
                                ep_child == 3 ~ "Unsure"))|>
  mutate(ep_child_f=factor(ep_child_f)) |> 
  mutate(ep_child_f = fct_relevel( ep_child_f, 'Yes','No','Unsure')) |>
  mutate(relationship_f = case_when(relationship == 1 ~ "Parent",
                                    relationship == 3 ~ "Foster Parent",
                                    relationship == 7 ~ "Aunt or Uncle",
                                    relationship == 8 & relationship_other == "TDT, Intensive in home" |
                                    relationship == 8 & relationship_other == "family member and social worker" ~  "Mental Health Provider"))|>
  mutate(relationship_f=factor(relationship_f)) |>
  mutate(relationship_f = fct_relevel( relationship_f, 'Parent','Foster Parent','Aunt or Uncle','Mental Health Provider')) |>
 mutate(child_expelled_times_f = case_when(child_expelled_times == 1 ~ "Once",
                                            child_expelled_times == 2 ~ "Twice",
                                            child_expelled_times == 3 ~ "Three Times",
                                            child_expelled_times == 4 ~ "More than Three Times"))|>
  mutate(child_expelled_times_f = factor(child_expelled_times_f)) |> 
  mutate(child_expelled_times_f = fct_relevel(child_expelled_times_f, 'Once','Twice','Three Times', 'More than Three Times')) |>
 mutate(child_expelled_age_f = case_when(child_expelled_age == 1 ~ "0 - 2 Years",
                                          child_expelled_age == 2 ~ "3 - 5 Years",
                                          child_expelled_age == 3 ~ "6 - 12 Years",
                                          child_expelled_age == 4 ~ "Over 12 Years"))|>
  mutate(child_expelled_age_f = factor(child_expelled_age_f)) |> 
  mutate(child_expelled_age_f = fct_relevel(child_expelled_age_f, '0 - 2 Years','3 - 5 Years','6 - 12 Years', 'Over 12 Years')) |>
  mutate(child_expelled_steps_1 = case_when(str_detect(child_expelled_steps, "1") ~ 1))|>
  mutate(child_expelled_steps_2 = case_when(str_detect(child_expelled_steps, "2") ~ 1))|>
  mutate(child_expelled_steps_3 = case_when(str_detect(child_expelled_steps, "3") ~ 1))|>
  mutate(child_expelled_steps_4 = case_when(str_detect(child_expelled_steps, "4") ~ 1))|>
  mutate(child_expelled_steps_5 = case_when(str_detect(child_expelled_steps, "5") ~ 1))|>
  mutate(child_expelled_steps_6 = case_when(str_detect(child_expelled_steps, "6") ~ 1))|>
  mutate(rate_relationship_expelled_child_f = case_when(rate_relationship_expelled_child == 1 ~ "Very Good",
                                                        rate_relationship_expelled_child == 2 ~ "Good",
                                                        rate_relationship_expelled_child == 3 ~ "Neutral",
                                                        rate_relationship_expelled_child == 4 ~ "Bad",
                                                        rate_relationship_expelled_child == 5 ~ "Very Bad"))|>
  mutate(rate_relationship_expelled_child_f = factor(rate_relationship_expelled_child_f)) |> 
  mutate(rate_relationship_expelled_child_f = fct_relevel(rate_relationship_expelled_child_f, 'Very Good','Good','Neutral', 'Bad', 'Very Bad')) |>
  mutate(child_suspended_f = case_when(child_suspended == 1 ~ "Yes",
                                       child_suspended == 2 ~ "No",
                                       child_suspended == 3 ~ "Unsure"))|>
  mutate(child_suspended_f=factor(child_suspended_f)) |> 
  mutate(child_suspended_f = fct_relevel( child_suspended_f, 'Yes','No','Unsure')) |>
  mutate(child_suspended_times_f = case_when(child_suspended_times == 1 ~ "Once",
                                             child_suspended_times == 2 ~ "Twice",
                                             child_suspended_times == 3 ~ "Three Times",
                                             child_suspended_times == 4 ~ "More than Three Times"))|>
  mutate(child_suspended_times_f = factor(child_suspended_times_f)) |> 
  mutate(child_suspended_times_f = fct_relevel(child_suspended_times_f, 'Once','Twice','Three Times', 'More than Three Times')) |>
  mutate(child_suspended_age_f = case_when(child_suspended_age == 1 ~ "0 - 2 Years",
                                           child_suspended_age == 2 ~ "3 - 5 Years",
                                           child_suspended_age == 3 ~ "6 - 12 Years",
                                           child_suspended_age == 4 ~ "Over 12 Years"))|>
  mutate(child_suspended_age_f = factor(child_suspended_age_f)) |> 
  mutate(child_suspended_age_f = fct_relevel(child_suspended_age_f, '0 - 2 Years','3 - 5 Years','6 - 12 Years', 'Over 12 Years')) |>
  mutate(child_suspended_steps_1 = case_when(str_detect(child_suspended_steps, "1") ~ 1))|>
  mutate(child_suspended_steps_2 = case_when(str_detect(child_suspended_steps, "2") ~ 1))|>
  mutate(child_suspended_steps_3 = case_when(str_detect(child_suspended_steps, "3") ~ 1))|>
  mutate(child_suspended_steps_4 = case_when(str_detect(child_suspended_steps, "4") ~ 1))|>
  mutate(child_suspended_steps_5 = case_when(str_detect(child_suspended_steps, "5") ~ 1))|>
  mutate(child_suspended_steps_6 = case_when(str_detect(child_suspended_steps, "6") ~ 1))|>
  mutate(rate_relationship_suspended_child_f = case_when(rate_relationship_suspended_child == 1 ~ "Very Good",
                                                        rate_relationship_suspended_child == 2 ~ "Good",
                                                        rate_relationship_suspended_child == 3 ~ "Neutral",
                                                        rate_relationship_suspended_child == 4 ~ "Bad",
                                                        rate_relationship_suspended_child == 5 ~ "Very Bad"))|>
  mutate(rate_relationship_suspended_child_f = factor(rate_relationship_suspended_child_f)) |> 
  mutate(rate_relationship_suspended_child_f = fct_relevel(rate_relationship_suspended_child_f, 'Very Good','Good','Neutral', 'Bad', 'Very Bad')) |>
  mutate(ep_effects_1 = case_when(str_detect(ep_effects, "1") ~ 1))|>
  mutate(ep_effects_2 = case_when(str_detect(ep_effects, "2") ~ 1))|>
  mutate(ep_effects_3 = case_when(str_detect(ep_effects, "3") ~ 1))|>
  mutate(ep_effects_4 = case_when(str_detect(ep_effects, "4") ~ 1))|>
  mutate(child_attributes_1 = case_when(str_detect(child_attributes, "1") ~ 1))|>
  mutate(child_attributes_2 = case_when(str_detect(child_attributes, "2") ~ 1))|>
  mutate(child_attributes_3 = case_when(str_detect(child_attributes, "3") ~ 1))|>
  mutate(child_attributes_4 = case_when(str_detect(child_attributes, "4") ~ 1))|>
  mutate(child_attributes_5 = case_when(str_detect(child_attributes, "5") ~ 1))|>
  mutate(child_attributes_6 = case_when(str_detect(child_attributes, "6") ~ 1))|>
  mutate(child_attributes_7 = case_when(str_detect(child_attributes, "7") ~ 1))|>
  mutate(child_race_1 = case_when(str_detect(child_race, "1") ~ 1))|>
  mutate(child_race_2 = case_when(str_detect(child_race, "2") ~ 1))|>
  mutate(child_race_3 = case_when(str_detect(child_race, "3") ~ 1))|>
  mutate(child_race_4 = case_when(str_detect(child_race, "4") ~ 1))|>
  mutate(child_race_5 = case_when(str_detect(child_race, "5") ~ 1))|>
  mutate(child_race_6 = case_when(str_detect(child_race, "6") ~ 1))|>
  mutate(child_language_f = case_when(child_language == 1 ~ "English",
                                             child_language == 2 ~ "Spanish",
                                             child_language == 3 ~ "Child is non-verbal",
                                             child_language == 4 ~ "Other"))|>
  mutate(child_language_f = factor(child_language_f)) |> 
  mutate(child_language_f = fct_relevel(child_language_f, 'English','Spanish','Child is non-verbal', 'Other'))

head(ep_data)
## # A tibble: 6 x 115
##   session        created  modified  ended  expired ep_what ep_what_other teacher
##   <chr>          <chr>    <chr>     <chr>  <lgl>   <chr>   <lgl>           <dbl>
## 1 okSk8ugA7x7LS~ 2023-01~ 2023-02-~ <NA>   NA      5, 10   NA                 NA
## 2 zanyTortoiseX~ 2023-01~ 2023-01-~ <NA>   NA      <NA>    NA                 NA
## 3 darkEelXXXn1b~ 2023-01~ 2023-01-~ <NA>   NA      <NA>    NA                 NA
## 4 UfKwkbNB1UQO_~ 2023-01~ 2023-01-~ <NA>   NA      <NA>    NA                 NA
## 5 Q13gEgNnVlr2f~ 2023-02~ 2023-02-~ <NA>   NA      13.0    NA                  1
## 6 whkMSapD6z3Qn~ 2023-02~ 2023-02-~ 2023-~ NA      <NA>    NA                  1
## # ... with 107 more variables: teacher_role <dbl>, teacher_role_other <chr>,
## #   teacher_center <dbl>, teacher_center_other <chr>, teacher_age <chr>,
## #   teacher_suspended <dbl>, teacher_suspended_times <dbl>,
## #   reasons_suspended <chr>, teacher_suspended_steps <chr>,
## #   teacher_suspended_steps_other <lgl>, teacher_expelled <dbl>,
## #   teacher_times_expelled <dbl>, reasons_expelled <chr>,
## #   teacher_expelled_steps <chr>, teacher_expelled_steps_other <lgl>, ...

4 Child Relationship Questions

library(gt)
library(gtsummary)
library(ggplot2)

# table
sum_ep_child_f <- ep_data |>
  group_by(ep_child_f, relationship_f)|>
  select(session, ep_child_f, relationship_f)|>
   summarise(n = n_distinct(session))

sum_ep_child_f
## # A tibble: 8 x 3
## # Groups:   ep_child_f [4]
##   ep_child_f relationship_f             n
##   <fct>      <fct>                  <int>
## 1 Yes        Parent                    12
## 2 Yes        Foster Parent              5
## 3 Yes        Aunt or Uncle              1
## 4 Yes        Mental Health Provider     1
## 5 Yes        <NA>                       1
## 6 No         <NA>                      10
## 7 Unsure     <NA>                       1
## 8 <NA>       <NA>                      63
# graph
ep_data_na <- ep_data |>
  drop_na(ep_child)

sum_ep_child_f_g <- ggplot(data = ep_data_na, aes(x = ep_child_f)) + 
    geom_bar(colour="black", fill="#DD8888", width=.8,stat="count") +
    xlab("EP Experiences") + ylab("Count") +
    ggtitle("")

sum_ep_child_f_g

#table
sum_relationship_f <- ep_data |> 
  group_by(relationship_f)|>
  select(relationship_f, session)|>
  summarise(n = n_distinct(session))|>
  arrange(desc(n))

sum_relationship_f
## # A tibble: 5 x 2
##   relationship_f             n
##   <fct>                  <int>
## 1 <NA>                      75
## 2 Parent                    12
## 3 Foster Parent              5
## 4 Aunt or Uncle              1
## 5 Mental Health Provider     1
#graph
ep_data_child <- ep_data|>
  filter(ep_child == 1)|>
  drop_na(relationship_f)

sum_relationship_f_g <- ggplot(data = ep_data_child, aes(x = relationship_f)) + 
    geom_bar(colour="black", fill="#DD8888", width=.8,stat="count") +
    xlab("Relationship to Child") + ylab("Count") +
    ggtitle("")

sum_relationship_f_g

#table
ep_data |>
drop_na(relationship_other)|>
summarise(relationship_other)
## # A tibble: 2 x 1
##   relationship_other             
##   <chr>                          
## 1 TDT, Intensive in hom          
## 2 family member and social worker

5 Child Expulsion Questions

#table
sum_child_expelled_times_f <- ep_data |>
  drop_na(child_expelled_times_f)|>
  group_by(child_expelled_times_f)|>
  select(child_expelled_times_f, relationship_f, session)|>
  summarise(n = n_distinct(session))

sum_child_expelled_times_f
## # A tibble: 3 x 2
##   child_expelled_times_f     n
##   <fct>                  <int>
## 1 Once                       6
## 2 Twice                      6
## 3 More than Three Times      2
#graph
ep_data_child <- ep_data|>
  filter(ep_child == 1)|>
  drop_na(child_expelled_times_f)

sum_child_expelled_times_f_g <- ggplot(data = ep_data_child, aes(x = child_expelled_times_f)) + 
    geom_bar(colour="black", fill="#DD8888", width=.8,stat="count") +
    xlab("Times Expelled") + ylab("Count") +
    ggtitle("")

sum_child_expelled_times_f_g

# table
sum_child_expelled_age_f <- ep_data |>
  drop_na(child_expelled_age_f)|>
  group_by(child_expelled_age_f)|>
  select(child_expelled_age_f, session)|>
  summarise(n = n_distinct(session))
 
sum_child_expelled_age_f 
## # A tibble: 3 x 2
##   child_expelled_age_f     n
##   <fct>                <int>
## 1 3 - 5 Years              6
## 2 6 - 12 Years             7
## 3 Over 12 Years            1
# graph
sum_child_expelled_age_f_g <- ggplot(data = ep_data_child, aes(x = child_expelled_age_f)) + 
    geom_bar(colour="black", fill="#DD8888", width=.8,stat="count") +
    xlab("Age When Expelled") + ylab("Count") +
    ggtitle("")

sum_child_expelled_age_f_g

# table
sum_child_expelled_steps <- ep_data |>
  filter(ep_child == 1)|>
  select(child_expelled_steps_1, child_expelled_steps_2, child_expelled_steps_3, child_expelled_steps_4, child_expelled_steps_5, child_expelled_steps_6)|>
  tbl_summary(missing = "no",
              label = list(child_expelled_steps_1 ~ "No steps taken", 
                           child_expelled_steps_2 ~ "Note sent home",
                           child_expelled_steps_3 ~ "Phone call home",
                           child_expelled_steps_4 ~ "Parent-teacher conference",
                           child_expelled_steps_5 ~ "Referral to therapy or other services",
                           child_expelled_steps_6 ~ "Other"))
sum_child_expelled_steps
Characteristic N = 201
No steps taken 7 (100%)
Note sent home 4 (100%)
Phone call home 4 (100%)
Parent-teacher conference 6 (100%)
Referral to therapy or other services 1 (100%)
Other 3 (100%)

1 n (%)

# table
sum_rate_relationship_expelled_child_f <- ep_data|>
  drop_na(rate_relationship_expelled_child_f)|>
  filter(ep_child == 1)|>
  group_by(rate_relationship_expelled_child_f)|>
  select(rate_relationship_expelled_child_f, session)|>
  summarise(n = n_distinct(session))

sum_rate_relationship_expelled_child_f
## # A tibble: 4 x 2
##   rate_relationship_expelled_child_f     n
##   <fct>                              <int>
## 1 Good                                   2
## 2 Neutral                                6
## 3 Bad                                    2
## 4 Very Bad                               3
# graph

ep_data_child <- ep_data|>
  filter(ep_child == 1)|>
  drop_na(rate_relationship_expelled_child_f)

sum_rate_relationship_expelled_child_f_g <- ggplot(data = ep_data_child, aes(x = rate_relationship_expelled_child_f)) + 
    geom_bar(colour="black", fill="#DD8888", width=.8,stat="count") +
    xlab("Rate Your Relationship with This Teacher") + ylab("Count") +
    ggtitle("")

sum_rate_relationship_expelled_child_f_g

5 Child Suspension Questions

# table
sum_child_suspended_times_f <- ep_data |>
  drop_na(child_suspended_times_f)|>
  group_by(child_suspended_times_f)|>
  select(child_suspended_times_f, relationship_f, session)|>
  summarise(n = n_distinct(session))

sum_child_suspended_times_f
## # A tibble: 4 x 2
##   child_suspended_times_f     n
##   <fct>                   <int>
## 1 Once                        2
## 2 Twice                       4
## 3 Three Times                 1
## 4 More than Three Times       8
# graph
ep_data_child <- ep_data|>
  filter(ep_child == 1)|>
  drop_na(child_suspended_times_f)

sum_child_suspended_times_f_g <- ggplot(data = ep_data_child, aes(x = child_suspended_times_f)) + 
    geom_bar(colour="black", fill="#DD8888", width=.8,stat="count") +
    xlab("Times Suspended") + ylab("Count") +
    ggtitle("")

sum_child_suspended_times_f_g

# table
sum_child_suspended_age_f <- ep_data |>    
  group_by(child_suspended_age_f)|>
  select(child_suspended_age_f, session)|>
  summarise(n = n_distinct(session))
 
sum_child_suspended_age_f 
## # A tibble: 4 x 2
##   child_suspended_age_f     n
##   <fct>                 <int>
## 1 3 - 5 Years               3
## 2 6 - 12 Years             10
## 3 Over 12 Years             2
## 4 <NA>                     79
#graph
ep_data_child <- ep_data|>
  filter(ep_child == 1)|>
  drop_na(child_suspended_age_f)

sum_child_suspended_age_f_g <- ggplot(data = ep_data_child, aes(x = child_suspended_age_f)) + 
    geom_bar(colour="black", fill="#DD8888", width=.8,stat="count") +
    xlab("Age When Suspended") + ylab("Count") +
    ggtitle("")

sum_child_suspended_age_f_g

#table
sum_child_suspended_steps <- ep_data |>
  filter(ep_child == 1)|>
  select(child_suspended_steps_1, child_suspended_steps_2, child_suspended_steps_3, child_suspended_steps_4, child_suspended_steps_5, child_suspended_steps_6)|>
  tbl_summary(missing = "no",
              label = list(child_suspended_steps_1 ~ "No steps taken", 
                           child_suspended_steps_2 ~ "Note sent home",
                           child_suspended_steps_3 ~ "Phone call home",
                           child_suspended_steps_4 ~ "Parent-teacher conference",
                           child_suspended_steps_5 ~ "Referral to therapy or other services",
                           child_suspended_steps_6 ~ "Other"))

sum_child_suspended_steps
Characteristic N = 201
No steps taken 4 (100%)
Note sent home 6 (100%)
Phone call home 9 (100%)
Parent-teacher conference 4 (100%)
Referral to therapy or other services 2 (100%)
Other NA (NA, NA)

1 n (%); Median (IQR)

#table
sum_rate_relationship_suspended_child_f <- ep_data|>
  drop_na(rate_relationship_suspended_child_f)|>
  filter(ep_child == 1)|>
  group_by(rate_relationship_suspended_child_f)|>
  select(rate_relationship_suspended_child_f, session)|>
  summarise(n = n_distinct(session))

sum_rate_relationship_suspended_child_f
## # A tibble: 3 x 2
##   rate_relationship_suspended_child_f     n
##   <fct>                               <int>
## 1 Neutral                                 7
## 2 Bad                                     4
## 3 Very Bad                                3
#graph
ep_data_child <- ep_data|>
  filter(ep_child == 1)|>
  drop_na(rate_relationship_suspended_child_f)

sum_rate_relationship_suspended_child_f_g <- ggplot(data = ep_data_child, aes(x = rate_relationship_suspended_child_f)) + 
    geom_bar(colour="black", fill="#DD8888", width=.8,stat="count") +
    xlab("Rate your Relationship with this Teacher") + ylab("Count") +
    ggtitle("")

sum_rate_relationship_suspended_child_f_g

6 Child EP Questions

#table
sum_ep_effects <- ep_data |>
  filter(ep_child == 1)|>
  select(ep_effects_1, ep_effects_2, ep_effects_3, ep_effects_4)|>
  tbl_summary(missing = "no",
              label = list(ep_effects_1 ~ "I have been afraid this child will get kicked out of school or childcare", 
                           ep_effects_2 ~ "I have avoided sending this child to school or childcare because I thought they would be sent home",
                           ep_effects_3 ~ "I have missed work",
                           ep_effects_4 ~ "I have lost a job"))

sum_ep_effects
Characteristic N = 201
I have been afraid this child will get kicked out of school or childcare 17 (100%)
I have avoided sending this child to school or childcare because I thought they would be sent home 5 (100%)
I have missed work 11 (100%)
I have lost a job 1 (100%)

1 n (%)

#table
sum_ep_tell_child <- ep_data |>
  filter(ep_role == "Caregiver")|>
  select(ep_tell_child)|>
  tbl_summary(missing = "no")

sum_ep_tell_child
Characteristic N = 201
ep_tell_child
daycare especially is very quick to suspend or expel a child for behavior without looking at what is causing the behavior in the environment. For young kids, it's as much environment as it is the kid's behavior. 1 (6.7%)
Discipline seems to be defined differently by different people. From what I’ve experienced and witnessed with others, the ways in which children are being disciplined does not work. It’s almost as if it’s something they do because they feel they have to, without truly understanding the reason behind the behavior and what to do to either prevent it from happening again or decrease the occurrence of that behavior. All behavior is communication. Focusing on the behavior alone without trying to understand the need behind the behavior is maladaptive. 1 (6.7%)
I felt that when the teachers failed to properly supervise the result was my child being displaced from their afterschool program, rather than disciplinary action being taken against the employee. 1 (6.7%)
I would prefer more real time communication vs a note at the end of the day (daycare) 1 (6.7%)
In our case a lot of the exclusionary punishments were a direct result of the child care providers not having proper training to address special needs or trauma. These trainings are available and should be taken before causing more stress on a already traumatized child. 1 (6.7%)
Not every child fits the same mold. 1 (6.7%)
Not only understanding Trauma and being trauma informed but actively treating a child in a trauma informed way is the only way to make a difference. A child always knows if you like them or not, if they feel you don't like them there is no chance of building a relationship or getting through to them. 1 (6.7%)
Removal of the child from their peers does not teach them or help them learn how to be better classmates/humans. I feel a lot of teachers are overworked and understaffed and unable to handle a child with a true trauma past. 1 (6.7%)
School is a place of learning and discipline should not overshadow the classroom milieu. 1 (6.7%)
Sending kids home does not solve the problem. 1 (6.7%)
Talk to the parent at the start of poor behavior brewing so that it can be worked on at home instead of notifying the parents once the child is expelled or taken out the classroom. Lots of time the issues can be taken care of before a huge event causing them to be taken out of the class happens 1 (6.7%)
Teachers need to be educated on how children behave when they have been abused, so they can recognize the signs. If they do recognize the signs, they need to make a report to CPS or appropriate medical provider. Correct reporting can help protect the child from the abuse continuing. Often providers are too uneducated or scared to advocate, and they end up punishing a child who just needs protection. This can also cause hardship on the protective parent in many ways. 1 (6.7%)
The discipline should not result in them being sent home, some kids see that as a reward 1 (6.7%)
Time outs are much more effective for my child than suspensions. With his disabilities he doesn’t comprehend suspensions as a negative consequence. The situations where he has been the most successful are when he knows the teachers care and they want to work with him to get better. 1 (6.7%)
To be proactive and not reactive. Understand, and use validation, model calm, use, coagulation skills, check on vulnerability factors, connection over compliance, increase knowledge on Neuro divergence, and give opportunities for redos, prays opposite behaviors. Using label praises, and not just a praise, collaborative problem solving, modeling accountability, active, ignoring for behaviors that are not unsafe 1 (6.7%)

1 n (%)

#table
sum_ep_tell_special_needs_child <- ep_data |>
  filter(ep_role == "Caregiver")|>
  select(ep_tell_special_needs_child)|>
  tbl_summary(missing = "no")

sum_ep_tell_special_needs_child
Characteristic N = 201
ep_tell_special_needs_child
BE KIND in and out of their presence. It's not about you. You may be the only adult in their life that cares and can make a difference. 1 (5.9%)
Children with Sp needs learn and behave different. The practices do not work for all children. 1 (5.9%)
Children with special needs and disabilities already have so many cards stacked against them. They need patient, empathetic, nurturing adults in their lives who want to understand their needs, not caregivers who expect adult-like behavior from children. They need teachers who won’t give up on them when they don’t see results right away. 1 (5.9%)
Educate yourself. Don’t accuse parents of lying or exaggerating. Accommodate disabilities as needed without punishment. Punishment does not help when it’s accommodations that are needed. 1 (5.9%)
Every child is different- just bc it worked for one child doesn’t mean the same thing will work for another child. Every behavior has a reason behind it 1 (5.9%)
I get that the job is hard and sometimes kids are hard.bplease approach with grace and treat every day as a new day. My special needs toddler doesn't always understand why you are still upset. 1 (5.9%)
I know it is difficult to work with a child who is different or difficult. It would be so helpful to provide parents with community resources even if they can’t stay in the program. 1 (5.9%)
Kicking them out doesn't help the problem. The WHY is needed 1 (5.9%)
Kids with autism need less stimulation in the classroom or they will act up 1 (5.9%)
More positive reinforcement 1 (5.9%)
My child has had a traumatic history and he will have some kind of issue eventually, no matter how hard we all try. He doesn’t have the capacity to be a perfect kid. Disciplinary policies that immediately suspend for each incident for long periods of time really only punish me because I have to miss work. And the ones that compound where after so many issues they’re automatically receiving giant suspensions don’t make sense bc often the offense is less but the punishment is more. And if you have a three incidents and you’re out policy- that just makes your program inaccessible to people who really need it. 1 (5.9%)
neurotypical isn't the only acceptable brain!! Why aren't there more efforts to UNDERSTAND rather than just PUNISH? 1 (5.9%)
No 2 children are alike and should be treated accordingly. 1 (5.9%)
Only teachers with education on that child’s need should be teaching and supporting that child. 1 (5.9%)
Same as above. Accommodations for mental health is just as important as for physical disabilities. 1 (5.9%)
There may be cases where the child needs additional supervision or restrictions that others don't need. For instance, some older kids should not be allowed to "help" in the younger kids classroom. This doesn't mean they are a problem with their own age group and it isn't fair for them to be punished for not being able to be condensed into other classes. 1 (5.9%)
They are normal kids, with brains that just function at their own pace. Sometimes too fast, which makes them impulsive but NOT bad kids. You need to know their trauma history or you could be triggering the behaviors with your discipline. 1 (5.9%)

1 n (%)

7 Child Demographics

# table
sum_child_attributes <- ep_data |>
  filter(ep_child == 1)|>
  select(child_attributes_1, child_attributes_2, child_attributes_3, child_attributes_4, child_attributes_5, child_attributes_6, child_attributes_7)|>
  tbl_summary(missing = "no",
              label = list(child_attributes_1 ~ "Has a developmental disability", 
                           child_attributes_2 ~ "Has another type of disability",
                           child_attributes_3 ~ "Has been in foster care",
                           child_attributes_4 ~ "Has a history of trauma or adverse childhood experiences (ACES)",
                           child_attributes_5 ~ "Has been in a childcare subsidy program through DSS",
                           child_attributes_6 ~ "Has recieved therapy (speech, occupational therapy, counseling)",
                           child_attributes_7 ~ "Has recieved funding through FAPT, WIC, SNAP, or medicaid"))

sum_child_attributes
Characteristic N = 201
Has a developmental disability 6 (100%)
Has another type of disability 7 (100%)
Has been in foster care 11 (100%)
Has a history of trauma or adverse childhood experiences (ACES) 14 (100%)
Has been in a childcare subsidy program through DSS 8 (100%)
Has recieved therapy (speech, occupational therapy, counseling) 15 (100%)
Has recieved funding through FAPT, WIC, SNAP, or medicaid 12 (100%)

1 n (%)

# table
sum_child_race_f <- ep_data |>
  filter(ep_child == 1)|>
  select(child_race_1, child_race_2, child_race_3, child_race_4, child_race_5, child_race_6)|>
  tbl_summary(missing = "no",
              label = list(child_race_1 ~ "Black or African American", 
                           child_race_2 ~ "Asian",
                           child_race_3 ~ "Pacific Islander or Hawaiian Native",
                           child_race_4 ~ "Native American or Alaska Native",
                           child_race_5 ~ "White or Caucasian",
                           child_race_6 ~ "Other"))

sum_child_race_f
Characteristic N = 201
Black or African American 5 (100%)
Asian NA (NA, NA)
Pacific Islander or Hawaiian Native NA (NA, NA)
Native American or Alaska Native NA (NA, NA)
White or Caucasian 17 (100%)
Other NA (NA, NA)

1 n (%); Median (IQR)

#table
sum_child_language_f <- ep_data |> 
  drop_na(child_language_f)|>
  group_by(child_language_f)|>
  select(child_language_f, session)|>
  summarise(n = n_distinct(session))

sum_child_language_f
## # A tibble: 2 x 2
##   child_language_f        n
##   <fct>               <int>
## 1 English                19
## 2 Child is non-verbal     1
# graph
ep_data_child <- ep_data|>
  filter(ep_child == 1)|>
  drop_na(child_language_f)

sum_child_language_f_g <- ggplot(data = ep_data_child, aes(x = child_language_f)) + 
    geom_bar(colour="black", fill="#DD8888", width=.8,stat="count") +
    xlab("Child's Primary Language") + ylab("Count") +
    ggtitle("")

sum_child_language_f_g

8 Write Data and Tables to Exl Files

library(writexl)

sum_ep_child_f_tib <- sum_ep_child_f|> 
  as_tibble()
sum_relationship_f_tib <- sum_relationship_f |>
  as_tibble()
sum_child_suspended_times_f_tib <- sum_child_suspended_times_f |>
  as_tibble()
sum_child_suspended_age_f_tib <- sum_child_suspended_age_f |>
  as_tibble()
sum_child_suspended_steps_tib <- sum_child_suspended_steps|>
  as_tibble()
sum_rate_relationship_suspended_child_f_tib <- sum_rate_relationship_suspended_child_f|>
  as_tibble()
sum_child_expelled_times_f_tib <- sum_child_expelled_times_f|>
  as_tibble()
sum_child_expelled_age_f_tib <- sum_child_expelled_age_f|>
 as_tibble()
sum_rate_relationship_expelled_child_f_tib <- sum_rate_relationship_expelled_child_f|> 
  as_tibble()
sum_ep_effects_tib <- sum_ep_effects |>
  as_tibble()
sum_ep_tell_child_tib <- sum_ep_tell_child |>
  as_tibble()
sum_ep_tell_special_needs_child_tib <- sum_ep_tell_special_needs_child |>
  as_tibble()
sum_child_attributes_tib <- sum_child_attributes |>
  as_tibble()
sum_child_race_f_tib <- sum_child_race_f|>
  as_tibble()
sum_child_language_f_tib <- sum_child_language_f|>
  as_tibble()

write_xlsx(list (experienced_ep = sum_ep_child_f_tib, 
                 relationship = sum_relationship_f_tib,
                 times_suspended = sum_child_suspended_times_f_tib, 
                 age_suspended = sum_child_suspended_age_f_tib,
                 suspended_steps = sum_child_suspended_steps_tib,
                 relationship_suspended = sum_rate_relationship_suspended_child_f_tib,
                 expelled_times = sum_child_expelled_times_f_tib,
                 expelled_age = sum_child_expelled_age_f_tib,
                 relationship_expelled = sum_rate_relationship_expelled_child_f_tib,
                 ep_effects = sum_ep_effects_tib,
                 tell_discipline = sum_ep_tell_child_tib,
                 tell_special_needs = sum_ep_tell_special_needs_child_tib,
                 child_race = sum_child_race_f_tib,
                 child_language = sum_child_language_f_tib
                 ), "EP Survey Child Summary Data.xlsx")

write_xlsx(ep_data, "ep_data_child.xlsx")