BY_PAIR_MEANS <- here("experiments/conceptviz_2/data/by_item_means.csv")

pair_means <- read_csv(BY_PAIR_MEANS) %>%
  mutate(log_haus_sim = log(haus_sim))
pair_means %>%
  ggplot(aes(x = mean, y = log_haus_sim, color = category)) +
  geom_point(alpha = .5) +
  geom_smooth(method = "lm")

pair_means %>%
  group_by(category) %>%
  nest() %>%
  mutate(temp = map(data, ~tidy(cor.test(.$mean, .$log_haus_sim)))) %>%
  select(-data) %>%
  unnest() %>%
  kable()
category estimate statistic p.value parameter conf.low conf.high method alternative
bird 0.5030590 8.190512 0.00e+00 198 0.3916534 0.5999281 Pearson’s product-moment correlation two.sided
bread 0.3034706 4.481557 1.25e-05 198 0.1719702 0.4243451 Pearson’s product-moment correlation two.sided
chair 0.4910711 7.932301 0.00e+00 198 0.3780900 0.5896390 Pearson’s product-moment correlation two.sided
house 0.2638450 3.849018 1.60e-04 198 0.1298576 0.3883693 Pearson’s product-moment correlation two.sided
tree 0.2434230 3.531492 5.14e-04 198 0.1083409 0.3696789 Pearson’s product-moment correlation two.sided