| Type: | Package |
| Title: | Cauchy Regression |
| Version: | 1.0 |
| Date: | 2026-09-03 |
| Author: | Michail Tsagris [aut, cre] |
| Maintainer: | Michail Tsagris <mtsagris@uoc.gr> |
| Depends: | R (≥ 4.0) |
| Imports: | Compositional, glmnet, Rfast, stats |
| Description: | Cauchy regression modelling and LASSO to perform variable selection are included in this package. Cross-validation is performed to choose the optimal value of the lambda parameter. LASSO is based on the IRLS algorithm. A relevant paper is <doi:10.1109/ICIST.2014.6920341>. |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Packaged: | 2026-09-03 20:45:39 UTC; mtsag |
| Repository: | CRAN |
| Date/Publication: | 2026-09-12 15:00:07 UTC |
Cauchy Regression
Description
Cauchy regression modelling and LASSO to perform variable selection are included in this package. Cross-validation is performed to choose the optimal value of the lambda parameter. LASSO is based on the IRLS algorithm.
Details
| Package: | cauchyreg |
| Type: | Package |
| Version: | 1.0 |
| Date: | 2026-09-03 |
Maintainers
Michail Tsagris <mtsagris@uoc.gr>.
Author(s)
Michail Tsagris mtsagris@uoc.gr
Cauchy regression
Description
Cauchy regression
Usage
cauchy.reg(y, x, tol = 1e-07, maxit = 100, xnew = NULL)
Arguments
y |
A numerical vector with the response values. |
x |
A numerical matrix or a data.frame with predictor variables. |
tol |
The tolerance value to terminate the IRLS algorithm. |
maxit |
The maximum number of iterations to perform the IRLS algorithm. |
xnew |
If you have new values for the predictors put them here. |
Details
Cauchy regression is performed.
Value
A list including:
be |
The regression coefficients. |
sigma |
The scale parameter. |
iters |
The number of iterations the Newton-Raphson required. |
loglik |
The log-likelihood value. |
est |
The estimated values if xnew is not NULL, otherwise this is NULL. |
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
References
Liu T. and Tao D. (2014, April). On the robustness and generalization of Cauchy regression. In 2014 4th IEEE International Conference on Information Science and Technology (pp. 100-105). IEEE.
See Also
Examples
y <- iris[, 1]
x <- as.matrix(iris[, 2:4])
mod <- cauchy.reg(y, x)
LASSO Cauchy regression
Description
LASSO Cauchy regression
Usage
cauchy.reg.lasso(y, x, lambda = NULL, nlambda = 100,
tol = 1e-07, maxit = 100, xnew = NULL)
Arguments
y |
A numerical vector with the response values. |
x |
A numerical matrix with predictor variables. |
lambda |
The user may supply their own lambda values. If NULL, the function computes the grid of values. |
nlambda |
If the user does not provide a vector of lambda values they may specify how many shall the function use. |
tol |
The tolerance value to terminate the IRLS algorithm. |
maxit |
The maximum number of iterations to perform the IRLS algorithm. |
xnew |
If you have new values for the predictors put them here. |
Details
LASSO is implemented using a path of lambda values.
Value
A list including:
B |
A matrix with the stimated coefficients for each value of lambda. The rows correspond to the predictors and the columns to the lambda values. |
est |
A matrix with the estimated response values if xnew is not NULL. Each column corresponds to a different value of lambda. |
lambda |
The lambda values used. |
norm |
The sum of the absolute values of the coefficients for each value of lambda. |
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
See Also
Examples
y <- iris[, 1]
x <- as.matrix(iris[, 2:4])
mod <- cauchy.reg.lasso(y, x)
Many simple Cauchy regressions
Description
Many simple Cauchy regressions
Usage
cauchy.regs(y, x, tol = 1e-07, maxit = 100)
Arguments
y |
A numerical vector with the response values. |
x |
A numerical matrix with predictor variables. |
tol |
The tolerance value to terminate the IRLS algorithm. |
maxit |
The maximum number of iterations to perform the IRLS algorithm. |
Details
The function performs many simply Cauchy regressions, one for each column of x.
Value
A matrix with 4 columns, the constant terms, the slope coefficients, the scale parameters and the log-likelihood values. Each row corresponds to a column in x.
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
References
Liu T. and Tao D. (2014, April). On the robustness and generalization of Cauchy regression. In 2014 4th IEEE International Conference on Information Science and Technology (pp. 100-105). IEEE.
See Also
Examples
y <- iris[, 1]
x <- as.matrix(iris[, 2:4])
mod <- cauchy.regs(y, x)
LASSO Cauchy regression
Description
Cross-validation for the LASSO Cauchy regression
Usage
cv.cauchyreglasso(y, x, lambda = NULL, nlambda = 100, tol = 1e-07, maxit = 100,
folds = NULL, nfolds = 10, seed = NULL)
Arguments
y |
A numerical vector with the response values. |
x |
A numerical matrix with predictor variables. |
lambda |
The user may supply their own lambda values. If NULL, the function computes the grid of values. |
nlambda |
If the user does not provide a vector of lambda values they may specify how many shall the function use. |
tol |
The tolerance value to terminate the IRLS algorithm. |
maxit |
The maximum number of iterations to perform the IRLS algorithm. |
folds |
If you have the list with the folds supply it here. You can also leave it NULL and the function will create folds. |
nfolds |
If the user did not pass the folds argument, then they need to specify the number of folds to produce. |
seed |
You can specify your own seed number here or leave it NULL. |
Details
The function performs K-fold cross-validation to select the optimal value of lambda.
Value
A matrix with two columns, the lambda values and their corresponding MSE values.
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
See Also
Examples
y <- iris[, 1]
x <- as.matrix(iris[, 2:4])