Learn R Programming

Compositional (version 5.5)

The folded power transformation: The folded power transformation

Description

The folded power transformation.

Usage

fp(x, lambda)

Arguments

x

A matrix with the compositional data. Zero values are allowed.

lambda

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 \(\lambda=0\) the additive log-ratio transformation (alr) is applied. If zero values are present \(\lambda\) must be strictly positive.

Value

A matrix with the transformed data.

Details

The folded power transformation is applied to the compositional data.

References

Atkinson, A. C. (1985). Plots, transformations and regression; an introduction to graphical methods of diagnostic regression analysis Oxford University Press.

See Also

alr, bc, green, alfa

Examples

Run this code
# NOT RUN {
library(MASS)
x <- as.matrix(fgl[, 2:9])
x <- x / rowSums(x)
y1 <- fp(x, 0.2)
y2 <- fp(x, 0)
rbind( colMeans(y1), colMeans(y2) )
rowSums(y1)
rowSums(y2)
# }

Run the code above in your browser using DataLab