Skip to content

Commit 726154a

Browse files
committed
update graphs
1 parent 551b3d4 commit 726154a

4 files changed

+1322
-1331
lines changed

docs/self-reported_submission_quality.html

+654-670
Large diffs are not rendered by default.

docs/system_quality_rating.html

+558-550
Large diffs are not rendered by default.

self-reported_submission_quality.Rmd

+37-39
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,11 @@ source(knitr::purl('setup.Rmd', output = tempfile()))
1919
Looks like there is a slightly higher rate of negative ratings for the high debt group, but also an even smaller increase in positive ratings.
2020

2121
```{r}
22-
data.frame(
23-
"High_debt_version" = d.both_completed %>%
24-
filter(high_debt_version == "true") %>%
25-
pull(quality_post_task) %>%
26-
revalue(c(
27-
"-3"="Very Bad",
28-
"-2"="Bad",
29-
"-1"="Somewhat Bad",
30-
"0"="Neutral",
31-
"1"="Somewhat Good",
32-
"2"="Good",
33-
"3"="Very Good"
34-
)),
35-
"Low_debt_version" = d.both_completed %>%
36-
filter(high_debt_version == "false") %>%
37-
pull(quality_post_task) %>%
38-
revalue(c(
22+
23+
likert.data <- d.both_completed %>%
24+
select(high_debt_version, quality_post_task)
25+
26+
likert.data$quality_post_task <- revalue(likert.data$quality_post_task, c(
3927
"-3"="Very Bad",
4028
"-2"="Bad",
4129
"-1"="Somewhat Bad",
@@ -44,12 +32,18 @@ data.frame(
4432
"2"="Good",
4533
"3"="Very Good"
4634
))
47-
) %>%
48-
likert() %>%
49-
plot(
50-
type="density",
51-
facet = TRUE,
52-
)
35+
36+
likert.data$high_debt_version <- revalue(likert.data$high_debt_version, c(
37+
"true"="High Debt",
38+
"false"="Low Debt"
39+
))
40+
41+
ggplot(likert.data, aes(x=quality_post_task)) +
42+
geom_bar(fill= "Light Blue") +
43+
facet_grid(rows = vars(high_debt_version)) +
44+
scale_y_continuous(limits = NULL, breaks = c(2,4,6,8), labels = c("2","4","6","8")) +
45+
theme(axis.title.x=element_blank(),
46+
axis.title.y=element_blank())
5347
```
5448

