Skip to content

Instantly share code, notes, and snippets.

@richarddmorey
Last active May 29, 2017 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richarddmorey/f7c3ed9fe3f9f1fc0520f332b4a8efd7 to your computer and use it in GitHub Desktop.
Save richarddmorey/f7c3ed9fe3f9f1fc0520f332b4a8efd7 to your computer and use it in GitHub Desktop.
APS2017 Presidential symposium slide 1
d = read.csv("https://gist.githubusercontent.com/richarddmorey/f7c3ed9fe3f9f1fc0520f332b4a8efd7/raw/900d75f765a086dba65a316504c926da1c1e894a/golf.csv")
plot(d$score, d$size, xlab = "Course score", ylab = "Perceived size", axes = FALSE, ylim = c(0,9), xlim = c(60,140), pch = 19)
axis(2, at = 1:9, las = 1)
axis(1)
abline(lm(size~score, data = d))
cor(d$size, d$score, method = "spearman")
# edge of significance
cor.test(d$size, d$score, method = "spearman")
# edge of significance
cor.test(d$size, d$score, method = "kendall")
score size
1 114.749175254226 2
2 101.709689487467 3
3 102.701084923307 3
4 87.8253919668061 3
5 88.8171275039962 3
6 109.496650001701 4
7 77.7607727102676 4
8 79.9098731421964 4
9 82.8850797537666 4
10 87.6784681835187 4
11 89.6615991565486 4
12 93.7941706628575 4
13 81.0849233071455 5
14 81.7464204332891 5
15 84.8869163010577 5
16 88.8541985511683 5
17 97.6145291296806 5
18 114.473693160562 5
19 122.407917559433 5
20 76.8601843349318 9
21 81.8192021222324 9
22 89.7530864197531 9
23 87.7515899738122 8
24 81.7644458048498 6
25 82.5908920858416 6
26 85.7313879536102 6
27 87.7148590279903 6
28 89.6983301023705 6
29 98.4586606808829 6
30 104.078155290276 6
31 84.8314797809747 2
32 86.9802401115532 2
33 88.7984219297351 2
34 90.7818930041152 2
35 91.608339285107 2
36 92.2694963099003 2
37 92.9306533346937 2
38 100.699248376016 2
39 90.6900656395606 6
40 91.351222664354 6
41 92.0123796891474 6
42 92.6735367139407 6
43 97.7240417644458 2
44 98.3851987892392 2
45 98.8810665578342 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment