Learn R Programming

LorenzRegression (version 2.2.0)

Lorenz.boot: Bootstrap for the (penalized) Lorenz regression

Description

Lorenz.boot performs bootstrap estimation for the vector of coefficients of the single-index model, the explained Gini coefficient, and the Lorenz-\(R^2\). In the penalized case, it also provides a selection method.

Usage

Lorenz.boot(
  object,
  R,
  boot_out_only = FALSE,
  store_LC = FALSE,
  show_progress = TRUE,
  ...
)

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 can be 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:

theta

The estimated vector of parameters. In the penalized case, this 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, this is a vector, where each element corresponds to a different selection method.

LR2

The Lorenz-\(R^2\) of the regression. In the penalized case, this is a vector, where each element corresponds to a different selection method.

boot_out

An object of class "boot" containing the raw bootstrap output.

For the penalized Lorenz regression, the returned object includes:

path

See Lorenz.Reg for the original path. The out-of-bag (OOB) score is added.

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 for selection.

Arguments

object

An object of class "LR" or "PLR", i.e., the output of a call to Lorenz.Reg.

R

An integer specifying the number of bootstrap replicates.

boot_out_only

A logical value indicating whether the function should return only the raw bootstrap output. This advanced feature can help save computation time in specific use cases. See Details.

store_LC

A logical determining whether explained Lorenz curves ordinates should be stored for each bootstrap sample. The default is FALSE since it might require storing large objects. If set to TRUE, ordinates are stored and plots of the explained Lorenz curve will include confidence bands, see plot.LR and plot.PLR.

show_progress

A logical. If TRUE (default), a progress bar is displayed during bootstrap computation. Set to FALSE to disable it. Progress is not shown when parallel computing is used.

...

Additional arguments passed to either the bootstrap function boot from the boot package or the underlying fit functions (Lorenz.GA, Lorenz.FABS, or Lorenz.SCADFABS). By default, the fit function uses the same parameters as in the original call to Lorenz.Reg, but these can be overridden by explicitly passing them in ....

Details

The function supports parallel computing in two ways:

  1. Using the built-in parallelization options of boot, which can be controlled via the ... arguments such as parallel, ncpus, and cl.

  2. Running multiple independent instances of Lorenz.boot(), each handling a subset of the bootstrap samples. In this case, setting boot_out_only = TRUE ensures that the function only returns the raw bootstrap results. These results can be merged using Lorenz.boot.combine.

Handling of additional arguments (...): The function allows for two types of arguments through ...:

  • Arguments for boot, used to control the bootstrap procedure.

  • Arguments for the underlying fit functions (Lorenz.GA, Lorenz.FABS, or Lorenz.SCADFABS). By default, the function retrieves these parameters from the original Lorenz.Reg call. However, users can override them by explicitly specifying new values in ....

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 penalized 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

Run this code
# \dontshow{
utils::example(Lorenz.Reg, echo = FALSE)
# }
# Non-penalized regression example (not run due to execution time)
if (FALSE) {
set.seed(123)
NPLR_boot <- Lorenz.boot(NPLR, R = 30)
confint(NPLR_boot) # Confidence intervals
summary(NPLR_boot)
}

# Penalized regression example:
set.seed(123)
PLR_boot <- Lorenz.boot(PLR, R = 20)
print(PLR_boot)
summary(PLR_boot)
coef(PLR_boot, pars.idx = "Boot")
predict(PLR_boot, pars.idx = "Boot")
plot(PLR_boot)
plot(PLR_boot, type = "diagnostic")

# Confidence intervals for different selection methods:
confint(PLR_boot, pars.idx = "BIC")  # Using BIC-selected tuning parameters
confint(PLR_boot, pars.idx = "Boot") # Using bootstrap-selected tuning parameters

Run the code above in your browser using DataLab