Learn R Programming

nexus (version 0.3.0)

mix: Mixed-Mode Analysis

Description

Mixes chemical and petrographic matrices.

Usage

mix(x, y, ...)

# S4 method for matrix,matrix mix(x, y, lambda = 1, ...)

# S4 method for dist,dist mix(x, y, mu = 0.5)

Value

A stats::dist object.

Arguments

x

A matrix of chemical compositional data or a dissimilarity matrix for these chemical compositional data.

y

A matrix of coded mineralogical binary data or a dissimilarity matrix for these mineralogical data.

...

Extra parameters to be passed to cluster::daisy().

lambda

A length-one numeric vector giving a weighting factor.

mu

A length-one numeric vector that lies between 0 and 1 giving the mixing parameter.

Methods (by class)

  • mix(x = matrix, y = matrix): First approach of mixed-mode analysis.

  • mix(x = dist, y = dist): Second approach of mixed-mode analysis.

Author

N. Frerebeau

References

Baxter, M. J., Beardah, C. C., Papageorgiou, I., Cau, M. A., Day, P. M. & Kilikoglou, V. (2008). On Statistical Approaches to the Study of Ceramic Artefacts Using Geochemical and Petrographic Data. Archaeometry, 50(1): 142-157. tools:::Rd_expr_doi("10.1111/j.1475-4754.2007.00359.x").

Beardah, C. C., Baxter, M. J., Papageorgiou, I. & Cau, M. A. (2003). "Mixed-Mode" Approaches to the Grouping of Ceramic Artefacts Using S-Plus. In M. Doerr and A. Sarris, The Digital Heritage of Archaeology, p. 261-266. Athens: Archive of Monuments and Publications, Hellenic Ministry of Culture.

Gower, J. C. (1971). A general coefficient of similarity and some of its properties. Biometrics, 27(4):857-874. tools:::Rd_expr_doi("10.2307/2528823").

Examples

Run this code
# \donttest{
## Can Sora datasets
## Data from Cau (1999) and Cau et al. (2007)
path_chem <- system.file("extdata", "cansora_chemistry.csv", package = "nexus")
chemistry <- read.csv(path_chem, header = TRUE, row.names = 1)
path_petro <- system.file("extdata", "cansora_petrography.csv", package = "nexus")
petrography <- read.csv(path_petro, header = TRUE, row.names = 1)

## Prepare chemical data
major <- c("Fe2O3", "Al2O3", "MnO", "P2O5", "TiO2",
           "MgO", "CaO", "Na2O", "K2O", "SiO2")
chem <- chemistry[-1, major]

## Prepare petrographic data
petro <- petrography[-c(7, 8), -1]
petro <- cdt(petro) # Get the complete disjunctive table

## First approach
mix1 <- mix(as.matrix(chem), as.matrix(petro), lambda = 2)
mds1 <- stats::cmdscale(mix1) # Multi-Dimensional Scaling
plot(mds1)
# }

Run the code above in your browser using DataLab