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.
# S3 method for LR
autoplot(
object,
type = c("explained", "residuals"),
band.level = 0.95,
palette = NULL,
...
)# S3 method for LR
plot(x, ...)
autoplot returns a ggplot object representing the desired graph. plot directly displays this plot.
An object of class "LR".
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.
Confidence level for the bootstrap confidence intervals.
A vector of colors. If NULL (default), the base R
palette is used. When provided, the first color is reserved for the baseline
(typically "black"), and the remaining colors are used to distinguish the curves.
Additional arguments passed either to Lorenz.graphs (for type = "explained")
or to fitted.LR and residuals.LR (for type = "residuals").
An object of class "LR".
Lorenz.Reg
## For examples see example(Lorenz.Reg)
Run the code above in your browser using DataLab