This is the same as Norming Study 1 except for three changes:
#Munge
d = read.csv("KE2_A.csv")
d.long = d %>%
gather(variable, value, contains("_")) %>%
mutate(trial_num = unlist(lapply(strsplit(as.character(variable),
"_"),function(x) x[2])),
variable = unlist(lapply(strsplit(as.character(variable),
"_"),function(x) x[1]))) %>%
spread(variable, value) %>%
mutate(trial_num = as.numeric(trial_num),
rating = as.numeric(rating),
obj = as.factor(obj))
d.long %>%
group_by(subids) %>%
slice(1) %>%
ungroup () %>%
count(condition) %>%
kable()
| condition | n |
|---|---|
| building_difficulty | 22 |
| building_time | 20 |
| complexity | 19 |
| visual_complexity | 20 |
d.long %>%
mutate(subids = as.factor(subids)) %>%
ggplot(aes(y = rating, x=subids, fill = condition)) +
geom_boxplot() +
theme_bw() +
theme(axis.text.x = element_text(angle = 90,
vjust = .3, hjust = 1))
A few subjects didn’t use the whole scale (30, 45, 74), but for the most part, lots of within-subject variability.
#Distribution across all responses
ggplot(d.long, aes(x = rating, fill = condition)) +
geom_histogram() +
facet_wrap(~condition) +
theme_bw() +
theme(legend.position = "none")
Fewer 0 responses than previous version.
ggplot(d.long, aes(y = rating, x = condition, fill = condition)) +
geom_boxplot() +
theme_bw() +
theme(legend.position = "none")
condition.ratings = d.long %>%
group_by(condition, obj) %>%
multi_boot_standard(column = "rating") %>%
mutate(obj_lab = unlist(lapply(strsplit(as.character(obj),
"_F"),function(x) x[1])),
obj_lab = gsub('[[:punct:]]', '', obj_lab) )
condition.ratings %>%
filter(condition == "building_difficulty") %>%
arrange(mean) %>%
mutate(obj_lab = fct_reorder(obj_lab, mean),
obj = paste0("thumbnails/", obj),
pic_height = rep(c(1 ,.95, .9),n()/3)) %>%
ggplot(aes(x = obj_lab, y = mean)) +
geom_bar(stat = "identity", fill = "#F8766D" ) +
geom_image(aes(image=obj, y = pic_height), size = .04, by = "width") +
geom_linerange(aes(ymax=ci_upper, ymin=ci_lower)) +
theme_bw() +
xlab("Structure") +
ylab("Mean Rating") +
ggtitle("Building Difficulty") +
ylim(0,1) +
theme(legend.position = "none",
axis.text.x = element_text(angle = 90, vjust = .3, hjust = 1))
condition.ratings %>%
filter(condition == "building_time") %>%
arrange(mean) %>%
mutate(obj_lab = fct_reorder(obj_lab, mean),
obj = paste0("thumbnails/", obj),
pic_height = rep(c(1 ,.95, .9),n()/3)) %>%
ggplot(aes(x = obj_lab, y = mean)) +
geom_bar(stat = "identity", fill = "#7CAE00") +
geom_image(aes(image=obj, y = pic_height), size = .04, by = "width") +
geom_linerange(aes(ymax=ci_upper, ymin=ci_lower)) +
theme_bw() +
xlab("Structure") +
ylab("Mean Rating") +
ggtitle("Building Time") +
ylim(0,1) +
theme(legend.position = "none",
axis.text.x = element_text(angle = 90, vjust = .3, hjust = 1))
condition.ratings %>%
filter(condition == "complexity") %>%
arrange(mean) %>%
mutate(obj_lab = fct_reorder(obj_lab, mean),
obj = paste0("thumbnails/", obj),
pic_height = rep(c(1 ,.95, .9),n()/3)) %>%
ggplot(aes(x = obj_lab, y = mean)) +
geom_bar(stat = "identity", fill = "#00BFC4") +
geom_image(aes(image=obj, y = pic_height), size = .04, by = "width") +
geom_linerange(aes(ymax=ci_upper, ymin=ci_lower)) +
theme_bw() +
xlab("Structure") +
ylab("Mean Rating") +
ggtitle("Complexity") +
ylim(0,1) +
theme(legend.position = "none",
axis.text.x = element_text(angle = 90, vjust = .3, hjust = 1))
condition.ratings %>%
filter(condition == "visual_complexity") %>%
arrange(mean) %>%
mutate(obj_lab = fct_reorder(obj_lab, mean),
obj = paste0("thumbnails/", obj),
pic_height = rep(c(1 ,.95, .9),n()/3)) %>%
ggplot(aes(x = obj_lab, y = mean) ) +
geom_bar(stat = "identity", fill = "#C77CFF") +
geom_image(aes(image=obj, y = pic_height), size = .04, by = "width") +
geom_linerange(aes(ymax=ci_upper, ymin=ci_lower)) +
theme_bw() +
xlab("Structure") +
ylab("Mean Rating") +
ggtitle("Visual Complexity") +
ylim(0,1) +
theme(legend.position = "none",
axis.text.x = element_text(angle = 90,
vjust = .3, hjust = 1))
corrs = condition.ratings %>%
select(-ci_lower, -ci_upper) %>%
spread(condition, mean)
lm_plot <- function(data, mapping, ...){
p <- ggplot(data = data, mapping = mapping) +
geom_point() +
geom_smooth(method=lm, ...)
p
}
ggpairs(select(corrs, -1,-2), lower = list(continuous = lm_plot))
More variability in the correlations between conditions than the previous version (r = .81-.96).
corrs %>%
mutate(obj = paste0("thumbnails/", obj)) %>%
ggplot(aes(y = visual_complexity, x = building_time)) +
geom_smooth(method=lm) +
geom_image(aes(image=obj), size = .04, by = "width") +
theme_bw() +
theme(legend.position = "none",
axis.text.x = element_text(angle = 90, vjust = .3, hjust = 1))
corrs %>%
mutate(obj = paste0("thumbnails/", obj)) %>%
ggplot(aes(y = visual_complexity, x = building_difficulty)) +
geom_smooth(method=lm) +
geom_image(aes(image=obj), size = .04, by = "width") +
theme_bw() +
theme(legend.position = "none",
axis.text.x = element_text(angle = 90, vjust = .3, hjust = 1))
corrs %>%
mutate(obj = paste0("thumbnails/", obj)) %>%
ggplot(aes(y = visual_complexity, x = complexity)) +
geom_smooth(method=lm) +
geom_image(aes(image=obj), size = .04, by = "width") +
theme_bw() +
theme(legend.position = "none",
axis.text.x = element_text(angle = 90, vjust = .3, hjust = 1))
corrs %>%
mutate(obj = paste0("thumbnails/", obj)) %>%
ggplot(aes(y = complexity , x = building_time)) +
geom_smooth(method=lm) +
geom_image(aes(image=obj), size = .04, by = "width") +
theme_bw() +
theme(legend.position = "none",
axis.text.x = element_text(angle = 90, vjust = .3, hjust = 1))
corrs %>%
mutate(obj = paste0("thumbnails/", obj)) %>%
ggplot(aes(y = complexity, x = building_difficulty)) +
geom_smooth(method=lm) +
geom_image(aes(image=obj), size = .04, by = "width") +
theme_bw() +
theme(legend.position = "none",
axis.text.x = element_text(angle = 90, vjust = .3, hjust = 1))
corrs %>%
mutate(obj = paste0("thumbnails/", obj)) %>%
ggplot(aes(y = building_time, x = building_difficulty)) +
geom_smooth(method=lm) +
geom_image(aes(image=obj), size = .04, by = "width") +
theme_bw() +
theme(legend.position = "none",
axis.text.x = element_text(angle = 90, vjust = .3, hjust = 1))