# aitdist: The alpha-IT-distance In Compositional: Compositional Data Analysis

 The alpha-IT-distance R Documentation

## The α-IT-distance

### Description

This is the Euclidean (or Manhattan) distance after the α-IT-transformation has been applied.

### Usage

```aitdist(x, a, type = "euclidean", square = FALSE)
aitdista(xnew, x, a, type = "euclidean", square = FALSE)

```

### Arguments

 `xnew` A matrix or a vector with new compositional data. `x` A matrix with the compositional data. `a` 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 α=0, the isometric log-ratio transformation is applied. `type` Which type distance do you want to calculate after the α-transformation, "euclidean", or "manhattan". `square` In the case of the Euclidean distance, you can choose to return the squared distance by setting this TRUE.

### Details

The α-IT-transformation is applied to the compositional data first and then the Euclidean or the Manhattan distance is calculated.

### Value

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.

### Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

### References

Clarotto L., Allard D. and Menafoglio A. (2021). A new class of α-transformations for the spatial analysis of Compositional Data. https://arxiv.org/abs/2110.07967

```ait, alfadist, alfa ```

### Examples

```library(MASS)
x <- as.matrix(fgl[1:20, 2:9])
x <- x / rowSums(x)
aitdist(x, 0.1)
aitdist(x, 1)
```

Compositional documentation built on July 8, 2022, 1:06 a.m.