Learn R Programming

LorenzRegression (version 2.2.0)

autoplot.LR: Plots for the Lorenz regression

Description

autoplot generates a plot for an object of class "LR" and returns it as a ggplot object. The plot method is a wrapper around autoplot that directly displays the plot, providing a more familiar interface for users accustomed to base R plotting.

Usage

# S3 method for LR
autoplot(object, type = c("explained", "residuals"), band.level = 0.95, ...)

# S3 method for LR plot(x, ...)

Value

autoplot returns a ggplot object representing the desired graph. plot directly displays this plot.

Arguments

object

An object of class "LR".

type

A character string indicating the type of plot. Possible values are "explained" and "residuals".

  • If "explained" is selected, the graph displays the Lorenz curve of the response and concentration curve of the response with respect to the estimated index. If object inherits from "PLR_boot" and LC_store was set to TRUE in Lorenz.boot, pointwise confidence intervals for the concentration curve are added. Their confidence level is set via the argument band.level.

  • If "residuals" is selected, the graph displays a scatterplot of residuals with respect to the estimated index. Obtaining residuals entail to estimate the link function of the single-index. This is performed via the function Rearrangement.estimation, as explained in predict.LR.

band.level

Confidence level for the bootstrap confidence intervals.

...

Additional arguments passed either to Lorenz.graphs (for type = "explained") or to fitted.LR and residuals.LR (for type = "residuals").

x

An object of class "LR".

See Also

Lorenz.Reg

Examples

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

Run the code above in your browser using DataLab