SSPlot: Sum of Squares Plot

Description Usage Arguments Author(s) Examples

View source: R/SSPlot.R

Description

This function graphically displays the sum of squares for a linear regression with a given slope (b). If the manipulate function is available, an interactive plot can be produced.

Usage

1
SSPlot(X, Y, b)

Arguments

X

Vector of x values

Y

Vector of y values

b

Slope for the regression

Author(s)

Kevin Middleton (middletonk@missouri.edu)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
n <- 30
X <- rnorm(n, mean = 10)
Y <- 2.4 * X + rnorm(n, mean = 1)
b <- 2
SSPlot(X, Y, b)

## Not run: 
if (require(manipulate)) {
  manipulate(SSPlot(X, Y, b), b = slider(-10, 10, step = 0.1))
}
## End(Not run)

kmiddleton/kmmisc documentation built on Jan. 27, 2020, 7:55 a.m.