Lorenz.boot {LorenzRegression} | R Documentation |
Bootstrap for the (penalized) Lorenz regression
Description
Lorenz.boot
determines bootstrap estimators for the vector of coefficients of the single-index model, explained Gini coefficient and Lorenz-R^2
. In the penalized case, it also provides a selection method.
Usage
Lorenz.boot(object, R, data.orig, boot_out_only = FALSE, ...)
Arguments
object |
An object with S3 class |
R |
An integer indicating the number of bootstrap replicates. |
data.orig |
A data frame corresponding to the original dataset, used in the |
boot_out_only |
A logical determining whether the function should return raw bootstrap results. This is an advanced feature that helps save computation time in certain instances. See Details. |
... |
Additional parameters corresponding to arguments passed to the function |
Details
Users that want to perform parallel computing have two options. The first and most obvious option is to use the facilities provided by the function boot
.
Indeed, arguments such as parallel
, ncpus
and cl
can be passed through the ...
.
Alternatively, users might want to run different instances of the function, each taking care of a portion of the bootstrap samples.
The argument boot_out_only
can be set to TRUE
to avoid unnecessary computations. If so, the returned object does not inherit from the class "LR_boot"
or "PLR_boot"
. The function simply returns the original object
, to which is added the boot_out
object.
If this second option is chosen, the instances have to be combined using the function Lorenz.boot.combine
.
Value
An object of class c("LR_boot", "LR")
or c("PLR_boot", "PLR")
, depending on whether a non-penalized or penalized regression was fitted.
The methods confint.LR
and confint.PLR
are used on objects of class "LR_boot"
or "PLR_boot"
to construct confidence intervals for the model parameters.
For the non-penalized Lorenz regression, the returned object is a list containing the following components:
theta
The estimated vector of parameters. In the penalized case, it is a matrix where each row corresponds to a different selection method (e.g., BIC, bootstrap, cross-validation).
Gi.expl
The estimated explained Gini coefficient. In the penalized case, it is a vector, where each element corresponds to a different selection method.
LR2
The Lorenz-
R^2
of the regression. In the penalized case, it is a vector, where each element corresponds to a different selection method.boot_out
An object of class
"boot"
containing the output of the bootstrap calculation.
For the penalized Lorenz regression, the returned object is a list containing the following components:
path
See
Lorenz.Reg
for the original path. To this path is added the out-of-bag (OOB) score.lambda.idx
A vector indicating the index of the optimal lambda obtained by each selection method.
grid.idx
A vector indicating the index of the optimal grid parameter obtained by each selection method.
Note: in the penalized case, the returned object may have additional classes such as "PLR_cv"
if cross-validation was performed and used as a selection method.
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.Reg
, Lorenz.GA
, Lorenz.SCADFABS
, Lorenz.FABS
, PLR.CV
, boot
Examples
# Continuing the Lorenz.Reg(.) example for the non-penalized regression:
# This example is not run as it takes > 5 seconds to run.
## Not run:
set.seed(123)
NPLR_boot <- Lorenz.boot(NPLR, R = 30, data.orig = data)
# The method confint() is available to objects of class "LR_boot".
confint(NPLR_boot)
summary(NPLR_boot)
## End(Not run)
# Continuing the Lorenz.Reg(.) example for the penalized regression:
set.seed(123)
PLR_boot <- Lorenz.boot(PLR, R = 30, data.orig = data)
# The object now inherits from the class "PLR_boot"
# Hence the methods (also) display the results obtained by bootstrap.
print(PLR_boot)
summary(PLR_boot)
coef(PLR_boot, pars.idx = "Boot")
predict(PLR_boot, pars.idx = "Boot")
plot(PLR_boot)
# Plot of the scores for each selection method depending on the grid and penalty parameters
plot(PLR_boot, type = "diagnostic")
# The method confint() is available to objects of class "PLR_boot".
confint(PLR_boot, pars.idx = "BIC") # Using the tuning parameters selected by BIC
confint(PLR_boot, pars.idx = "Boot") # Using the tuning parameters selected by bootstrap