@@ -20,23 +20,10 @@ We plot the data and can see that there is no obvious large difference between t
20
20
### Per debt level
21
21
22
22
``` {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(
40
27
"-3"="Very Bad",
41
28
"-2"="Bad",
42
29
"-1"="Somewhat Bad",
@@ -45,34 +32,29 @@ data.frame(
45
32
"2"="Good",
46
33
"3"="Very Good"
47
34
))
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
+
54
49
```
55
50
56
51
### Per scenario
57
52
58
53
``` {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(
76
58
"-3"="Very Bad",
77
59
"-2"="Bad",
78
60
"-1"="Somewhat Bad",
@@ -81,12 +63,13 @@ data.frame(
81
63
"2"="Good",
82
64
"3"="Very Good"
83
65
))
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())
90
73
```
91
74
92
75
## Initial model
@@ -565,6 +548,7 @@ post <- posterior_predict(scenario_quality1.all, newdata = post_settings) %>%
565
548
)%>%
566
549
mutate(estimate = estimate)
567
550
551
+
568
552
post.nice <- post %>% mutate_at("estimate", function(x) revalue(as.ordered(x), c(
569
553
"1"="Very Bad",
570
554
"2"="Bad",
@@ -575,35 +559,52 @@ post.nice <- post %>% mutate_at("estimate", function(x) revalue(as.ordered(x),
575
559
"7"="Very Good"
576
560
)))
577
561
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
+ ))
591
566
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
- )
605
567
606
568
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())
607
608
608
609
```
609
610
0 commit comments