Learn R Programming

pacviz (version 1.0.3)

pac.resid: Pac-Man Residual Function

Description

A visualization technique in R for regression analysis results, specifically residual values, based on a restricted radial coordinate system. It provides a broad view perspective on the performance of regression models, and supports most model inputs.

Usage

pac.resid(
  x,
  y,
  title,
  taxis,
  model = lm(y ~ x, data = data.frame(x, y)),
  color1 = "gold",
  standardize = FALSE
)

Value

Pac-Man residual plot

Arguments

x, y

Numeric data

title

Figure title

taxis

Vector with the first entry being the axis label and the second entry being units

model

An object for which the extraction of model residuals is meaningful.

color1

Color value as string or rgb

standardize

Boolean to standardize the residual value

Examples

Run this code
data("cars")
x <- cars$dist
y <- cars$speed
pac.resid(x,y, 'Example 2',
            c("Temperature",'degC'),
            color1="lightblue",
            standardize=TRUE)

Run the code above in your browser using DataLab