DistanciasContinuas: Distances among individuals with continuous data

Description Usage Arguments Details Value Author(s) References Examples

Description

Calculate distances a comong individuals for continuous data. It is possible introduce two matrices (x, y) and calculate the distancies between the two sets of rows or introduce only one matrix (x) and calculate the distancies between its rows.

Usage

1
DistanciasContinuas(x, y = NULL, coef = "Pythagorean", r = 1)

Arguments

x

A matrix containing continuous data

y

A matrix containing continuous data different from x. By default it is null.

coef

Coefficient to calculate continuous distances. By default we use Pythagorean distances.

r

For Minkowski distances. By default it is 1.

Details

The function calculates distances among individuals for matrices of continuous data using different distance measures. If two matrices are provided, distances among individuals, one from the first matrix and another from the second, are calculated. If only one matrix is provided, interdistances among its rows are calculated.

The following coefficients are calculated

1.- Pythagorean = sqrt(sum((y[i, ] - x[j, ])^2)/p)

2.- Taxonomic = sqrt(sum(((y[i,]-x[j,])^2)/r^2)/p)

3.- City = sum(abs(y[i,]-x[j,])/r)/p

4.- Minkowski = (sum((abs(y[i,]-x[j,])/r)^t)/p)^(1/t)

5.- Divergence = sqrt(sum((y[i,]-x[j,])^2/(y[i,]+x[j,])^2)/p)

6.- dif_sum = sum(abs(y[i,]-x[j,])/abs(y[i,]+x[j,]))/p

7.- Camberra = sum(abs(y[i,]-x[j,])/(abs(y[i,])+abs(x[j,])))

8.- Bray_Curtis = sum(abs(y[i,]-x[j,]))/sum(y[i,]+x[j,])

9.- Soergel = sum(abs(y[i,]-x[j,]))/sum(apply(rbind(y[i,],x[j,]),2,max))

10.- Ware_hedges = sum(abs(y[i,]-x[j,]))/sum(apply(rbind(y[i,],x[j,]),2,max))

Value

A list with:

Data

A matrix with the initial data (x matrix).

SupData

A matrix with the supplementary data (y matrix).

D

The matrix of distances

Coefficient

The coefficient used.

Author(s)

Laura Vicente-González and José Luis Vicente-Villardón

References

Gower, J. C. (2006) Similarity dissimilarity and Distance, measures of. Encyclopedia of Statistical Sciences. 2nd. ed. Volume 12. Wiley

Examples

1
2
3
data(wine)
X = wine[,4:21]
D=DistContinuous(X)

laura20vg/permanova documentation built on Dec. 16, 2019, 10 p.m.