predict.PLR {LorenzRegression}R Documentation

Prediction and fitted values for the penalized Lorenz regression

Description

prediction provides predictions for an object of class "PLR", while fitted extracts the fitted values.

Usage

## S3 method for class 'PLR'
predict(object, newdata, type = c("index", "response"), pars.idx = "BIC", ...)

## S3 method for class 'PLR'
fitted(object, type = c("index", "response"), pars.idx = "BIC", ...)

Arguments

object

An object of S3 class "PLR". The object might also have S3 classes "PLR_boot" and/or "PLR_cv" (both inherit from class "PLR")

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 conditional expectation of the response given the covariates is estimated. In the second case, only the index of the single-index model is estimated.

pars.idx

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.

Details

If type="response", the link function of the single-index model must be estimated. This is done via the function Rearrangement.estimation.

Value

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

See Also

Lorenz.Reg, Rearrangement.estimation

Examples

## For examples see example(Lorenz.Reg), example(Lorenz.boot) and example(PLR.CV)


[Package LorenzRegression version 2.0.0 Index]