Skip to content

Commit

Permalink
Add seriation tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Dec 29, 2023
1 parent d6f9bc8 commit 0e2950d
Show file tree
Hide file tree
Showing 3 changed files with 217 additions and 0 deletions.
94 changes: 94 additions & 0 deletions learn/seriation/index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: "Archaeological seriation"
description: "Correspondence analysis based seriation with `kairos`, `tabula` and `dimensio`."
categories:
- count data
- correspondence analysis
- seriation
author:
- name: Nicolas Frerebeau
affiliation: Archéosciences Bordeaux (UMR 6034)
affiliation_url: https://www.archeosciences-bordeaux.fr
orcid: 0000-0001-5759-4944
date: 2023-08-22
bibliography: [references.bib, packages.bib]
echo: true
nocite: |
@R-dimensio, @R-kairos, @R-tabula
---

Matrix seriation in archaeology consists of chronologically ordering a set of archaeological contexts based on the distribution of different characteristics (artifact types). This process involves finding an arrangement by permuting the rows and/or columns of a contingency table.

The origin of matrix seriation is attributable to the British archaeologist Flinders Petrie [-@petrie1899], who successfully established an important chronology for ancient Egypt in 1899. Petrie's formulation of the method was in archaeological terms, devoid of any mathematical formalism. For this, we had to wait until the middle of the 20th century and the work of @brainerd1951 and @robinson1951, followed by the contributions of Kendall [-@kendall1969; -@kendall1969a]. Seriation is not unique to archaeology, and some of the crucial advances have been made in other disciplines, notably the work of @bertin1967 on graphic semiology and the work of @benzecri1973 on correspondence analysis.

The matrix seriation problem is based on three archaeological conditions and two statistical assumptions, which @dunnell1970 summarizes as follows.

The homogeneity conditions state that all the groups included in a seriation must:

* Be of comparable duration,
* Belong to the same cultural tradition,
* Come from the same local area.

The mathematical assumptions state that the distribution of any historical or temporal class:

* Is continuous through time,
* Exhibits the form of a unimodal curve.

Theses assumptions create a distributional model and ordering is accomplished by arranging the matrix so that the class distributions approximate the required pattern. The resulting order is *inferred* to be chronological.

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.

This post briefly illustrates how to perform a correspondence analysis based seriation.

```{r}
library(kairos)
library(tabula)
library(dimensio)
```

```{r}
#| label: fig-ford
#| fig-cap: "Ford diagram of the Zuni dataset."
#| fig-width: 7
#| fig-height: 7
#| out-width: 100%
## Load the zuni dataset
## Data from Peeples and Schachner 2012
data("zuni", package = "folio")
## Plot the original matrix
tabula::plot_ford(zuni)
```

```{r}
#| label: seriate
## Get row and column permutations from CA coordinates along the first axis
(indices <- seriate_average(zuni, margin = c(1, 2)))
```

`seriate_average()` returns the full results of the correspondence analysis. You can use [`dimensio`](https://packages.tesselle.org/dimensio/) to explore these results:

```{r}
#| label: fig-ca
#| fig-cap: "Row principal biplot of the CA results."
#| fig-width: 7
#| fig-height: 7
#| out-width: 100%
## Plot CA row coordinates (get a nice arch effect!)
dimensio::biplot(indices, type = "rows")
```

If the results of the correspondence analysis are satisfactory, we can then permute the rows and columns of the initial data matrix:

```{r}
#| label: fig-permutate
#| fig-cap: "Ford diagram of the permuted dataset."
#| fig-width: 7
#| fig-height: 7
#| out-width: 100%
## Permute data matrix
permuted <- permute(zuni, indices)
## Plot permuted matrix
tabula::plot_ford(permuted)
```
30 changes: 30 additions & 0 deletions learn/seriation/packages.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@Manual{R-dimensio,
author = {Nicolas Frerebeau},
title = {{dimensio: Multivariate Data Analysis}},
year = {2023},
organization = {Université Bordeaux Montaigne},
address = {Pessac, France},
note = {R package version 0.4.1},
url = {https://packages.tesselle.org/dimensio/},
doi = {10.5281/zenodo.4478530}
}
@Manual{R-kairos,
author = {Nicolas Frerebeau},
title = {{kairos: Analysis of Chronological Patterns from Archaeological Count Data}},
year = {2023},
organization = {Université Bordeaux Montaigne},
address = {Pessac, France},
note = {R package version 2.0.1},
url = {https://packages.tesselle.org/kairos/},
doi = {10.5281/zenodo.5653896}
}
@Manual{R-tabula,
author = {Nicolas Frerebeau},
title = {{tabula: Analysis and Visualization of Archaeological Count Data}},
year = {2023},
organization = {Université Bordeaux Montaigne},
address = {Pessac, France},
note = {R package version 3.0.0},
url = {https://packages.tesselle.org/tabula/},
doi = {10.5281/zenodo.1489944}
}
93 changes: 93 additions & 0 deletions learn/seriation/references.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
@book{benzecri1973,
title = {L'Analyse des données : l'analyse des correspondances},
author = {Benzécri, Jean-Paul},
date = {1973},
volume = {2},
publisher = {{Dunod}},
location = {{Paris}},
isbn = {978-2-04-007225-4},
langid = {french}
}

@book{bertin1967,
title = {Sémiologie graphique - Les diagrammes, les réseaux, les cartes},
author = {Bertin, Jacques},
date = {1967},
publisher = {{Mouton}},
location = {{Paris}},
langid = {french}
}

@article{brainerd1951,
title = {The {{Place}} of {{Chronological Ordering}} in {{Archaeological Analysis}}},
author = {Brainerd, George W.},
date = {1951-04},
journaltitle = {American Antiquity},
volume = {16},
number = {04},
pages = {301--313},
issn = {0002-7316},
doi = {10.2307/276979},
langid = {english}
}

@article{dunnell1970,
title = {Seriation {{Method}} and {{Its Evaluation}}},
author = {Dunnell, Robert C.},
date = {1970-07},
journaltitle = {American Antiquity},
volume = {35},
number = {03},
pages = {305--319},
issn = {0002-7316},
doi = {10.2307/278341},
langid = {english}
}

@article{kendall1969,
title = {Some {{Problems}} and {{Methods}} in {{Statistical Archaeology}}},
author = {Kendall, David G.},
date = {1969},
journaltitle = {World Archaeology},
volume = {1},
number = {1},
pages = {68--76},
langid = {english}
}

@article{kendall1969a,
title = {Incidence Matrices, Interval Graphs and Seriation in Archaeology},
author = {Kendall, David G.},
date = {1969},
journaltitle = {Pacific Journal of Archaeology},
volume = {28},
number = {3},
pages = {565--570},
langid = {english}
}

@article{petrie1899,
title = {Sequences in {{Prehistoric Remains}}},
author = {Petrie, W. M. Flinders},
date = {1899},
journaltitle = {Journal of the Anthropological Institute of Great Britain and Ireland},
volume = {29},
number = {3/4},
pages = {295--301},
issn = {09595295},
doi = {10.2307/2843012},
langid = {english}
}

@article{robinson1951,
title = {A {{Method}} for {{Chronologically Ordering Archaeological Deposits}}},
author = {Robinson, W. S.},
date = {1951-04},
journaltitle = {American Antiquity},
volume = {16},
number = {04},
pages = {293--301},
issn = {0002-7316},
doi = {10.2307/276978},
langid = {english}
}

0 comments on commit 0e2950d

Please sign in to comment.