predict.LR {LorenzRegression} | R Documentation |
Prediction and fitted values for the Lorenz regression
Description
prediction
provides predictions for an object of class "LR"
,
while fitted
extracts the fitted values.
Usage
## S3 method for class 'LR'
predict(object, newdata, type = c("index", "response"), ...)
## S3 method for class 'LR'
fitted(object, type = c("index", "response"), ...)
Arguments
object |
An object of class |
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 |
... |
Additional arguments passed to the function |
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) and example(Lorenz.boot)