Archaeological seriation of abundance matrices.
kairos 1.1.0 is now on CRAN! kairos is a toolkit for the analysis of chronological patterns from archaeological count data.
You can install it from CRAN with:
install.packages("kairos")
The range of tools provided by kairos is now extended by two methods for matrix seriation1, allowing the construction of relative chronologies:
seriate_rank()
seriate_average()
The seriate_*()
methods return a permutation of the rows
and columns (according to the margin
argument) of a count
data matrix
or data.frame
. Then,
permute()
performs the reordering.
This post briefly illustrates how to perform a correspondence analysis based seriation.
Correspondence Analysis (CA) is an effective method for the seriation of archaeological assemblages. The order of the rows and columns is given by the coordinates along one dimension of the CA space, assumed to account for temporal variation. The direction of temporal change within the correspondence analysis space is arbitrary: additional information is needed to determine the actual order in time.
## Load the zuni dataset
# install.packages("folio")
data("zuni", package = "folio")
## Plot the original matrix
tabula::plot_ford(zuni) +
ggplot2::theme(axis.text.y = ggplot2::element_blank())
## Get row and column permutations from CA coordinates along the first axis
indices <- seriate_average(zuni, margin = c(1, 2), axes = 1)
get_order(indices)
$rows
[1] 372 387 350 367 110 417 364 407 357 160 373 406 356 344 348 384
[17] 362 378 339 383 376 386 338 419 416 408 377 392 347 371 374 351
[33] 353 402 366 375 397 363 109 395 400 389 420 155 381 412 178 382
[49] 415 368 404 172 385 361 126 352 354 360 358 343 182 414 342 86
[65] 94 403 93 410 413 396 379 388 401 108 345 176 341 315 399 113
[81] 314 369 98 321 112 179 323 87 411 365 316 359 197 115 370 253
[97] 104 289 320 174 390 327 409 332 317 391 103 355 37 418 322 318
[113] 398 194 329 335 334 325 331 326 319 394 328 156 47 100 147 173
[129] 349 290 333 340 99 153 32 88 330 157 142 38 223 17 27 405
[145] 336 26 242 116 256 159 184 158 163 255 121 83 162 96 324 148
[161] 198 228 232 97 243 40 250 150 165 31 154 35 169 1 171 54
[177] 53 229 3 263 224 247 175 164 137 246 240 39 225 212 84 238
[193] 299 230 80 9 46 2 85 257 7 234 278 233 199 111 183 29
[209] 141 57 196 92 42 166 28 22 101 380 279 283 24 45 151 68
[225] 89 41 8 144 209 61 226 239 49 52 145 248 119 82 149 5
[241] 43 48 252 210 227 245 75 152 193 77 102 74 277 237 211 73
[257] 241 222 66 249 107 292 273 130 217 208 118 117 58 393 95 251
[273] 190 65 213 244 143 204 67 64 44 132 301 136 270 177 114 4
[289] 18 287 139 91 51 195 161 236 309 131 189 201 268 180 205 135
[305] 79 187 50 146 168 266 259 62 76 81 106 235 294 214 207 105
[321] 303 254 90 185 203 15 202 281 286 14 124 272 282 284 33 140
[337] 291 271 128 127 129 167 313 170 337 285 133 298 261 125 55 346
[353] 12 63 262 295 191 310 13 70 264 219 134 71 138 258 188 216
[369] 192 312 300 296 260 72 269 36 69 288 23 6 267 280 34 302
[385] 30 181 308 123 122 304 311 186 19 218 306 10 307 200 215 120
[401] 274 305 293 206 221 276 56 21 25 78 220 231 275 297 20 59
[417] 60 16 265 11
$columns
[1] 18 14 17 16 13 15 9 8 12 11 6 7 5 10 4 2 3 1
seriate_average()
also contains the full results of the
correspondence analysis. You can use dimensio to explore
these results:
## Plot CA row coordinates (get a nice arch effect!)
dimensio::plot_rows(indices) +
ggplot2::theme_bw() +
ggplot2::theme(legend.position = "none")
## Plot column contributions to the first two axes
dimensio::plot_contributions(indices, margin = 2, axes = c(1, 2)) +
ggplot2::theme_bw()
If the results of the correspondence analysis are satisfactory, we can then permute the rows and columns of the initial data matrix:
## Permute rows and columns
permuted <- permute(zuni, indices)
## Plot permuted matrix
tabula::plot_ford(permuted) +
ggplot2::theme(axis.text.y = ggplot2::element_blank())
The move to add these matrix seriation methods, previously implemented in tabula, follows a reorganization for consistency so that we no longer have chronology tools in two separate packages. This implies that the seriation methods are temporarily re-exported by tabula from kairos and will be removed in a future version of tabula.↩︎
If you see mistakes or want to suggest changes, please create an issue on the source repository.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/tesselle/website, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
Frerebeau (2022, June 18). tesselle: kairos 1.1.0. Retrieved from https://www.tesselle.org/posts/2022-06-18-kairos-110/
BibTeX citation
@misc{tesselle-kairos-110, author = {Frerebeau, Nicolas}, title = {tesselle: kairos 1.1.0}, url = {https://www.tesselle.org/posts/2022-06-18-kairos-110/}, year = {2022} }