Learn R Programming

Compositional (version 1.0)

alfa: The $\alpha$-transformation

Description

The $\alpha$-transformation.

Usage

alfa(x, a, h = TRUE)

Arguments

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 $\alpha=0$ the isometric log-ratio transformation is applied.
h
A boolean variable. If is TRUE (default value) the multiplication with the Helmert sub-matrix will take place. When $\alpha=0$ and h = FALSE, the result is the centred log-ratio transformation (Aitchison, 1986). In general, when h = FALSE the result

Value

  • A list including:
  • saThe logarithm of the Jacobian determinant of the $\alpha$-transformation. This is used in the "profile" function to speed up the computations.
  • affThe $\alpha$-transformed data.

Details

The $\alpha$-transformation is applied to the compositional data.

References

Tsagris M.T., Preston S. and Wood A.T.A. (2011). A data-based power transformation for compositional data. In Proceedings of the 4th Compositional Data Analysis Workshop, Girona, Spain. http://arxiv.org/pdf/1106.1451.pdf Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.

See Also

alfainv, profile

Examples

Run this code
library(MASS)
x <- fgl[, 2:9]
y1 <- alfa(x, 0.2)$aff
y2 <- alfa(x, 1)$aff
rbind( colMeans(y1), colMeans(y2) )
y3 <- alfa(x, 0.2)$aff
dim(y1)  ;  dim(y3)
rowSums(y1)
rowSums(y3)

Run the code above in your browser using DataLab