plot.eda_lm: Residuals plot

View source: R/plot.eda_lm.R

plot.eda_lmR Documentation

Residuals plot

Description

Generate residuals vs fitted or residuals vs dependence plot from an eda_lm class object

Usage

## S3 method for class 'eda_lm'
plot(
  x,
  type = "rd",
  xlab = NULL,
  ylab = NULL,
  grey = 0.7,
  pch = 21,
  equal = TRUE,
  p.col = "grey50",
  alpha = 0.7,
  p.fill = "grey80",
  size = 0.8,
  loess = TRUE,
  loe.col = rgb(0.3, 0.3, 1, 1),
  loess.d = list(family = "symmetric", span = 0.7, degree = 1),
  ...
)

Arguments

x

Object of class eda_lm.

type

Type of residuals plot. Choice between residuals-fit (rf) and residuals-dependence (rd) plots.

xlab

X label for output plot.

ylab

Y label for output plot.

grey

Grey level to apply to plot elements (0 to 1 with 1 = black).

pch

Point symbol type.

equal

Boolean determining if axes lengths should match (i.e. square plot).

p.col

Color for point symbol.

alpha

Point transparency (0 = transparent, 1 = opaque). Only applicable if rgb() is not used to define point colors.

p.fill

Point fill color passed to bg (Only used for pch ranging from 21-25).

size

Point size (0-1).

loess

Boolean indicating if a loess should be fitted to the plot. function. A robust loess is used by default.

loe.col

LOESS curve color.

loess.d

A list of arguments passed to the loess.smooth function. A robust loess is used by default.

...

Note used.

Details

The function generates a scatter plot of residuals vs dependence or residuals vs fitted values plot from a model of class eda_lm. A loess line is fitted to the data. By default, a robust loess is adopted with the "symmetric" family.

Value

Does not return a value.

Examples

M1  <- eda_lm(age_height, Months, Height)
plot(M1) # Residual-dependence plot
plot(M1, type = "rf") # Residual-fit plot

mgimond/tukeyedar documentation built on Feb. 1, 2025, 4:02 a.m.