PLR.fit | R Documentation |
PLR.fit
fits a penalized Lorenz regression model using either the LASSO or SCAD penalty.
It serves as an internal wrapper that applies the fit function over a grid of tuning parameter values.
PLR.fit(y, x, weights = NULL, penalty, grid.arg, grid.value, lambda.list, ...)
y |
A numeric vector representing the response variable. |
x |
A numeric matrix of covariates. |
weights |
An optional numeric vector of sample weights. Default is |
penalty |
A character string specifying the penalty type. Possible values are |
grid.arg |
A character string specifying the tuning parameter for which a grid is constructed. |
grid.value |
A numeric vector specifying the grid values for |
lambda.list |
An optional list specifying penalty values ( |
... |
Additional arguments passed to |
The function applies either Lorenz.FABS
(for LASSO) or Lorenz.SCADFABS
(for SCAD) for each grid value.
The best model is selected based on the BIC score.
A list containing:
path
A list of matrices, where each element corresponds to a grid value. Each matrix contains lambda values, Lorenz-R^2
, explained Gini coefficients, BIC scores, and estimated coefficients.
grid.idx
The index of the optimal grid parameter selected by the BIC criterion.
lambda.idx
The index of the optimal \lambda
selected by the BIC criterion.
grid.value
The grid values used for grid.arg
.
lambda.list
A list of \lambda
values along the solution paths.
grid.arg
The tuning parameter for which the grid was constructed.
Lorenz.FABS
, Lorenz.SCADFABS
, Lorenz.boot
, Lorenz.Reg
data(Data.Incomes)
y <- Data.Incomes$Income
x <- as.matrix(Data.Incomes[,-c(1,2)])
PLR.fit(y, x, penalty = "SCAD", grid.arg = "eps", grid.value = c(0.2,0.5), lambda.list = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.