gmGeostats (version 0.10-6)

sphTrans: 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, ...)

# S3 method for default 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

See Also

ana, anaBackward, sphTrans

Examples

Run this code
# NOT RUN {
library(compositions)
data("jura", package="gstat")
Y = acomp(jura.pred[,c(10,12,13)])
par(mfrow=c(1,1))
plot(Y)
sph = sphTrans(Y)
class(sph)
z = sph(Y)
plot(z)
cor(cbind(z, ilr(Y)))
colMeans(cbind(z, ilr(Y)))
# }

Run the code above in your browser using DataLab