Description Usage Arguments Details Value Author(s) See Also Examples
Inverse of PhILR Transform
1 2 |
df.ilrp |
transformed data to which the inverse transform will be applied |
tree |
(optional) to be used to build sbp and contrast matrix (see details) |
sbp |
(optional) the sbp (sequential binary partition) used to build a contrast matrix (see details) |
V |
(optional) the contrast matrix (see details) |
part.weights |
weightings for parts, can be a named vector with names
corresponding to |
ilr.weights |
weightings for the ILR coordiantes can be a named vector with names
corresponding to names of internal nodes of |
This is a utility function for calculating the inverse of the
philr
transform. Note that at least one of the following
parameters must be specified (tree
, sbp
, or V
).
a matrix of compositions (rows are samples, columns are parts), function removes the effects of ilr weights, part weights, and unshifts the composition.
Justin Silverman
1 2 3 4 5 6 7 8 | tr <- named_rtree(5)
df <- t(rmultinom(10,100,c(.1,.6,.2,.3,.2))) + 0.65 # add a small pseudocount
colnames(df) <- tr$tip.label
d <- philr(df, tr, part.weights='enorm.x.gm.counts',
ilr.weights='blw.sqrt', return.all=TRUE)
d.inverted <- philrInv(d$df.ilrp, V=d$V, part.weights = d$p,
ilr.weights = d$ilr.weights)
all.equal(miniclo(df), d.inverted)
|
Building Sequential Binary Partition from Tree...
Building Contrast Matrix...
Transforming the Data...
Calculating ILR Weights...
[1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.