ShallowReg: Regression Line Too Shallow?

Description Usage Arguments Value Note Author(s) Examples

View source: R/ShallowReg.R

Description

The regression line is not as steep as the SD Line (line through point of averages, with slope = sd(y)/sd(x)). The difference is especially noticeable when the scatter plot is the result of a sample from a bivariate normal distribution. This app explains why we use the regression line to predict y from x, even though the SD line appears to be a better linear summary of the scatter plot. Can be used as a starting-point for a discussion of "regression to the mean."

Usage

1
ShallowReg(n=900,rho=0.5)

Arguments

n

Number of points in the scatter plot.

rho

Target correlation for the scatter plot. Points are selected from a standardized bivariate normal distribution, with correlation rho.

Value

Graphical output.

Note

Uses manipulate, available only in R Studio, and mvrnorm from package MASS.

Author(s)

Homer White hwhite0@georgetowncollege.edu

Examples

1
2
3
4
## Not run: 
if (require(manipulate)) ShallowReg()

## End(Not run)

tigerstats documentation built on July 2, 2020, 2:32 a.m.