sphTrans | R Documentation |
Spherifying transform Compute a transformation that spherifies a certain data set
sphTrans(Y, ...)
## Default S3 method:
sphTrans(Y, weights = NULL, p = 1:ncol(Y), ...)
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) |
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.
default
: Spherifying transform
K. Gerald van den Boogaart, Raimon Tolosana-Delgado
ana, anaBackward, sphTrans
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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.