Learn R Programming

LorenzRegression (version 2.2.0)

predict.LR: Prediction and fitted values for the Lorenz regression

Description

predict provides predictions for an object of class "LR", while fitted extracts the fitted values.

Usage

# S3 method for LR
predict(object, newdata, type = c("index", "response"), ...)

# S3 method for LR fitted(object, type = c("index", "response"), ...)

Value

A vector of predictions for predict, or a vector of fitted values for fitted.

Arguments

object

An object of class "LR".

newdata

An optional data frame in which to look for variables with which to predict. If omitted, the original data are used.

type

A character string indicating the type of prediction or fitted values. Possible values are "response" and "index" (the default). In the first case, the prediction estimates the conditional expectation of the response given the covariates. In the second case, the prediction estimates only the index of the single-index model.

...

Additional arguments passed to the function Rearrangement.estimation.

Details

The type argument distinguishes between two types of prediction outputs, aligned with the goals of the 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.

See Also

Lorenz.Reg, Rearrangement.estimation

Examples

Run this code
## For examples see example(Lorenz.Reg) and example(Lorenz.boot)

Run the code above in your browser using DataLab