View source: R/tflr.indeptest.R
| Permutation linear independence test in the TFLR model | R Documentation |
Permutation linear independence test in the TFLR model.
tflr.indeptest(y, x, tol = 1e-6, R = 999, ncores = 1)
y |
A matrix with the compositional data (dependent variable). Zero values are allowed. |
x |
A matrix with the compositional predictors. Zero values are in general allowed, but there can be cases when these are problematic. |
tol |
The tolerance value to terminate the EM algorithm. |
R |
The number of permutations to perform. |
ncores |
The number of cores to use in case you are interested for parallel computations. |
Permutation independence test in the constrained linear least squares for compositional
responses and predictors is performed. The observed test statistic is the Kullback-Leibler divergence computed by tflr.irls because it is faster than tflr. Then, the rows of X are permuted B times and each time the TFLR is performed and the Kullback-Leibler is computed. The p-value is then computed in the usual way.
The p-value for the test of linear independence between the simplicial response Y and the simplicial predictor X.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Fiksel J., Zeger S. and Datta A. (2022). A transformation-free linear regression for compositional outcomes and predictors. Biometrics, 78(3): 974–987.
Tsagris. M. (2025). Constrained least squares simplicial-simplicial regression. Statistics and Computing, 35(27).
Tsagris M. and Alzeley O. (2026). Scalable approximation of the transformation–free linear simplicial–simplicial regression via constrained iterative reweighted least squares. Statistical Analysis and Data Mining, 19(4):e70100.
tflr, scls, tflr.betest
library(MASS)
set.seed(1234)
y <- rdiri(214, runif(4, 1, 3))
x <- as.matrix(fgl[, 2:9])
x <- x / rowSums(x)
tflr.indeptest(y, x, R = 9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.