seriate_rank: Reciprocal Ranking Seriation

seriate_rankR Documentation

Reciprocal Ranking Seriation

Description

Reciprocal Ranking Seriation

Usage

seriate_rank(object, ...)

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

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

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.

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.

Value

A RankPermutationOrder object.

Author(s)

N. Frerebeau

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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3406/pica.2004.2396")}.

Dunnell, R. C. (1970). Seriation Method and Its Evaluation. American Antiquity, 35(03), 305-319. \Sexpr[results=rd]{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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/3-540-28084-7_34")}.

See Also

Other seriation methods: permute(), seriate_average(), seriate_refine()

Examples

## 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
get_order(indices, 1) # rows
get_order(indices, 2) # columns

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

## See the vignette
## Not run: 
utils::vignette("seriation")

## End(Not run)

kairos documentation built on Nov. 27, 2023, 5:08 p.m.