alfa: The alpha-transformation

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

View source: R/alfa.R

Description

The α-transformation.

Usage

1
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 α=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 α=0 and h = FALSE, the result is the centred log-ratio transformation (Aitchison, 1986). In general, when h = FALSE the resulting transformation maps the data onto a singualr space. The sum of the vectors is equal to 0. Hence, from the simplex constraint the data go to another constraint.

Details

The α-transformation is applied to the compositional data.

Value

A list including:

sa

The logarithm of the Jacobian determinant of the α-transformation. This is used in the "profile" function to speed up the computations.

aff

The α-transformed data.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@yahoo.gr> and Giorgos Athineou <athineou@csd.uoc.gr>

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, alfa.profile, alfa.tune

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(MASS)
x <- as.matrix(fgl[, 2:9])
x <- x / rowSums(x)
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)

Compositional documentation built on July 27, 2017, 1:02 a.m.

Search within the Compositional package
Search all R packages, documentation and source code