Learn R Programming

LorenzRegression (version 2.2.0)

PLR.fit: Penalized Lorenz Regression Fit Function

Description

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.

Usage

PLR.fit(y, x, weights = NULL, penalty, grid.arg, grid.value, lambda.list, ...)

Value

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.

Arguments

y

A numeric vector representing the response variable.

x

A numeric matrix of covariates.

weights

An optional numeric vector of sample weights. Default is NULL.

penalty

A character string specifying the penalty type. Possible values are "LASSO" and "SCAD".

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 grid.arg. If NULL, no grid is constructed.

lambda.list

An optional list specifying penalty values (\(\lambda\)) to be used for each grid value.

...

Additional arguments passed to Lorenz.FABS or Lorenz.SCADFABS, depending on the penalty type.

Details

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.

See Also

Lorenz.FABS, Lorenz.SCADFABS, Lorenz.boot, Lorenz.Reg

Examples

Run this code
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)

Run the code above in your browser using DataLab