Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

component.residual

Component + Residual Plot


Description

Component + Residual plot for a term in a lm model.

Usage

component.residual(lm.obj, which = 1, xlab = "Component",
    ylab = "C+R")

Arguments

lm.obj

A lm object

which

numeric code for the term in the lm formula to be plotted

xlab

label for the x-axis

ylab

label for the y-axis

Value

A scatterplot with a smooth curve overlaid.

Author(s)

J.H. Maindonald

See Also

Examples

mice12.lm <- lm(brainwt ~ bodywt + lsize, data=litters)
oldpar <- par(mfrow = c(1,2))
component.residual(mice12.lm, 1, xlab = "Body weight", ylab= "t(Body weight) + e")
component.residual(mice12.lm, 2, xlab = "Litter size", ylab= "t(Litter size) + e")
par(oldpar)

DAAG

Data Analysis and Graphics Data and Functions

v1.24
GPL-3
Authors
John H. Maindonald and W. John Braun
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.