Lorenz.Reg {LorenzRegression} | R Documentation |
Fits a Lorenz regression
Description
Lorenz.Reg
fits the Lorenz regression of a response with respect to several covariates.
Usage
Lorenz.Reg(
formula,
data,
weights,
na.action,
penalty = c("none", "SCAD", "LASSO"),
grid.arg = c("h", "SCAD.nfwd", "eps", "kernel", "a", "gamma"),
grid.value = NULL,
lambda.list = NULL,
...
)
Arguments
formula |
An object of class " |
data |
An optional data frame, list or environment (or object coercible by |
weights |
An optional vector of sample weights to be used in the fitting process. Should be |
na.action |
A function which indicates what should happen when the data contain |
penalty |
A character string specifying the type of penalty on the size of the estimated coefficients of the single-index model.
The default value is |
grid.arg |
A character string specifying the tuning parameter for which a grid is to be constructed, see Details. |
grid.value |
A numeric vector specifying the grid values, see Details. |
lambda.list |
Technical argument used inside the function |
... |
Additional parameters corresponding to arguments passed in |
Details
In the penalized case, the model is fitted for a grid of values of two parameters : the penalty parameter (lambda) and one tuning parameter specified by the arguments grid.arg
and grid.value
.
The possibles values for grid.arg
are tuning parameters of the functions Lorenz.FABS
and Lorenz.SCADFABS
: ''h''
(the default), ''SCAD.nfwd''
,''eps''
, ''kernel''
, ''a''
and ''gamma''
.
The values for the grid are specified with grid.value
. The default is NULL
, in which case no grid is constructed
Value
An object of class "LR"
for the non-penalized Lorenz regression or of class "PLR"
for a penalized Lorenz regression.
Several methods are available for both classes to facilitate model analysis.
Use summary.LR
or summary.PLR
to summarize the model fits.
Extract the coefficients of the single-index model using coef.LR
or coef.PLR
.
Measures of explained inequality (Gini coefficient and Lorenz-R^2
) are retrieved using ineqExplained.LR
or ineqExplained.PLR
.
Obtain predictions with predict.LR
or predict.PLR
, and fitted values with fitted.LR
or fitted.PLR
.
For visual representations of explained inequality, use autoplot.LR
and plot.LR
, or autoplot.PLR
and plot.PLR
.
The object of class "LR"
is a list containing the following components:
theta
The estimated vector of parameters.
Gi.expl
The estimated explained Gini coefficient.
LR2
The Lorenz-
R^2
of the regression.
The object of class "PLR"
is a list containing the following components:
path
A list where the different elements correspond to the values of the grid parameter. Each element is a matrix where the first line displays the vector of lambda values. The second and third lines display the evolution of the Lorenz-
R^2
and explained Gini coefficient along that vector. The next lines display the evolution of the BIC score. The remaining lines display the evolution of the estimated coefficients of the single-index model.lambda.idx
the index of the optimal lambda obtained by the BIC method
grid.idx
the index of the optimal grid parameter obtained by the BIC method.
In both cases, the list also provides technical information, such as the specified formula
, weights
and call
, as well as the design matrix x
and the response vector y
.
References
Heuchenne, C. and A. Jacquemain (2022). Inference for monotone single-index conditional means: A Lorenz regression approach. Computational Statistics & Data Analysis 167(C).
Jacquemain, A., C. Heuchenne, and E. Pircalabelu (2024). A penalised bootstrap estimation procedure for the explained Gini coefficient. Electronic Journal of Statistics 18(1) 247-300.
See Also
Lorenz.GA
, Lorenz.SCADFABS
, Lorenz.FABS
, Lorenz.boot
Examples
data(Data.Incomes)
set.seed(123)
data <- Data.Incomes[sample(1:200,50),]
# 1. Non-penalized regression
NPLR <- Lorenz.Reg(Income ~ ., data = Data.Incomes, penalty = "none", popSize = 20)
# 2. Penalized regression
PLR <- Lorenz.Reg(Income ~ ., data = Data.Incomes, penalty = "SCAD",
eps = 0.03, grid.arg = "h",
grid.value=c(0.5,1,2)*nrow(Data.Incomes)^(-1/5.5))
# Print method
print(NPLR)
print(PLR)
# Summary method
summary(NPLR)
summary(PLR)
# Coef method
coef(NPLR)
coef(PLR)
# ineqExplained method
ineqExplained(NPLR)
ineqExplained(PLR)
# Predict method
## One can predict either the index or the response
predict(NPLR,type="response")
predict(PLR,type="response")
# Plot method
plot(NPLR)
plot(PLR)
## Traceplot of the penalized coefficients
plot(PLR,type="traceplot")