convert_coda_covariance.Rd
ilrvar
, clrvar
, and varmat
(variation matrix).
ilrvar2phi
calculates phi statistics (for proportionality)
from an ILR covariance matrix as described in Lovell (2015).
ilrvar2phi(Sigma, V) ilrvar2ilrvar(Sigma, V1, V2) ilrvar2clrvar(Sigma, V) clrvar2ilrvar(Sigma, V) clrvar2varmat(Sigma) ilrvar2varmat(Sigma, V) alrvar2clrvar(Sigma, d1) clrvar2alrvar(Sigma, d2) alrvar2alrvar(Sigma, d1, d2) alrvar2ilrvar(Sigma, d1, V2) ilrvar2alrvar(Sigma, V1, d2) alrvar2varmat(Sigma, d1)
Sigma | covariance matrix in specified transformed space |
---|---|
V | ILR contrast matrix (i.e., transformation matrix of ILR) |
V1 | ILR contrast matrix of basis Sigma is already in |
V2 | ILR contrast matrix of basis Sigma is desired in |
d1 | alr reference element Sigma is already expressed with respec to |
d2 | alr reference element Sigma is to be expressed with respect to |
matrix
x <- matrix(runif(30), 10, 3) x <- miniclo(x) x.ilr <- ilr(x) V <- create_default_ilr_base(3) Sigma <- cov(x.ilr) Sigma.clr <- ilrvar2clrvar(Sigma, V) clrvar2ilrvar(Sigma.clr, V)#> [,1] [,2] #> [1,] 1.621652 -1.330676 #> [2,] -1.330676 1.476700clrvar2varmat(Sigma.clr) ilrvar2varmat(Sigma, V) ilrvar2phi(Sigma,V)#> [,1] [,2] [,3] #> [1,] 0.000000 5.3306740 3.2433035 #> [2,] 5.330674 0.0000000 0.7210786 #> [3,] 3.243303 0.7210786 0.0000000