Learn R Programming

kairos (version 2.2.0)

seriate_rank: Reciprocal Ranking Seriation

Description

Reciprocal Ranking Seriation

Usage

seriate_rank(object, ...)

# S4 method for data.frame seriate_rank(object, EPPM = FALSE, margin = c(1, 2), stop = 100)

# S4 method for matrix seriate_rank(object, EPPM = FALSE, margin = c(1, 2), stop = 100)

Value

A RankPermutationOrder object.

Arguments

object

A \(m \times p\) numeric matrix or data.frame of count data (absolute frequencies giving the number of individuals for each category, i.e. a contingency table). A data.frame will be coerced to a numeric matrix via data.matrix().

...

Currently not used.

EPPM

A logical scalar: should the seriation be computed on EPPM instead of raw data?

margin

A numeric vector giving the subscripts which the rearrangement will be applied over: 1 indicates rows, 2 indicates columns, c(1, 2) indicates rows then columns, c(2, 1) indicates columns then rows.

stop

An integer giving the stopping rule (i.e. maximum number of iterations) to avoid infinite loop.

Author

N. Frerebeau

Details

This procedure iteratively rearrange rows and/or columns according to their weighted rank in the data matrix until convergence.

Note that this procedure could enter into an infinite loop. If no convergence is reached before the maximum number of iterations, it stops with a warning.

References

Desachy, B. (2004). Le sériographe EPPM: un outil informatisé de sériation graphique pour tableaux de comptages. Revue archéologique de Picardie, 3(1), 39-56. tools:::Rd_expr_doi("10.3406/pica.2004.2396").

Dunnell, R. C. (1970). Seriation Method and Its Evaluation. American Antiquity, 35(03), 305-319. tools:::Rd_expr_doi("10.2307/278341").

Ihm, P. (2005). A Contribution to the History of Seriation in Archaeology. In C. Weihs & W. Gaul (Eds.), Classification: The Ubiquitous Challenge. Berlin Heidelberg: Springer, p. 307-316. tools:::Rd_expr_doi("10.1007/3-540-28084-7_34").

See Also

Other seriation methods: as_seriation(), assess(), order(), permute(), refine(), seriate_average()

Examples

Run this code
## Replicates Desachy 2004 results
data("compiegne", package = "folio")

## Get seriation order for columns on EPPM using the reciprocal averaging method
## Expected column order: N, A, C, K, P, L, B, E, I, M, D, G, O, J, F, H
(indices <- seriate_rank(compiegne, EPPM = TRUE, margin = 2))

## Get permutation order
order_rows(indices)
order_columns(indices)

## Permute columns
(new <- permute(compiegne, indices))

Run the code above in your browser using DataLab