ERSA (version 0.1.3)

pcpPlot: A PCP plot of the data, residuals or hat values from regression fits

Description

A PCP plot of the data, residuals or hat values from regression fits

Usage

pcpPlot(
  data,
  fit,
  type = "Variables",
  npcpCols = 4,
  resDiff = F,
  absResid = F,
  sequential = F,
  selnum = NULL
)

Value

ggplot

Arguments

data

a data frame

fit

a lm for the data frame

type

one of "Variables", "Residuals", "Hatvalues"

npcpCols

number of colours

resDiff

difference residuals, TRUE or FALSE

absResid

absolute residuals, TRUE or FALSE

sequential

use sequential fits (TRUE) or drop1 fits (FALSE)

selnum

row numbers of cases to be highlighted

Examples

Run this code
f <- lm(mpg ~ wt+hp+disp, data=mtcars)
pcpPlot(mtcars, f, type="Residuals")

Run the code above in your browser using DataLab