Last active
August 24, 2021 10:09
-
-
Save richarddmorey/1bca5c91a5a16a100a07644f9be6d7bf to your computer and use it in GitHub Desktop.
Replicating table 1 from Rouder and Morey (2012)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No | homo | CC | Latitude | north | lat_from_o | tpar | meantemp | hitemp | lotemp | diftemp | Isosd | dpop_30 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1 | 595 | 27 | 0 | 35 | 1 | 17.8 | 30 | 1 | 29 | 0.218223437 | 13 | |
2 | 1 | 475 | 27 | 0 | 35 | 1 | 17.8 | 30 | 1 | 29 | 0.218223437 | 13 | |
3 | 1 | 507 | 27 | 0 | 35 | 1 | 17.8 | 30 | 1 | 29 | 0.218223437 | 13 | |
4 | 1 | 570 | 27 | 0 | 35 | 1 | 17.8 | 30 | 1 | 29 | 0.218223437 | 13 | |
6 | 1 | 776 | 4 | 1 | 4 | 7 | 24.7 | 26 | 11 | 15 | 0.212807364 | 13 | |
7 | 1 | 506.333 | 4 | 1 | 4 | 7 | 24.7 | 26 | 11 | 15 | 0.212807364 | 13 | |
8 | 1 | 622.5 | 4 | 1 | 4 | 7 | 24.7 | 26 | 11 | 15 | 0.212807364 | 13 | |
5 | 1 | 500 | 7 | 1 | 1 | 7 | 22.2 | 25 | 6 | 19 | 0.212807364 | 13 | |
15 | 1 | 775 | 40 | 1 | 32 | 4 | 5.8 | 31 | -1 | 32 | 0.25577606 | 16 | |
16 | 1 | 650 | 40 | 1 | 32 | 4 | 5.8 | 31 | -1 | 32 | 0.25577606 | 16 | |
17 | 1 | 600 | 40 | 1 | 32 | 4 | 5.8 | 31 | -1 | 32 | 0.25577606 | 16 | |
9 | 1 | 782.5 | 4 | 1 | 4 | 7 | 24.7 | 26 | 11 | 15 | 0.246603596 | 16 | |
10 | 1 | 616 | 4 | 1 | 4 | 7 | 24.7 | 26 | 11 | 15 | 0.246603596 | 16 | |
67 | 1 | 850 | 38 | 1 | 30 | 3 | 6.9 | 31 | -10 | 41 | 0.232941294 | 17 | |
12 | 1 | 597 | 4 | 0 | 12 | 7 | 22.3 | 31 | 13 | 18 | 0.232941294 | 17 | |
14 | 1 | 674 | 4 | 0 | 12 | 7 | 22.3 | 31 | 13 | 18 | 0.252773704 | 17 | |
13 | 1 | 825.4 | 4 | 1 | 4 | 7 | 24.7 | 26 | 11 | 15 | 0.252773704 | 17 | |
18 | 1 | 639.2 | 4 | 0 | 12 | 7 | 22.3 | 31 | 13 | 18 | 0.221164939 | 17 | |
11 | 1 | 855 | 8 | 0 | 16 | 3 | 25.8 | 31 | 23 | 8 | 0.222701943 | 19 | |
107 | 1 | 1000 | 32.05 | 1 | 24.05 | 3 | 6.9 | 31 | -10 | 41 | 0.222701943 | 19 | |
19 | 1 | 662.286 | 4 | 0 | 12 | 7 | 22.3 | 31 | 13 | 18 | 0.222701943 | 19 | |
21 | 1 | 904.5 | 3.9008 | 1 | 4.0992 | 7 | 24.7 | 26 | 11 | 15 | 0.260943995 | 19 | |
22 | 1 | 825.667 | 4 | 1 | 4 | 7 | 24.7 | 26 | 11 | 15 | 0.264428076 | 19 | |
27 | 1 | 856 | 7.5778 | 0 | 15.5778 | 3 | 25.8 | 31 | 23 | 8 | 0.298084327 | 28 | |
29 | 1 | 792.571 | 7.5778 | 0 | 15.5778 | 3 | 25.8 | 31 | 23 | 8 | 0.298084327 | 28 | |
30 | 1 | 900 | 7.5778 | 0 | 15.5778 | 3 | 25.8 | 31 | 23 | 8 | 0.298084327 | 28 | |
31 | 1 | 951 | 7.5778 | 0 | 15.5778 | 3 | 25.8 | 31 | 23 | 8 | 0.298084327 | 28 | |
32 | 1 | 1020 | 7.5778 | 0 | 15.5778 | 3 | 25.8 | 31 | 23 | 8 | 0.298084327 | 28 | |
37 | 1 | 868.6 | 7.5778 | 0 | 15.5778 | 3 | 25.8 | 31 | 23 | 8 | 0.298084327 | 28 | |
24 | 1 | 1070.5 | 4 | 0 | 12 | 7 | 22.3 | 31 | 13 | 18 | 0.309443896 | 28 | |
25 | 1 | 779 | 34.2 | 1 | 26.2 | 3 | 6.9 | 31 | -10 | 41 | 0.301799443 | 29 | |
26 | 1 | 800 | 14.8333 | 1 | 6.8333 | 7 | 25.5 | 27 | 13 | 14 | 0.299464168 | 29 | |
28 | 1 | 940 | 7.3667 | 0 | 15.3667 | 3 | 25.8 | 31 | 23 | 8 | 0.29634621 | 30 | |
38 | 1 | 1185 | 41.55 | 1 | 33.55 | 1 | 13.4 | 30 | 5 | 25 | 0.357515549 | 31 | |
39 | 1 | 732.33 | 4 | 0 | 12 | 7 | 22.3 | 31 | 13 | 18 | 0.390312661 | 31 | |
218 | 1 | 1006 | 7.3833 | 0 | 15.3833 | 3 | 25.8 | 31 | 23 | 8 | 0.36580401 | 32 | |
40 | 1 | 1300 | 35.4158 | 1 | 27.4158 | 3 | 22.5 | 29 | 9 | 20 | 0.382977102 | 33 | |
108 | 1 | 1000 | 7.24 | 0 | 15.24 | 3 | 25.8 | 31 | 23 | 8 | 0.368289722 | 38 | |
42 | 1 | 1250 | 10.6333 | 1 | 2.6333 | 7 | 22.2 | 25 | 6 | 19 | 0.368289722 | 38 | |
47 | 1 | 1056.333 | 7.3833 | 0 | 15.3833 | 3 | 25.8 | 31 | 23 | 8 | 0.411476483 | 38 | |
76 | 1 | 1390 | 43 | 1 | 35 | 1 | 13.3 | 28 | 6 | 22 | 0.411476483 | 38 | |
77 | 1 | 1125 | 43 | 1 | 35 | 1 | 13.3 | 28 | 6 | 22 | 0.411476483 | 38 | |
78 | 1 | 1153.333 | 43 | 1 | 35 | 1 | 13.3 | 28 | 6 | 22 | 0.411476483 | 38 | |
57 | 1 | 911 | 35 | 1 | 27 | 3 | 17.1 | 28 | 8 | 20 | 0.338519963 | 40 | |
56 | 1 | 1138.667 | 42.8167 | 1 | 34.8167 | 1 | 10.7 | 25 | 1 | 24 | 0.338519963 | 40 | |
71 | 1 | 1100 | 32.817 | 1 | 24.817 | 3 | 6.9 | 31 | -10 | 41 | 0.324690513 | 42 | |
70 | 1 | 1216.667 | 32 | 0 | 40 | 1 | 17.8 | 30 | 1 | 29 | 0.324690513 | 42 | |
68 | 1 | 1310 | 14 | 0 | 22 | 7 | 21.4 | 31 | 9 | 22 | 0.324690513 | 42 | |
69 | 1 | 1100 | 3 | 0 | 11 | 7 | 22.3 | 31 | 13 | 18 | 0.324690513 | 42 | |
75 | 1 | 1266.556 | 40.365 | 1 | 32.365 | 1 | 15.4 | 33 | 6 | 27 | 0.396802573 | 43 | |
102 | 1 | 1305 | 32 | 1 | 24 | 3 | 17.1 | 28 | 8 | 20 | 0.417255655 | 47 | |
72 | 1 | 1432 | 49.2983 | 1 | 41.2983 | 0 | 8.4 | 24 | -3 | 27 | 0.417255655 | 47 | |
73 | 1 | 1111.192 | 47 | 1 | 39 | 0 | 8.4 | 24 | -3 | 27 | 0.417255655 | 47 | |
79 | 1 | 1249.333 | 23.3 | 1 | 15.3 | 5 | 23.7 | 41 | 7 | 34 | 0.417255655 | 47 | |
95 | 1 | 1280 | 30 | 0 | 38 | 1 | 17.8 | 30 | 1 | 29 | 0.410862309 | 48 | |
103 | 1 | 1400 | 32 | 1 | 24 | 3 | 17.1 | 28 | 8 | 20 | 0.406021609 | 49 | |
20 | 1 | 1000 | 7.5778 | 0 | 15.5778 | 3 | 25.8 | 31 | 23 | 8 | 0.417855328 | 51 | |
81 | 1 | 1012.5 | 31.7167 | 1 | 23.7167 | 3 | 6.9 | 31 | -10 | 41 | 0.417855328 | 51 | |
23 | 1 | 850 | 7.5778 | 0 | 15.5778 | 3 | 25.8 | 31 | 23 | 8 | 0.425454367 | 58 | |
58 | 1 | 1030 | 38 | 1 | 30 | 3 | 6.9 | 31 | -10 | 41 | 0.425454367 | 58 | |
59 | 1 | 937.5 | 38 | 1 | 30 | 3 | 6.9 | 31 | -10 | 41 | 0.425454367 | 58 | |
60 | 1 | 1220 | 38 | 1 | 30 | 3 | 6.9 | 31 | -10 | 41 | 0.425454367 | 58 | |
61 | 1 | 1225 | 38 | 1 | 30 | 3 | 6.9 | 31 | -10 | 41 | 0.425454367 | 58 | |
62 | 1 | 1015 | 38 | 1 | 30 | 3 | 6.9 | 31 | -10 | 41 | 0.425454367 | 58 | |
63 | 1 | 1030 | 38 | 1 | 30 | 3 | 6.9 | 31 | -10 | 41 | 0.425454367 | 58 | |
82 | 1 | 1160 | 25.7 | 1 | 17.7 | 3 | 6.9 | 31 | -10 | 41 | 0.432039854 | 59 | |
83 | 1 | 1450 | 50.9833 | 1 | 42.9833 | 0 | 8.4 | 24 | -3 | 27 | 0.425318887 | 60 | |
89 | 1 | 900 | 7.3833 | 0 | 15.3833 | 3 | 25.8 | 31 | 23 | 8 | 0.414916251 | 61 | |
84 | 1 | 1121.429 | 7 | 0 | 15 | 7 | 22.3 | 31 | 13 | 18 | 0.414916251 | 61 | |
85 | 1 | 1266.167 | 7 | 0 | 15 | 7 | 22.3 | 31 | 13 | 18 | 0.414916251 | 61 | |
86 | 1 | 1115.714 | 7 | 0 | 15 | 7 | 22.3 | 31 | 13 | 18 | 0.414916251 | 61 | |
87 | 1 | 1135 | 7 | 0 | 15 | 7 | 22.3 | 31 | 13 | 18 | 0.414916251 | 61 | |
88 | 1 | 1109 | 7 | 0 | 15 | 7 | 22.3 | 31 | 13 | 18 | 0.414916251 | 61 | |
140 | 1 | 1090 | 7 | 0 | 15 | 7 | 22.3 | 31 | 13 | 18 | 0.414916251 | 61 | |
100 | 1 | 1432.5 | 7 | 1 | 1 | 7 | 22.2 | 25 | 6 | 19 | 0.408297587 | 61 | |
90 | 1 | 1316.667 | 42.05 | 1 | 34.05 | 3 | 6.9 | 31 | -10 | 41 | 0.405555998 | 62 | |
91 | 1 | 1334.571 | 47.617 | 1 | 39.617 | 0 | 9.8 | 28 | -4 | 32 | 0.407075204 | 63 | |
92 | 1 | 1200 | 50.3 | 1 | 42.3 | 0 | 10.7 | 25 | 1 | 24 | 0.40956105 | 64 | |
93 | 1 | 1420 | 45.95 | 1 | 37.95 | 0 | 10.7 | 25 | 1 | 24 | 0.406054306 | 65 | |
225 | 1 | 1450 | 12 | 1 | 4 | 7 | 22.2 | 25 | 6 | 19 | 0.406054306 | 65 | |
94 | 1 | 1065 | 46.583 | 1 | 38.583 | 0 | 10.7 | 25 | 1 | 24 | 0.401801067 | 66 | |
97 | 1 | 1550 | 13.15 | 1 | 5.15 | 7 | 26.8 | 42 | 15 | 27 | 0.384918654 | 66 | |
96 | 1 | 1375 | 3.25 | 1 | 4.75 | 7 | 24.7 | 26 | 11 | 15 | 0.384918654 | 66 | |
64 | 1 | 1305 | 52 | 1 | 44 | 0 | 8.4 | 22 | 2 | 20 | 0.384918654 | 67 | |
80 | 1 | 1400 | 3.25 | 1 | 4.75 | 7 | 24.7 | 26 | 11 | 15 | 0.385 | 67 | |
239 | 1 | 1390 | 42.05 | 1 | 34.05 | 3 | 6.9 | 31 | -10 | 41 | 0.384378768 | 73 | |
219 | 1 | 1250 | 43.5 | 1 | 35.5 | 1 | 10.7 | 25 | 1 | 24 | 0.384378768 | 73 | |
98 | 1 | 1450 | 46.1681 | 1 | 38.1681 | 1 | 10.9 | 29 | 6 | 23 | 0.384378768 | 73 | |
99 | 1 | 1200 | 46.1681 | 1 | 38.1681 | 1 | 10.9 | 29 | 6 | 23 | 0.384378768 | 73 | |
222 | 1 | 1450 | 46.1681 | 1 | 38.1681 | 1 | 10.9 | 29 | 6 | 23 | 0.384378768 | 73 | |
223 | 1 | 1205 | 46.1681 | 1 | 38.1681 | 1 | 10.9 | 29 | 6 | 23 | 0.384378768 | 73 | |
101 | 1 | 1283.5 | 3.1667 | 0 | 11.1667 | 7 | 22.3 | 31 | 13 | 18 | 0.36220423 | 73 | |
104 | 1 | 1234.333 | 41.9 | 1 | 33.9 | 1 | 13.4 | 30 | 5 | 25 | 0.413475128 | 75 | |
105 | 1 | 1295 | 41.9 | 1 | 33.9 | 1 | 13.4 | 30 | 5 | 25 | 0.413475128 | 75 | |
106 | 1 | 1270.5 | 35 | 1 | 27 | 4 | 19.2 | 31 | 5 | 26 | 0.413475128 | 75 | |
224 | 1 | 1450 | 32 | 1 | 24 | 4 | 19.2 | 31 | 5 | 26 | 0.413475128 | 75 | |
109 | 1 | 995 | 14.6667 | 1 | 6.6667 | 7 | 22.2 | 25 | 6 | 19 | 0.413475128 | 75 | |
33 | 1 | 1300 | 32 | 1 | 24 | 4 | 19.2 | 31 | 5 | 26 | 0.407602948 | 75 | |
34 | 1 | 1554.5 | 32 | 1 | 24 | 4 | 19.2 | 31 | 5 | 26 | 0.407602948 | 75 | |
35 | 1 | 1499.5 | 32 | 1 | 24 | 4 | 19.2 | 31 | 5 | 26 | 0.407602948 | 75 | |
36 | 1 | 1587.333 | 32 | 1 | 24 | 4 | 19.2 | 31 | 5 | 26 | 0.407602948 | 75 | |
142 | 1 | 1280 | 32 | 1 | 24 | 4 | 19.2 | 31 | 5 | 26 | 0.407602948 | 75 | |
167 | 1 | 1531 | 32 | 1 | 24 | 4 | 19.2 | 31 | 5 | 26 | 0.407602948 | 75 | |
168 | 1 | 1535 | 32 | 1 | 24 | 4 | 19.2 | 31 | 5 | 26 | 0.407602948 | 75 | |
229 | 1 | 1510 | 29 | 0 | 37 | 1 | 17.8 | 30 | 1 | 29 | 0.40409947 | 76 | |
41 | 1 | 1650.2 | 45 | 1 | 37 | 1 | 10.7 | 25 | 1 | 24 | 0.402105157 | 77 | |
220 | 1 | 1362 | 50.5 | 1 | 42.5 | 0 | 10.7 | 25 | 1 | 24 | 0.396490598 | 80 | |
43 | 1 | 1226.75 | 35 | 1 | 27 | 3 | 13.3 | 28 | 6 | 22 | 0.396490598 | 80 | |
44 | 1 | 1581 | 41 | 1 | 33 | 1 | 12.1 | 32 | -15 | 47 | 0.396490598 | 80 | |
169 | 1 | 1550 | 42 | 1 | 34 | 1 | 13.4 | 30 | 5 | 25 | 0.394052574 | 81 | |
45 | 1 | 1551 | 41.2 | 1 | 33.2 | 1 | 13.4 | 30 | 5 | 25 | 0.394052574 | 82 | |
46 | 1 | 1745 | 33 | 1 | 25 | 4 | 19.2 | 31 | 5 | 26 | 0.388439222 | 82 | |
54 | 1 | 1457.5 | 50.8 | 1 | 42.8 | 0 | 9.6 | 23 | -1 | 24 | 0.388439222 | 90 | |
55 | 1 | 1487.4 | 50.8 | 1 | 42.8 | 0 | 9.6 | 23 | -1 | 24 | 0.388439222 | 90 | |
48 | 1 | 1337.75 | 52 | 1 | 44 | 0 | 8.4 | 24 | -3 | 27 | 0.388439222 | 90 | |
51 | 1 | 1345.25 | 44 | 1 | 36 | 1 | 10.7 | 25 | 1 | 24 | 0.388439222 | 90 | |
144 | 1 | 1310 | 44 | 1 | 36 | 1 | 10.7 | 25 | 1 | 24 | 0.388439222 | 90 | |
221 | 1 | 1400 | 35 | 1 | 27 | 3 | 13.3 | 28 | 6 | 22 | 0.388439222 | 90 | |
50 | 1 | 1626 | 42.7333 | 1 | 34.7333 | 1 | 10.7 | 25 | 1 | 24 | 0.388439222 | 90 | |
49 | 1 | 1320 | 49.0167 | 1 | 41.0167 | 0 | 6.8 | 26 | -3 | 29 | 0.388439222 | 90 | |
52 | 1 | 1650 | 36 | 1 | 28 | 4 | 21.4 | 41 | 7 | 34 | 0.388439222 | 90 | |
53 | 1 | 1550 | 36 | 1 | 28 | 4 | 21.4 | 41 | 7 | 34 | 0.388439222 | 90 | |
237 | 1 | 1480 | 24.5 | 1 | 16.5 | 3 | 6.9 | 31 | -10 | 41 | 0.383797175 | 93 | |
66 | 1 | 1486.2 | 44.9833 | 1 | 36.9833 | 1 | 10.7 | 25 | 1 | 24 | 0.383797175 | 93 | |
65 | 1 | 1400 | 40.8167 | 1 | 32.8167 | 4 | 19.2 | 31 | 5 | 26 | 0.383797175 | 93 | |
162 | 1 | 1500 | 50.5 | 1 | 42.5 | 0 | 7.5 | 25 | -5 | 30 | 0.377070104 | 95 | |
178 | 1 | 1620 | 50.5 | 1 | 42.5 | 0 | 7.5 | 25 | -5 | 30 | 0.377070104 | 95 | |
74 | 1 | 1235 | 10.0333 | 0 | 18.0333 | 7 | 22.3 | 31 | 13 | 18 | 0.377070104 | 95 | |
153 | 1 | 1420 | 27 | 1 | 19 | 5 | 22.1 | 36 | 8 | 28 | 0.377247824 | 95 | |
176 | 1 | 1600 | 45 | 1 | 37 | 1 | 10.7 | 25 | 1 | 24 | 0.378345024 | 97 | |
231 | 1 | 1590 | 45 | 1 | 37 | 1 | 10.7 | 25 | 1 | 24 | 0.378345024 | 97 | |
230 | 1 | 1570 | 45 | 1 | 37 | 1 | 10.7 | 25 | 1 | 24 | 0.378345024 | 101 | |
148 | 1 | 1375 | 44 | 1 | 36 | 1 | 10.7 | 25 | 1 | 24 | 0.378345024 | 101 | |
175 | 1 | 1580 | 44 | 1 | 36 | 1 | 10.7 | 25 | 1 | 24 | 0.378345024 | 101 | |
181 | 1 | 1775 | 44 | 1 | 36 | 1 | 10.7 | 25 | 1 | 24 | 0.378345024 | 101 | |
232 | 1 | 1538 | 49 | 1 | 41 | 0 | 7.5 | 25 | -5 | 30 | 0.38 | 105 | |
233 | 1 | 1481 | 49 | 1 | 41 | 0 | 7.5 | 25 | -5 | 30 | 0.38 | 105 | |
234 | 1 | 1378 | 49 | 1 | 41 | 0 | 7.5 | 25 | -5 | 30 | 0.38 | 105 | |
235 | 1 | 1547 | 49 | 1 | 41 | 0 | 7.5 | 25 | -5 | 30 | 0.38 | 105 | |
166 | 1 | 1531 | 52 | 1 | 44 | 0 | 8.4 | 24 | -3 | 27 | 0.38 | 106 | |
157 | 1 | 1452 | 50.5 | 1 | 42.5 | 0 | 7.5 | 25 | -5 | 30 | 0.379526652 | 110 | |
163 | 1 | 1518 | 50.5 | 1 | 42.5 | 0 | 7.5 | 25 | -5 | 30 | 0.379526652 | 110 | |
171 | 1 | 1555 | 50.5 | 1 | 42.5 | 0 | 7.5 | 25 | -5 | 30 | 0.379526652 | 110 | |
177 | 1 | 1608 | 50.5 | 1 | 42.5 | 0 | 7.5 | 25 | -5 | 30 | 0.379526652 | 110 | |
145 | 1 | 1322 | 49 | 1 | 41 | 0 | 7.5 | 25 | -5 | 30 | 0.379526652 | 115 | |
165 | 1 | 1522 | 49 | 1 | 41 | 0 | 7.5 | 25 | -5 | 30 | 0.378345024 | 115 | |
226 | 1 | 1600 | 49 | 1 | 41 | 0 | 7.5 | 25 | -5 | 30 | 0.378345024 | 115 | |
227 | 1 | 1500 | 49 | 1 | 41 | 0 | 7.5 | 25 | -5 | 30 | 0.378345024 | 115 | |
228 | 1 | 1304 | 49 | 1 | 41 | 0 | 7.5 | 25 | -5 | 30 | 0.378345024 | 115 | |
238 | 1 | 1464 | 56 | 1 | 48 | 1 | -5.1 | 23 | -16 | 39 | 0.384102389 | 116 | |
150 | 1 | 1380 | 45 | 1 | 37 | 1 | 10.7 | 25 | 1 | 24 | 0.39131532 | 117 | |
236 | 1 | 1605 | 51.5 | 1 | 43.5 | 1 | -5.1 | 23 | -16 | 39 | 0.39131532 | 118 | |
182 | 1 | 1880 | 44 | 1 | 36 | 1 | 13.4 | 30 | 5 | 25 | 0.39131532 | 119 | |
159 | 1 | 1490 | 44 | 1 | 36 | 1 | 13.4 | 30 | 5 | 25 | 0.387277852 | 120 | |
139 | 1 | 1090 | 26.5 | 1 | 18.5 | 2 | 11.1 | 30 | -2 | 32 | 0.397247483 | 126 | |
141 | 1 | 1170 | 26.5 | 1 | 18.5 | 2 | 11.1 | 30 | -2 | 32 | 0.397247483 | 126 | |
151 | 1 | 1390 | 26.5 | 1 | 18.5 | 2 | 11.1 | 30 | -2 | 32 | 0.397247483 | 126 | |
143 | 1 | 1290 | 38 | 1 | 30 | 3 | 6.9 | 31 | -10 | 41 | 0.397247483 | 126 | |
149 | 1 | 1380 | 38 | 1 | 30 | 3 | 6.9 | 31 | -10 | 41 | 0.397247483 | 126 | |
161 | 1 | 1500 | 38 | 1 | 30 | 3 | 6.9 | 31 | -10 | 41 | 0.397247483 | 126 | |
146 | 1 | 1354 | 45 | 1 | 37 | 1 | 10.7 | 25 | 1 | 24 | 0.392478942 | 127 | |
147 | 1 | 1370 | 51 | 1 | 43 | 0 | 8.4 | 24 | -3 | 27 | 0.39644267 | 132 | |
160 | 1 | 1500 | 51 | 1 | 43 | 0 | 8.4 | 24 | -3 | 27 | 0.39644267 | 132 | |
156 | 1 | 1434 | 45 | 1 | 37 | 1 | 10.7 | 25 | 1 | 24 | 0.39644267 | 132 | |
180 | 1 | 1700 | 45 | 1 | 37 | 1 | 10.7 | 25 | 1 | 24 | 0.39644267 | 132 | |
170 | 1 | 1555 | 44 | 1 | 36 | 1 | 10.7 | 25 | 1 | 24 | 0.39644267 | 132 | |
152 | 1 | 1414 | 44 | 1 | 36 | 1 | 13.4 | 30 | 5 | 25 | 0.394097668 | 136 | |
154 | 1 | 1424 | 44 | 1 | 36 | 1 | 13.4 | 30 | 5 | 25 | 0.394097668 | 136 | |
164 | 1 | 1520 | 44 | 1 | 36 | 1 | 13.4 | 30 | 5 | 25 | 0.394097668 | 136 | |
179 | 1 | 1661 | 44 | 1 | 36 | 1 | 13.4 | 30 | 5 | 25 | 0.394097668 | 136 | |
158 | 1 | 1484 | 38 | 1 | 30 | 1 | 13.4 | 30 | 5 | 25 | 0.389503389 | 140 | |
172 | 1 | 1560 | 38 | 1 | 30 | 1 | 13.4 | 30 | 5 | 25 | 0.389503389 | 140 | |
173 | 1 | 1565 | 38 | 1 | 30 | 1 | 13.4 | 30 | 5 | 25 | 0.389503389 | 140 | |
174 | 1 | 1569 | 38 | 1 | 30 | 1 | 13.4 | 30 | 5 | 25 | 0.389503389 | 140 | |
155 | 1 | 1430 | 45 | 1 | 37 | 1 | 10.7 | 25 | 1 | 24 | 0.389503389 | 141 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Replicate Table 1 of Rouder and Morey (2012)" | |
author: "Richard D. Morey" | |
date: "24/08/2021" | |
output: html_document | |
editor_options: | |
chunk_output_type: console | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = FALSE) | |
library(dplyr) | |
library(gt) | |
library(ggplot2) | |
library(colorspace) | |
``` | |
```{r functions} | |
## Regression functions as they were in 2012 | |
dinvgamma = function (x, shape, scale = 1) | |
{ | |
if (shape <= 0 | scale <= 0) { | |
stop("Shape or scale parameter negative in dinvgamma().\n") | |
} | |
alpha <- shape | |
beta <- scale | |
log.density <- alpha * log(beta) - lgamma(alpha) - (alpha + | |
1) * log(x) - (beta/x) | |
return(exp(log.density)) | |
} | |
integrand.regression=function(g,N,p,R2) | |
{ | |
a=.5*((N-p-1)*log(1+g)-(N-1)*log(1+g*(1-R2))) | |
exp(a)*dinvgamma(g,shape=.5,scale=N/2) | |
} | |
linearReg.Quad=function(N,p,R2) { | |
h=integrate(integrand.regression,lower=0,upper=Inf,N=N,p=p,R2=R2) | |
return(h$value) | |
} | |
``` | |
```{r readdata} | |
## Read from public gist | |
data_files = gistr::gist('https://gist.github.com/richarddmorey/1bca5c91a5a16a100a07644f9be6d7bf') | |
# I extracted these values using mathpix because I do not | |
# have the original .tex file | |
data_files$files[['table1.tsv']]$content %>% | |
textConnection() %>% | |
read.delim(., | |
sep = '\t', | |
header = TRUE) -> tab1 | |
data_files$files[['Bailey_Geary_2009.csv']]$content %>% | |
textConnection() %>% | |
read.csv(., | |
header = TRUE) %>% | |
rename( | |
Density = dpop_30, | |
Parasites = tpar, | |
Local = diftemp, | |
Global = Isosd, | |
Capacity = CC | |
) %>% | |
select(Density, Parasites, Local, Global, Capacity ) -> b_g | |
``` | |
## Table as published | |
```{r tab1.1} | |
tab1 %>% | |
gt(rowname_col = 'abbr') %>% | |
cols_label( | |
R2 = '\\(R^2\\)', | |
Bm0 = '\\(B_{m0}\\)', | |
Bmf = '\\(B_{mf}\\)' | |
) %>% | |
fmt_scientific(c('Bm0','Bmf')) %>% | |
tab_header(title = 'TABLE 1', | |
subtitle = 'Bayes Factor Analysis of Hominid Cranial Capacity (Data From Bailey & Geary, 2009)') %>% | |
tab_source_note( | |
source_note = html('<i>Note</i>. Local = local climate; Global = global temperature; Parasites = parasite load; Density | |
= population density.') | |
) | |
``` | |
## Some checking | |
I wanted to compare the results to the 2012 code, to see whether the differences could be accounted for by integration tweaks. | |
```{r} | |
## Do some checks | |
tab1 %>% | |
pull(Model) %>% | |
paste('Capacity ~',.) %>% | |
sapply(X = ., FUN = function(fmla){ | |
lm(as.formula(fmla), data = b_g) %>% | |
summary() %>% | |
`$`('r.squared') | |
}) -> r2s | |
npars = stringr::str_count(tab1$Model, pattern = '\\+') + 1 | |
tab1 %>% | |
pull(Model) %>% | |
paste('Capacity ~',.) %>% | |
sapply(X = ., FUN = function(fmla){ | |
BayesFactor::lmBF(as.formula(fmla), data = b_g, rscaleCont = 1) %>% | |
as.vector() | |
}) -> bfs | |
names(bfs) = names(r2s) | |
bfs2012 = mapply(p = npars, | |
R2 = r2s, | |
MoreArgs = list(N = nrow(b_g)), | |
FUN = linearReg.Quad) | |
## These are almost exactly the same | |
tibble( | |
idx = 1:length(bfs), | |
bfs = bfs, | |
bfs2012 = bfs2012, | |
perc_diff = 100*(bfs - bfs2012)/bfs | |
) %>% | |
ggplot(aes(x = idx, y = perc_diff)) + | |
geom_point() + | |
scale_x_continuous( | |
name = 'Model index', | |
breaks = 1:length(bfs) | |
) + | |
scale_y_continuous( | |
name = 'Difference (% of BayesFactor)', | |
limits = c(-.001,.001) | |
) + | |
ggtitle(label = 'Difference between 2012 BF and BayesFactor') + | |
theme_minimal() | |
``` | |
Apparently not. The differences are very small. | |
## Table as it should be | |
In the table below, I have computed the values using the `BayesFactor` | |
package. I have highlighted the background color of the cells based on their original table's deviation from this table; redder cells are "worse". As you can see, the $\cal{M}_13$ row seems to be the main error, but there are still minor deviations elsewhere. | |
```{r} | |
tab1 %>% | |
mutate( | |
Bm0_2021 = bfs, | |
Bmf_2021 = bfs / bfs[1], | |
err_bm0 = abs(100 * (Bm0 - Bm0_2021)/Bm0_2021), | |
err_bmf = abs(100 * (Bmf - Bmf_2021)/Bmf_2021) | |
) -> tab1_corrected | |
tab1_corrected %>% | |
gt(rowname_col = 'abbr') %>% | |
cols_hide(c('Bm0','Bmf','err_bm0','err_bmf')) %>% | |
cols_label( | |
R2 = '\\(R^2\\)', | |
Bm0_2021 = '\\(B_{m0}\\)', | |
Bmf_2021 = '\\(B_{mf}\\)' | |
) %>% | |
fmt_scientific(c('Bm0_2021','Bmf_2021')) %>% | |
tab_header(title = 'TABLE 1', | |
subtitle = 'Bayes Factor Analysis of Hominid Cranial Capacity (Data From Bailey & Geary, 2009)') %>% | |
tab_source_note( | |
source_note = html('<i>Note</i>. Local = local climate; Global = global temperature; Parasites = parasite load; Density | |
= population density.') | |
) -> gt_obj | |
# Coloring of cells | |
# adapted from https://stackoverflow.com/a/63945239/1129889 | |
heat_palette <- leaflet::colorNumeric( | |
palette = colorRamp(c("#FFFFFF", "#FF4444"), interpolate = "spline"), | |
domain = c(tab1_corrected$err_bm0, | |
tab1_corrected$err_bmf) | |
) | |
ht_bm0 <- heat_palette(tab1_corrected$err_bm0) | |
ht_bmf <- heat_palette(tab1_corrected$err_bmf) | |
for(i in seq_along(tab1_corrected$err_bm0)) { | |
gt_obj <- gt_obj %>% | |
tab_style( | |
style = cell_fill(color = ht_bm0[i]), | |
locations = cells_body(columns = "Bm0_2021", rows = i) | |
) | |
gt_obj <- gt_obj %>% | |
tab_style( | |
style = cell_fill(color = ht_bmf[i]), | |
locations = cells_body(columns = "Bmf_2021", rows = i) | |
) | |
} | |
gt_obj | |
``` | |
## Rounded \(R^2\)? | |
As a check, I wanted to see if the smaller differences could be due to using the rounded \(R^2\) values in the table. Maybe we wanted people to be able to type the value from the table into a calculator and get the Bayes factor from the table. | |
```{r} | |
bfs_r2tab = mapply(p = npars, | |
R2 = tab1$R2, | |
MoreArgs = list(N = nrow(b_g)), | |
FUN = linearReg.Quad) | |
tab1 %>% | |
mutate( | |
Bm0_rounded = bfs_r2tab, | |
Bmf_rounded = bfs_r2tab / bfs_r2tab[1], | |
err_bm0 = abs(100 * (Bm0 - Bm0_rounded)/Bm0_rounded), | |
err_bmf = abs(100 * (Bmf - Bmf_rounded)/Bmf_rounded) | |
) -> tab1_rounded | |
tab1_rounded %>% | |
gt(rowname_col = 'abbr') %>% | |
cols_hide(c('Bm0','Bmf','err_bm0','err_bmf')) %>% | |
cols_label( | |
R2 = '\\(R^2\\)', | |
Bm0_rounded = '\\(B_{m0}\\)', | |
Bmf_rounded = '\\(B_{mf}\\)' | |
) %>% | |
fmt_scientific(c('Bm0_rounded','Bmf_rounded')) %>% | |
tab_header(title = 'TABLE 1', | |
subtitle = 'Bayes Factor Analysis of Hominid Cranial Capacity (Data From Bailey & Geary, 2009)') %>% | |
tab_source_note( | |
source_note = html('<i>Note</i>. Local = local climate; Global = global temperature; Parasites = parasite load; Density | |
= population density.') | |
) -> gt_obj | |
# Coloring of cells | |
# adapted from https://stackoverflow.com/a/63945239/1129889 | |
heat_palette <- leaflet::colorNumeric( | |
palette = colorRamp(c("#FFFFFF", "#FF4444"), interpolate = "spline"), | |
domain = c(tab1_rounded$err_bm0, | |
tab1_rounded$err_bmf) | |
) | |
ht_bm0 <- heat_palette(tab1_rounded$err_bm0) | |
ht_bmf <- heat_palette(tab1_rounded$err_bmf) | |
for(i in seq_along(tab1_rounded$err_bm0)) { | |
gt_obj <- gt_obj %>% | |
tab_style( | |
style = cell_fill(color = ht_bm0[i]), | |
locations = cells_body(columns = "Bm0_rounded", rows = i) | |
) | |
gt_obj <- gt_obj %>% | |
tab_style( | |
style = cell_fill(color = ht_bmf[i]), | |
locations = cells_body(columns = "Bmf_rounded", rows = i) | |
) | |
} | |
gt_obj | |
``` | |
Using rounded $R^2$ seems to account for the smaller differences in the table. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abbr | Model | R2 | Bm0 | Bmf | |
---|---|---|---|---|---|
\(\cal{M}_{f}\) | Local+Global+Parasites+Density | .7109 | 3.54e41 | 1 | |
\(\cal{M}_{1}\) | Local+Global+Parasites | .567 | 5.56e27 | 1.57e-14 | |
\(\cal{M}_{2}\) | Local+Global+Density | .7072 | 1.56e42 | 4.41 | |
\(\cal{M}_{3}\) | Local+Parasites+Density | .6303 | 3.82e33 | 1.08e-8 | |
\(\cal{M}_{4}\) | Global+Parasites+Density | .7109 | 4.59e42 | 12.97 | |
\(\cal{M}_{5}\) | Local+Global | .5199 | 1.02e25 | 2.88e-17 | |
\(\cal{M}_{6}\) | Local+Parasites | .2429 | 1.23e8 | 3.47e-34 | |
\(\cal{M}_{7}\) | Local+Density | .6258 | 1.84e34 | 5.20e-8 | |
\(\cal{M}_{8}\) | Global+Parasites | .5642 | 4.02e28 | 1.14e-13 | |
\(\cal{M}_{9}\) | Global+Density | .7069 | 2.17e43 | 61.03 | |
\(\cal{M}_{10}\) | Parasites+Density | .6298 | 4.60e34 | 1.30e-7 | |
\(\cal{M}_{11}\) | Local | .091 | 220 | 6.21e-40 | |
\(\cal{M}_{12}\) | Global | .5049 | 1.10e25 | 3.11e-17 | |
\(\cal{M}_{13}\) | Parasites | .2221 | 1.28e8 | 3.62e-34 | |
\(\cal{M}_{14}\) | Density | .6244 | 2.29e35 | 6.47e-7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment