library(tidyverse)library(janitor)library(psych)library(knitr)library(gtsummary)library(kableExtra)library(maps)library(mapproj)library(choroplethrMaps)theme_set(theme_light())aba_raw <-read_csv("data_aba/aba_raw.csv") #import untouched raw fileaba <- aba_rawnames(aba) <-paste(names(aba), aba[1,], sep ="_")aba <- aba %>%rename(start_date =`StartDate_Start Date`,end_date =`EndDate_End Date`,status_response_type =`Status_Response Type`,progress = Progress_Progress,duration_sec =`Duration (in seconds)_Duration (in seconds)`,finished = Finished_Finished,recorded_date =`RecordedDate_Recorded Date`,response_id =`ResponseId_Response ID`,distribution_channel =`DistributionChannel_Distribution Channel`,language =`UserLanguage_User Language`,age_q1.1 =`1.1_What is your age?`,sex_q1.2 =`1.2_How do you describe your gender? - Selected Choice`,race_q1.6 =`1.6_Please specify your race/ethnicity. (Check all that apply) - Selected Choice`,race_q1.6.7 =`1.6_7_TEXT_Please specify your race/ethnicity. (Check all that apply) - Please use this box to enter text, if needed. - Text`,marital_status_q1.3 =`1.3_What is your marital status? - Selected Choice`,education_q1.4 =`1.4_What is your highest degree or level of education you have completed?`,salary_q1.5 =`1.5_What is your approximate annual salary range?`, role_q2.3 =`2.3_Choose the option that best describes your current role in ABA: - Selected Choice`,n_aba_work_settings =`2.9_How many different ABA work settings (total number of jobs) have you held, as an ABA practitioner? These can be clinics, centers, schools, hospitals, group homes or any work environment where behavior analytic services were provided.`,other_region =`1.7_10_TEXT_Please select your location. - If located outside of the United States, please list country name. - Text` ) %>%slice(3:652) %>%filter(Q37_Consent =="YES", finished =="TRUE") %>%# 152 people didn't finishmutate(region =case_when(other_region !="If located outside of the United States, please list country name."~ other_region,TRUE~gsub(r"{\s*\([^\)]+\)}","",`1.7_Please select your location. - Selected Choice`)),race_q1.6 =case_when(str_detect(race_q1.6, "use this box to enter text") ~ race_q1.6.7, TRUE~as.character(race_q1.6)),n_aba_work_settings =as.numeric(n_aba_work_settings),duration_sec =as.numeric(duration_sec),duration_min = duration_sec/60, duration_hr = duration_min/60, .after = duration_sec)#aba_raw %>% count(Finished) #152 poeople didn't finish the survey
Table 1: Descriptives
Show code
aba %>%select("Sex"= sex_q1.2,#"Race" = race_q1.6,"Age"= age_q1.1,"Marital Status"= marital_status_q1.3,"Education"= education_q1.4,"Salary"= salary_q1.5,"Number of ABA roles"= n_aba_work_settings,"Roles"= role_q2.3 ) %>%tbl_summary(statistic =list(all_continuous() ~"{mean} ({sd})",all_categorical() ~"{n} / {N} ({p}%)" ))
ggplot(aba, aes(n_aba_work_settings)) +geom_bar() +labs(x ="Number of different jobs held",title ="Number of different jobs held as an ABA practitioner")
Show code
aba %>%count(race_q1.6, sort = T) %>%kable(col.names =c("Race", "n")) %>%kable_styling()
Race
n
White
336
Latino or Hispanic
50
Black/African American
45
Asian
21
Black/African American,White
6
Native American,White
6
Latino or Hispanic,White
4
Prefer not to answer
4
Asian,White
3
Black/African American,Latino or Hispanic
2
Black/African American,Native American
2
Latino or Hispanic,Native American
2
NA
2
Arab American
1
Asian,Latino or Hispanic,Native Hawaiian or Pacific Islander
1
Asian,Native Hawaiian or Pacific Islander
1
Black/African American,Latino or Hispanic,Native American,White
# age, gender, marital status, education, salary range# race/ethnicity people could check multiple boxes, so lets see what we can do with race. Blacks are only 3% according to prior research.