Learn R Programming

analogue (version 0.17-7)

minDC: Extract minimum dissimilarities

Description

Minimum dissimilarity is a useful indicator of reliability of reconstructions performed via MAT and other methods, and for analogue matching. Minimum dissimilarity for a sample is the smallest dissimilarity between it and the training set samples.

Usage

minDC(x, ...)

# S3 method for default minDC(x, ...)

# S3 method for predict.mat minDC(x, ...)

# S3 method for analog minDC(x, probs = c(0.01, 0.02, 0.05, 0.1), ...)

# S3 method for wa minDC(x, y, method = c("euclidean", "SQeuclidean", "chord", "SQchord", "bray", "chi.square", "SQchi.square", "information", "chi.distance", "manhattan", "kendall", "gower", "alt.gower", "mixed"), percent = FALSE, probs = c(0.01, 0.025, 0.05, 0.1), ...)

Value

minDC returns an object of class "minDC".

An object of class minDC is a list with some or all of the following components:

minDC

numeric; vector of minimum dissimilarities.

method

character; the dissimilarity coefficient used.

quantiles

numeric; named vector of probability quantiles for distribution of dissimilarities of modern training set.

Arguments

x

an object of class "predict.mat", "analog" or a object with a component named "minDC".

probs

numeric; vector of probabilities with values in [0,1].

y

an optional matrix-like object containing fossil samples for which the minimum dissimilarities to training samples are to be calculated.

method

character; which choice of dissimilarity coefficient to use. One of the listed options. See distance.

percent

logical; Are the data percentages? If TRUE, the data (x and y) will be divided by 100 to convert them to the proportions expected by distance.

...

other arguments to be passed to other methods. Currently ignored.

Author

Gavin L. Simpson

See Also

predict.mat, and plot.minDC for a plotting method.

Examples

Run this code
## Imbrie and Kipp example
## load the example data
data(ImbrieKipp)
data(SumSST)
data(V12.122)

## merge training and test set on columns
dat <- join(ImbrieKipp, V12.122, verbose = TRUE)

## extract the merged data sets and convert to proportions
ImbrieKipp <- dat[[1]] / 100
V12.122 <- dat[[2]] / 100

## fit the MAT model using the squared chord distance measure
ik.mat <- mat(ImbrieKipp, SumSST, method = "SQchord")
ik.mat

## reconstruct for the V12-122 core data
v12.mat <- predict(ik.mat, V12.122)

## extract the minimum DC values
v12.mdc <- minDC(v12.mat)
v12.mdc

## draw a plot of minimum DC by time
plot(v12.mdc, use.labels = TRUE, xlab = "Depth (cm.)")

Run the code above in your browser using DataLab