A PCP plot of the data, residuals or hat values from regression fits
pcpPlot( data, fit, type = "Variables", npcpCols = 4, resDiff = F, absResid = F, sequential = F, selnum = NULL )
ggplot
a data frame
a lm for the data frame
one of "Variables", "Residuals", "Hatvalues"
number of colours
difference residuals, TRUE or FALSE
absolute residuals, TRUE or FALSE
use sequential fits (TRUE) or drop1 fits (FALSE)
row numbers of cases to be highlighted
f <- lm(mpg ~ wt+hp+disp, data=mtcars) pcpPlot(mtcars, f, type="Residuals")
Run the code above in your browser using DataLab