Learn R Programming

tigerstats (version 0.1.6)

ShallowReg: Regression Line Too Shallow?

Description

The regession 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 scatterplot 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 scatterplot. Can be used as a starting-point for a discussion of "regression to the mean."

Usage

ShallowReg(n=900,rho=0.5)

Arguments

n
Number of points in the scatterplot.
rho
Target correlation for the scatterplot. Points are selected from a standardized bivariate normal distribtuion, with correlation rho.

Value

  • Graphical output.

Examples

Run this code
if (require(manipulate)) ShallowReg()

Run the code above in your browser using DataLab