Simplicial constrained median regression for compositional responses and predictors model {Compositional} | R Documentation |
Simplicial constrained median regression for compositional responses and predictors
Description
Simplicial constrained median regression for compositional responses and predictors.
Usage
scrq(y, x, xnew = NULL)
Arguments
y |
A matrix with the compositional data (dependent variable). Zero values are allowed. |
x |
A matrix with the compositional predictors. Zero values are allowed. |
xnew |
If you have new data use it, otherwise leave it NULL. |
Details
The function performs median regression where the beta coefficients are constained to be positive and sum to 1.
Value
A list including:
mlad |
The mean absolute deviation. |
be |
The beta coefficients. |
est |
The fitted of xnew if xnew is not NULL. |
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
References
Tsagris. M. (2024). Constrained least squares simplicial-simplicial regression. https://arxiv.org/pdf/2403.19835.pdf
See Also
Examples
library(MASS)
set.seed(1234)
y <- rdiri(214, runif(4, 1, 3))
x <- as.matrix(fgl[, 2:9])
x <- x / rowSums(x)
mod <- scrq(y, x)
mod
[Package Compositional version 6.9 Index]