regr2.plot

0th

Percentile

3D plot of z against x and y, with regression plane fit and display of squared residuals.

3D plot of z against x and y, with regression plane fit and display of squared residuals.

Keywords
models, regression
Usage
regr2.plot(x, y, z,
           main.in="put a useful title here",
           resid.plot=FALSE,
           plot.base.plane=TRUE,
           plot.back.planes=TRUE,
           plot.base.points=FALSE,
           eye=NULL,                   ## S-Plus
           theta=0, phi=15, r=sqrt(3), ticktype="detailed", ## R
           ...)
Arguments
x,y,z
See persp in R, persp in S-Plus.
main.in
main title for plot.
resid.plot
Argument to resid.squares.
plot.base.plane, plot.back.planes, plot.base.points
Should these items be plotted?
eye
See persp in S-Plus.
theta, phi, r, ticktype
See persp in R
...
Other arguments to persp.
Note

This plot is designed as a pedagogical example for introductory courses. When resid.plot=="square", then we actually see the set of squares for which the sum of their areas is minimized by the method of "least squares".

References

Heiberger, Richard~M. and Holland, Burt (2004b). Statistical Analysis and Data Display: An Intermediate Course with Examples in S-Plus, R, and SAS. Springer Texts in Statistics. Springer. ISBN 0-387-40270-5. Smith, W. and Gonick, L. (1993). The Cartoon Guide to Statistics. HarperCollins.

See Also

resid.squares, regr1.plot

Aliases
  • regr2.plot
Examples
fat <- read.table(hh("datasets/fat.data"), header=TRUE)
regr2.plot(fat[,"abdomin"], xlab="abdomin",
           fat[,"biceps"],  ylab="biceps",
           fat[,"bodyfat"], zlab="bodyfat",
           resid.plot="square",
           eye=c(335.5, 115.65, 171.9),   ## used only in S-Plus
           theta=140, phi=35, r=sqrt(15), ## used only in R
           box=is.R(),
           plot.back.planes=FALSE,
           main="Least-squares with two X-variables")
Documentation reproduced from package HH, version 2.1-12, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.