sphTrans: Spherifying transform Compute a transformation that...

View source: R/Anamorphosis.R

sphTransR Documentation

Spherifying transform Compute a transformation that spherifies a certain data set

Description

Spherifying transform Compute a transformation that spherifies a certain data set

Usage

sphTrans(Y, ...)

## Default S3 method:
sphTrans(Y, weights = NULL, p = 1:ncol(Y), ...)

Arguments

Y

data set defining the spherifization

...

extra arguments for generic functionality

weights

weights to incorporate in the compuations, length=nrow(Y)

p

dimensions to be considered structural (useful for filtering noise)

Value

a function with arguments (x, inv=FALSE), where x will be the data to apply the transformation to, and inv=FALSE will indicate if the direct or the inverse transformation is desired. This function applied to the same data returns a translated, rotated and scaled, so that the new scores are centered, have variance 1, and no correlation.

Methods (by class)

  • default: Spherifying transform

Author(s)

K. Gerald van den Boogaart, Raimon Tolosana-Delgado

See Also

ana, anaBackward, sphTrans

Examples

library(compositions)
data("jura", package="gstat")
Y = acomp(jura.pred[,c(10,12,13)])
oldpar = par(mfrow = c(1,1))
plot(Y)
sph = sphTrans(Y)
class(sph)
z = sph(Y)
plot(z)
par(oldpar)
cor(cbind(z, ilr(Y)))
colMeans(cbind(z, ilr(Y)))

gmGeostats documentation built on April 18, 2023, 5:08 p.m.