weighted_clr: Weighted CLR Transform

Description Usage Arguments Details Value Author(s) References Examples

Description

Weighted CLR Transform

Usage

1
2
3
clrp(y, p)

clrpInv(y.star)

Arguments

y

shifted data matrix (e.g., output of shiftp)

p

weights (should not be closed)

y.star

a data matrix that represents data transformed by clrp

Details

Note that this function will close the dataset y to 1.

Inverting clrp transform should be followed by shiftpInv to return to unshifted original compositoin (see examples).

Value

matrix

Author(s)

Justin Silverman

References

J. J. Egozcue, V. Pawlowsky-Glahn (2016) Changing the Reference Measure in the Simplex and its Weighting Effects. Austrian Journal of Statistics 45(4):25-44

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
p <- seq(.1,1,by=.2)
c <- t(rmultinom(10,100,c(.1,.6,.2,.3,.2))) + 0.65   # add a small pseudocount
x <- miniclo(c)
y <- shiftp(x, p)
y.star <- clrp(y, p)
y.star

# Untransform data (note use of shiftp and miniclo to return to x)
y.closed <- clrpInv(y.star)
all.equal(miniclo(shiftpInv(y.closed, p)), x)

philr documentation built on Nov. 8, 2020, 5:38 p.m.