The transformation-free linear regression (TFLR) for compositional responses and predictors | R Documentation |
Transformation-free linear regression (TFLR) for compositional responses and predictors.
tflr(y, x, xnew = NULL)
y |
A matrix with the compositional response. 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. |
xnew |
If you have new data use it, otherwise leave it NULL. |
The transformation-free linear regression for compositional responses and predictors is implemented.
The function to be minized is -\sum_{i=1}^ny_i\log{y_i/(X_iB)}
. This is an efficient self implementation.
A list including:
kl |
The Kullback-Leibler divergence between the observed and the fitted response compositional data. |
be |
The beta coefficients. |
est |
The fitted values of xnew if xnew is not NULL. |
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. (2024). Constrained least squares simplicial-simplicial regression. https://arxiv.org/pdf/2403.19835.pdf
cv.tflr, scls kl.alfapcr
library(MASS)
y <- rdiri(214, runif(3, 1, 3))
x <- as.matrix(fgl[, 2:9])
x <- x / rowSums(x)
mod <- tflr(y, x, x)
mod
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.