Learn R Programming

analogue (version 0.10-0)

dissimilarities: Extract dissimilarity coefficients from models

Description

Extracts a vector of dissimilarity coefficients from an object for further analysis.

Usage

dissimilarities(object, ...)
dissim(object, ...)

## S3 method for class 'analog': dissimilarities(object, which = c("train", "analogs"), ...)

## S3 method for class 'mat': dissimilarities(object, \dots)

Arguments

object
an R object from which the dissimilarity values are to be extracted. Currently only for objects of class "analog".
which
character; which set of dissimilarities should be extracted. One of "train" or "analogs".
...
arguments passed to other methods.

Value

  • A vector of dissimilarities.

Details

The function can be called using the much shorter name "dissim".

See Also

analog, plot.dissimilarities

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

## analog matching between SWAPImbrie & Kipp and V12.122 core
ik.analog <- analog(ImbrieKipp, V12.122, method = "chord")
ik.analog
summary(ik.analog)

## compare training set dissimilarities with normals
## and derive cut-offs
ik.dij <- dissim(ik.analog)
plot(ik.dij)

Run the code above in your browser using DataLab