similarity.subjects: Similarity matrix for subjects

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/similarity.subjects.R

Description

Get similarity matrix for subjects (observations) based on variables of mixed data types

Usage

1

Arguments

data

data frame

weights

optional vector of weights for variables in data

Details

Distances d.ij between subjects are calculated based on Gower's general similarity coefficient with an extension of Podani for ordinal variables, see gowdis. In the case that all variables are quantitative, Euclidean distances are used. Similarities s.ij are calculated as s.ij = 1 - d.ij.

Value

Matrix of similarity values for each pair of subjects

Author(s)

Manuela Hummel

References

Gower J (1971). A general coefficient of similarity and some of its properties. Biometrics, 27:857-871.

Podani J (1999). Extending Gower's general coefficient of similarity to ordinal characters. Taxon, 48(2):331-340.

See Also

dendro.subjects, dist.subjects, mix.heatmap

Examples

1
2
3
4
5
6
7
data(mixdata)

S <- similarity.subjects(mixdata)

## example with weights
w <- rep(1:2, each=5)
S <- similarity.subjects(mixdata, weights=w)

CluMix documentation built on Jan. 21, 2019, 5:05 p.m.