predict
provides predictions for an object of class "PLR"
,
while fitted
extracts the fitted values.
# S3 method for PLR
predict(object, newdata, type = c("index", "response"), pars.idx = "BIC", ...)# S3 method for PLR
fitted(object, type = c("index", "response"), pars.idx = "BIC", ...)
A vector of predictions for predict
, or a vector of fitted values for fitted
.
An object of S3 class "PLR"
. The object might also have S3 classes "PLR_boot"
and/or "PLR_cv"
(both inherit from class "PLR"
)
An optional data frame in which to look for variables with which to predict. If omitted, the original data are used.
A character string indicating the type of prediction or fitted values. Possible values are "index"
(the default) and response.
In the first case, only the index of the single-index model is estimated.
In the second case, the "full" conditional expectation of the response given the covariates is estimated.
What grid and penalty parameters should be used for parameter selection. Either a character string specifying the selection method, where the possible values are:
"BIC"
(default) - Always available.
"Boot"
- Available if object
inherits from "PLR_boot"
.
"CV"
- Available if object
inherits from "PLR_cv"
.
Or a numeric vector of length 2, where the first element is the index of the grid parameter and the second is the index of the penalty parameter.
Additional arguments passed to the function Rearrangement.estimation
.
The type
argument distinguishes between two types of prediction outputs, aligned with the goals of the penalized Lorenz regression.
When type = "index"
, the function returns the estimated index \(X^\top \theta\) of the single-index model. This index captures the full ordering structure of the conditional expectation and is sufficient for computing the explained Gini coefficient, which is the primary focus of the method. Crucially, this estimation does not require recovering the full nonparametric link function.
When type = "response"
, the function estimates the full conditional expectation \(\mathbb{E}[Y | X]\) by performing a second-stage estimation of the link function via Rearrangement.estimation
. This is useful if fitted or predicted response values are needed for other purposes.
Lorenz.Reg
, Rearrangement.estimation
## For examples see example(Lorenz.Reg), example(Lorenz.boot) and example(PLR.CV)
Run the code above in your browser using DataLab