5549
## Initial model
@@ -721,7 +715,6 @@ post <- posterior_predict(own_quality0.all, newdata = post_settings) %>%
721715
estimate,
722716
submission
723717
)
724-
725718
post.nice <- post %>% mutate_at("estimate", function(x) revalue(as.ordered(x), c(
726719
"1"="Very Bad",
727720
"2"="Bad",
@@ -731,21 +724,26 @@ post.nice <- post %>% mutate_at("estimate", function(x) revalue(as.ordered(x),
731724
"6"="Good",
732725
"7"="Very Good"
733726
)))
734-
735-
data.frame(
736-
Bad_submission = post.nice %>%
737-
filter(submission == "Bad") %>%
738-
pull(estimate),
739-
Good_submission = post.nice %>%
740-
filter(submission == "Good") %>%
741-
pull(estimate)
742-
) %>%
743-
likert() %>%
744-
plot(
745-
type="density",
746-
facet = TRUE,
747-
)
748-
727+
728+
729+
730+
vline.data <- post.nice %>%
731+
group_by(submission) %>%
732+
summarize(z = mean(as.numeric(estimate)))
733+
734+
sprintf("Estimations for 3 years experience")
735+
736+
post.nice %>%
737+
ggplot() +
738+
geom_histogram(aes(x=estimate),fill= "Light Blue", stat = "count") +
739+
geom_vline(aes(xintercept = z),
740+
vline.data,
741+
col = "Dark Blue",
742+
lwd = 1)+
743+
facet_grid(rows = vars(submission)) +
744+
scale_y_continuous(limits = NULL, breaks = c(400,800,1200,1600), labels = c("10%","20%","30%","40%")) +
745+
theme(axis.title.x=element_blank(),
746+
axis.title.y=element_blank())
749747
```
750748

751749
```{r effect-size-diff, warning=FALSE, message=FALSE}

system_quality_rating.Rmd

+73-72
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,10 @@ We plot the data and can see that there is no obvious large difference between t
2020
### Per debt level
2121

2222
```{r}
23-
data.frame(
24-
High_debt_version = d.both_completed %>%
25-
filter(high_debt_version == "true") %>%
26-
pull(quality_pre_task) %>%
27-
revalue(c(
28-
"-3"="Very Bad",
29-
"-2"="Bad",
30-
"-1"="Somewhat Bad",
31-
"0"="Neutral",
32-
"1"="Somewhat Good",
33-
"2"="Good",
34-
"3"="Very Good"
35-
)),
36-
Low_debt_version = d.both_completed %>%
37-
filter(high_debt_version == "false") %>%
38-
pull(quality_pre_task) %>%
39-
revalue(c(
23+
likert.data <- d.both_completed %>%
24+
select(high_debt_version, quality_pre_task)
25+
26+
likert.data$quality_pre_task <- revalue(likert.data$quality_pre_task, c(
4027
"-3"="Very Bad",
4128
"-2"="Bad",
4229
"-1"="Somewhat Bad",
@@ -45,34 +32,29 @@ data.frame(
4532
"2"="Good",
4633
"3"="Very Good"
4734
))
48-
) %>%
49-
likert() %>%
50-
plot(
51-
type="density",
52-
facet = TRUE,
53-
)
35+
36+
likert.data$high_debt_version <- revalue(likert.data$high_debt_version, c(
37+
"true"="High Debt",
38+
"false"="Low Debt"
39+
))
40+
41+
ggplot(likert.data, aes(x=quality_pre_task)) +
42+
geom_bar(fill= "Light Blue") +
43+
facet_grid(rows = vars(high_debt_version)) +
44+
scale_y_continuous(limits = NULL, breaks = c(2,4,6,8), labels = c("2","4","6","8")) +
45+
theme(axis.title.x=element_blank(),
46+
axis.title.y=element_blank())
47+
48+
5449
```
5550

5651
### Per scenario
5752

5853
```{r}
59-
data.frame(
60-
Tickets = d.both_completed %>%
61-
filter(scenario == "tickets") %>%
62-
pull(quality_pre_task) %>%
63-
revalue(c(
64-
"-3"="Very Bad",
65-
"-2"="Bad",
66-
"-1"="Somewhat Bad",
67-
"0"="Neutral",
68-
"1"="Somewhat Good",
69-
"2"="Good",
70-
"3"="Very Good"
71-
)),
72-
Booking = d.both_completed %>%
73-
filter(scenario == "booking") %>%
74-
pull(quality_pre_task) %>%
75-
revalue(c(
54+
likert.data <- d.both_completed %>%
55+
select(scenario, quality_pre_task)
56+
57+
likert.data$quality_pre_task <- revalue(likert.data$quality_pre_task, c(
7658
"-3"="Very Bad",
7759
"-2"="Bad",
7860
"-1"="Somewhat Bad",
@@ -81,12 +63,13 @@ data.frame(
8163
"2"="Good",
8264
"3"="Very Good"
8365
))
84-
) %>%
85-
likert() %>%
86-
plot(
87-
type="density",
88-
facet = TRUE,
89-
)
66+
67+
ggplot(likert.data, aes(x=quality_pre_task)) +
68+
geom_bar(fill= "Light Blue") +
69+
facet_grid(rows = vars(scenario)) +
70+
scale_y_continuous(limits = NULL, breaks = c(2,4,6,8), labels = c("2","4","6","8")) +
71+
theme(axis.title.x=element_blank(),
72+
axis.title.y=element_blank())
9073
```
9174

9275
## Initial model
@@ -565,6 +548,7 @@ post <- posterior_predict(scenario_quality1.all, newdata = post_settings) %>%
565548
)%>%
566549
mutate(estimate = estimate)
567550
551+
568552
post.nice <- post %>% mutate_at("estimate", function(x) revalue(as.ordered(x), c(
569553
"1"="Very Bad",
570554
"2"="Bad",
@@ -575,35 +559,52 @@ post.nice <- post %>% mutate_at("estimate", function(x) revalue(as.ordered(x),
575559
"7"="Very Good"
576560
)))
577561
578-
data.frame(
579-
High_debt_version_3_years = post.nice %>%
580-
filter(high_debt_version == "true", work_experience_programming == 3) %>%
581-
pull(estimate),
582-
Low_debt_version_3_years = post.nice %>%
583-
filter(high_debt_version == "false", work_experience_programming == 3) %>%
584-
pull(estimate)
585-
) %>%
586-
likert() %>%
587-
plot(
588-
type="density",
589-
facet = TRUE,
590-
)
562+
post.nice$high_debt_version <- revalue(post.nice$high_debt_version, c(
563+
"true"="High Debt",
564+
"false"="Low Debt"
565+
))
591566
592-
data.frame(
593-
High_debt_version_25_years = post.nice %>%
594-
filter(high_debt_version == "true", work_experience_programming == 25) %>%
595-
pull(estimate),
596-
Low_debt_version_25_years = post.nice %>%
597-
filter(high_debt_version == "false", work_experience_programming == 25) %>%
598-
pull(estimate)
599-
) %>%
600-
likert() %>%
601-
plot(
602-
type="density",
603-
facet = TRUE,
604-
)
605567
606568
569+
post.nice.3 <- filter(post.nice, work_experience_programming == 3)
570+
571+
vline.data.3 <- post.nice.3 %>%
572+
group_by(high_debt_version) %>%
573+
summarize(z = mean(as.numeric(estimate)))
574+
575+
sprintf("Estimations for 3 years experience")
576+
577+
post.nice.3 %>%
578+
ggplot() +
579+
geom_histogram(aes(x=estimate),fill= "Light Blue", stat = "count") +
580+
geom_vline(aes(xintercept = z),
581+
vline.data.3,
582+
col = "Dark Blue",
583+
lwd = 1)+
584+
facet_grid(rows = vars(high_debt_version)) +
585+
scale_y_continuous(limits = NULL, breaks = c(400,800,1200,1600), labels = c("10%","20%","30%","40%")) +
586+
theme(axis.title.x=element_blank(),
587+
axis.title.y=element_blank())
588+
589+
post.nice.25 <- filter(post.nice, work_experience_programming == 25)
590+
591+
vline.data.25 <- post.nice.25 %>%
592+
group_by(high_debt_version) %>%
593+
summarize(z = mean(as.numeric(estimate)))
594+
595+
sprintf("Estimations for 25 years experience")
596+
597+
post.nice.25 %>%
598+
ggplot() +
599+
geom_histogram(aes(x=estimate),fill= "Light Blue", stat = "count") +
600+
geom_vline(aes(xintercept = z),
601+
vline.data.25,
602+
col = "Dark Blue",
603+
lwd = 1)+
604+
facet_grid(rows = vars(high_debt_version)) +
605+
scale_y_continuous(limits = NULL, breaks = c(400,800,1200,1600), labels = c("10%","20%","30%","40%")) +
606+
theme(axis.title.x=element_blank(),
607+
axis.title.y=element_blank())
607608
608609
```
609610

0 commit comments

Comments
 (0)