##Setting working directory

d_UMBC <- readRDS("../../../../Aggregated_Data/Data/PULSE_Data.rds") %>% 
  filter(University == "UMBC")

Filtering out F17 data

 d <- d_UMBC %>%
  filter(Semester != "F17")

Demographic proportions

d %>% 
  group_by(Semester) %>%
  summarise(prop_Female = sum(Female == "Female", na.rm = TRUE)/n(), 
            prop_FG = sum(FG == "FG", na.rm = TRUE)/n(),
            prop_URM = sum(URM == "URM")/n(),
            prop_Black = sum(RaceCategory == "Black")/n(),
            prop_HispLat = sum(RaceCategory == "HispLat")/n(),
            prop_Drop = sum(is.na(FinalGradePoints))/n(),
            mean_Grade = mean(FinalGradePoints, na.rm = TRUE),
            mean_Confidence = mean(PC_b, na.rm = TRUE)) %>% 
  mutate_if(is.numeric, ~round(., 3)) %>%
  knitr::kable()
Semester prop_Female prop_FG prop_URM prop_Black prop_HispLat prop_Drop mean_Grade mean_Confidence
F18 0.505 0.258 0.329 0.238 0.074 0.095 2.583 5.503
F19 0.497 0.219 0.310 0.244 0.061 0.052 2.684 5.470
#table(d$Semester, d$Female)
#table(d$Semester, d$Condition)

Grade distributions

d %>%
  filter(Semester == "F18") %>%
  ggplot(aes(x = FinalGradePoints)) + geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 71 rows containing non-finite values (stat_bin).

d %>%
  filter(Semester == "F19") %>%
  ggplot(aes(x = FinalGradePoints)) + geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 36 rows containing non-finite values (stat_bin).

Confidence levels by demographic

d %>% group_by(Female, Semester) %>%
  summarise(
  mean_Confidence = mean(PC_b, na.rm = TRUE))
## # A tibble: 5 x 3
## # Groups:   Female [3]
##   Female Semester mean_Confidence
##   <chr>  <chr>              <dbl>
## 1 Female F18                 5.34
## 2 Female F19                 5.28
## 3 Male   F18                 5.66
## 4 Male   F19                 5.67
## 5 <NA>   F18                 6.33
d %>% filter(!is.na(Female)) %>%
  ggplot(aes(x=Female, y= PC_b, fill = Condition)) +
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 60 rows containing non-finite values (stat_summary).

## Warning: Removed 60 rows containing non-finite values (stat_summary).

d %>% filter(!is.na(URM)) %>%
  ggplot(aes(x=URM, y= PC_b, fill = Condition)) +
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 60 rows containing non-finite values (stat_summary).

## Warning: Removed 60 rows containing non-finite values (stat_summary).

d %>% filter(!is.na(FG)) %>%
  ggplot(aes(x=FG, y= PC_b, fill = Condition)) +
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 60 rows containing non-finite values (stat_summary).

## Warning: Removed 60 rows containing non-finite values (stat_summary).

d %>% filter(!is.na(Female)) %>%
  ggplot(aes(x=Female, y= FinalGradePoints, fill = Condition)) +
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 107 rows containing non-finite values (stat_summary).
## Warning: Removed 107 rows containing non-finite values (stat_summary).

d %>% filter(!is.na(URM)) %>%
  ggplot(aes(x=URM, y= FinalGradePoints, fill = Condition)) + 
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 107 rows containing non-finite values (stat_summary).

## Warning: Removed 107 rows containing non-finite values (stat_summary).

d %>% filter(!is.na(FG)) %>%
  ggplot(aes(x=FG, y= FinalGradePoints, fill = Condition)) + 
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 107 rows containing non-finite values (stat_summary).

## Warning: Removed 107 rows containing non-finite values (stat_summary).

d %>% filter(!is.na(FG), !is.na(URM)) %>%
  ggplot(aes(x=interaction(FG, URM), y= FinalGradePoints, fill = Condition)) + 
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 107 rows containing non-finite values (stat_summary).

## Warning: Removed 107 rows containing non-finite values (stat_summary).

Descriptives for control group

d %>% filter(Condition == "Control", !is.na(Female)) %>%
  ggplot(aes(x=Female, y= PC_b, fill = Condition)) +
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 18 rows containing non-finite values (stat_summary).

## Warning: Removed 18 rows containing non-finite values (stat_summary).

d %>% filter(Condition == "Control", !is.na(URM)) %>%
  ggplot(aes(x=URM, y= PC_b, fill = Condition)) +
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 18 rows containing non-finite values (stat_summary).

## Warning: Removed 18 rows containing non-finite values (stat_summary).

d %>% filter(Condition == "Control", !is.na(FG)) %>%
  ggplot(aes(x=FG, y= PC_b, fill = Condition)) +
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 18 rows containing non-finite values (stat_summary).

## Warning: Removed 18 rows containing non-finite values (stat_summary).

d %>% filter(Condition == "Control", RaceCategory == "Black") %>%
  ggplot(aes(x=RaceCategory, y= PC_b, fill = Condition)) +
  geom_bar(stat = "summary", fun = "mean", position = "dodge") +
  geom_errorbar(stat = "summary", fun.data = "mean_se", width = .25, 
  position = position_dodge(.9)) + 
  facet_wrap(~Semester)
## Warning: Removed 8 rows containing non-finite values (stat_summary).
## Warning: Removed 8 rows containing non-finite values (stat_summary).

Demographic proportions by control group

d %>% 
  filter(Condition == "Control") %>%
  group_by(Semester) %>%
  summarise(prop_Female = sum(Female == "Female", na.rm = TRUE)/n(), 
            prop_FG = sum(FG == "FG", na.rm = TRUE)/n(),
            prop_URM = sum(URM == "URM")/n(),
            prop_Black = sum(RaceCategory == "Black")/n(),
            prop_HispLat = sum(RaceCategory == "HispLat")/n(),
            prop_Drop = sum(is.na(FinalGradePoints))/n(),
            mean_Grade = mean(FinalGradePoints, na.rm = TRUE),
            mean_Confidence = mean(PC_b, na.rm = TRUE)) %>% 
  mutate_if(is.numeric, ~round(., 3)) %>%
  knitr::kable()
Semester prop_Female prop_FG prop_URM prop_Black prop_HispLat prop_Drop mean_Grade mean_Confidence
F18 0.500 0.242 0.331 0.222 0.089 0.093 2.618 5.488
F19 0.491 0.235 0.314 0.248 0.058 0.075 2.708 5.517
d %>%
  group_by(Semester, RaceCategory) %>%
  summarise(mean_Grade = mean(FinalGradePoints, na.rm = TRUE)) %>% 
  mutate_if(is.numeric, ~round(., 3)) %>%
  knitr::kable()
## `mutate_if()` ignored the following grouping variables:
## Column `Semester`
Semester RaceCategory mean_Grade
F18 AsianUnspecified 2.200
F18 Black 2.368
F18 EAsian 2.779
F18 HispLat 2.260
F18 MidEast 2.840
F18 Native 2.714
F18 PacifIsl 2.750
F18 SAsian 3.000
F18 SEAsian 2.529
F18 White 2.664
F19 AsianUnspecified 2.667
F19 Black 2.633
F19 EAsian 2.706
F19 HispLat 2.308
F19 MidEast 2.958
F19 Native 2.500
F19 PacifIsl 1.000
F19 SAsian 2.736
F19 SEAsian 2.650
F19 White 2.765