Cross-validation for the SCRQ model | R Documentation |
Cross-validation for the SCRQ model.
cv.scrq(y, x, nfolds = 10, folds = NULL, seed = NULL)
y |
A matrix with compositional response data. Zero values are allowed. |
x |
A matrix with compositional predictors. Zero values are allowed. |
nfolds |
The number of folds to be used. This is taken into consideration only if the folds argument is not supplied. |
folds |
If you have the list with the folds supply it here. You can also leave it NULL and it will create folds. |
seed |
You can specify your own seed number here or leave it NULL. |
The function performs k-fold cross-validation for the absolute regression where the beta coefficients are constained to be positive and sum to 1.
A list including:
runtime |
The runtime of the cross-validation procedure. |
kl |
The Kullback-Leibler divergences for all runs. |
js |
The Jensen-Shannon divergences for all runs. |
perf |
The average Kullback-Leibler divergence and average Jensen-Shannon divergence. |
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Tsagris. M. (2025). Constrained least squares simplicial-simplicial regression. Statistics and Computing, 35(27).
scrq, cv.scls, cv.tflr
y <- rdiri(500, runif(3, 1, 3))
x <- rdiri(500, runif(3, 1, 3))
mod <- cv.scrq(y, x, nfolds = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.