View source: R/scls.indeptest.R
Permutation linear independence test in the SCLS model | R Documentation |
Permutation linear independence test in the SCLS model.
scls.indeptest(y, x, R = 999)
y |
A matrix with the compositional data (dependent variable). Zero values are allowed. |
x |
A matrix with the compositional predictors. Zero values are allowed. |
R |
The number of permutations to perform. |
Permutation independence test in the constrained linear least squares for compositional
responses and predictors is performed. The observed test statistic is the MSE computed by scls
. Then, the rows of X are permuted B times and each time the constrained OLS is performed and the MSE is computed. The p-value is then computed in the usual way.
The p-value for the test of independence between Y and X.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Tsagris. M. (2024). Constrained least squares simplicial-simplicial regression. https://arxiv.org/pdf/2403.19835.pdf
scls, scls2, tflr, scls.betest
library(MASS)
set.seed(1234)
y <- rdiri(214, runif(4, 1, 3))
x <- as.matrix(fgl[, 2:9])
x <- x / rowSums(x)
scls.indeptest(y, x, R = 99)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.