Learn R Programming

LorenzRegression (version 2.2.0)

diagnostic.PLR: Diagnostic for the penalized Lorenz regression

Description

diagnostic.PLR provides diagnostic information for an object of class "PLR" It restricts the path of the PLR to pairs of parameters (grid, lambda) that satisfy a threshold criterion.

Usage

diagnostic.PLR(
  object,
  tol = 0.99,
  method = c("union", "intersect", "BIC", "Boot", "CV")
)

Value

A list with two elements:

path

The restricted model path, containing only the values of the pair (grid, lambda) that satisfy the threshold criterion.

best

The best model. It is obtained by considering the pair (grid, lambda) in the restricted path that leads to the sparsest model. If several pairs yield the same level of sparsity, we consider the pair that maximizes the minimum score across all selection methods available.

Arguments

object

An object of class "PLR".

tol

A numeric threshold value used to restrict the PLR path. More specifically, we restrict to pairs (grid,lambda) whose normalized score exceeds tol. Default value is 0.95.

method

A character string specifying the method used to evaluate the scores. Options are "union", "intersect", "BIC", "Boot", and "CV".

"BIC"

The score is the BIC-score.

"Boot"

The score is the OOB-score.

"CV"

The score is the CV-score.

"union"

The threshold requirement must be met for at least one of the selection methods available.

"intersect"

The threshold requirement must be met for all selection methods available.

See Also

Lorenz.Reg

Examples

Run this code
# \dontshow{
utils::example(Lorenz.boot, echo = FALSE)
# }
# Continuing the  Lorenz.boot(.) example:
# The out-of-bag score seems to remain relatively flat when lambda is small enough
plot(PLR_boot, type = "diagnostic")
# What is the best pair (grid,penalty) parameter that is close enough to the highest OOB score
diagnostic.PLR(PLR_boot, tol = 0.99, method = "Boot")
# We want the solution to be close to the best, for both the BIC and OOB scores.
diagnostic.PLR(PLR_boot, method = "intersect")

Run the code above in your browser using DataLab