This is the Euclidean (or Manhattan) distance after the
aitdist(x, a, type = "euclidean", square = FALSE)
aitdista(xnew, x, a, type = "euclidean", square = FALSE)
A matrix or a vector with new compositional data.
A matrix with the compositional data.
The value of the power transformation, it has to be between -1 and 1.
If zero values are present it has to be greater than 0. If
Which type distance do you want to calculate after the
In the case of the Euclidean distance, you can choose to return the squared distance by setting this TRUE.
For "alfadist" a matrix including the pairwise distances of all observations or the distances between xnew and x. For "alfadista" a matrix including the pairwise distances of all observations or the distances between xnew and x.
The
Clarotto L., Allard D. and Menafoglio A. (2021). A new class of
# NOT RUN {
library(MASS)
x <- as.matrix(fgl[1:20, 2:9])
x <- x / rowSums(x)
aitdist(x, 0.1)
aitdist(x, 1)
# }
Run the code above in your browser using DataLab