Visualization of Linear Models Correlation and Regression Possums - - PowerPoint PPT Presentation

visualization of linear models
SMART_READER_LITE
LIVE PREVIEW

Visualization of Linear Models Correlation and Regression Possums - - PowerPoint PPT Presentation

CORRELATION AND REGRESSION Visualization of Linear Models Correlation and Regression Possums > ggplot(data = possum, aes(y = totalL, x = tailL)) + geom_point() Correlation and Regression Through the origin > ggplot(data = possum,


slide-1
SLIDE 1

CORRELATION AND REGRESSION

Visualization of Linear Models

slide-2
SLIDE 2

Correlation and Regression

Possums

> ggplot(data = possum, aes(y = totalL, x = tailL)) + geom_point()

slide-3
SLIDE 3

Correlation and Regression

Through the origin

> ggplot(data = possum, aes(y = totalL, x = tailL)) + geom_point() + geom_abline(intercept = 0, slope = 2.5)

slide-4
SLIDE 4

Correlation and Regression

Through the origin, beer fit

> ggplot(data = possum, aes(y = totalL, x = tailL)) + geom_point() + geom_abline(intercept = 0, slope = 1.7)

slide-5
SLIDE 5

Correlation and Regression

Not through the origin

> ggplot(data = possum, aes(y = totalL, x = tailL)) + geom_point() + geom_abline(intercept = 40, slope = 1.3)

slide-6
SLIDE 6

Correlation and Regression

The "best" fit line

> ggplot(data = possum, aes(y = totalL, x = tailL)) + geom_point() + geom_smooth(method = "lm")

slide-7
SLIDE 7

Correlation and Regression

Ignore standard errors

> ggplot(data = possum, aes(y = totalL, x = tailL)) + geom_point() + geom_smooth(method = "lm", se = FALSE)

slide-8
SLIDE 8

CORRELATION AND REGRESSION

Let’s practice!

slide-9
SLIDE 9

CORRELATION AND REGRESSION

Understanding the linear model

slide-10
SLIDE 10

Correlation and Regression

Generic statistical model

response = f(explanatory) + noise

slide-11
SLIDE 11

Correlation and Regression

Generic linear model

response = intercept + (slope * explanatory) + noise

slide-12
SLIDE 12

Correlation and Regression

Regression model

slide-13
SLIDE 13

Correlation and Regression

Fied values

slide-14
SLIDE 14

Correlation and Regression

Residuals

slide-15
SLIDE 15

Correlation and Regression

Fiing procedure

slide-16
SLIDE 16

Correlation and Regression

Least squares

  • Easy, deterministic, unique solution
  • Residuals sum to zero
  • Line must pass through
  • Other criteria exist—just not in this course
slide-17
SLIDE 17

Correlation and Regression

Key concepts

  • Y-hat is expected value given corresponding X
  • Beta-hats are estimates of true, unknown betas
  • Residuals (e's) are estimates of true, unknown epsilons
  • "Error" may be misleading term—beer: noise
slide-18
SLIDE 18

CORRELATION AND REGRESSION

Let’s practice!

slide-19
SLIDE 19

CORRELATION AND REGRESSION

Regression vs. regression to the mean

slide-20
SLIDE 20

Correlation and Regression

Heredity

  • Galton's "regression to the mean"
  • Thought experiment: consider the heights of the children of

NBA players

slide-21
SLIDE 21

Correlation and Regression

Galton's data

slide-22
SLIDE 22

Correlation and Regression

Regression modeling

  • "Regression": techniques for modeling a quantitative response
  • Types of regression models:
  • Least squares
  • Weighted
  • Generalized
  • Nonparametric
  • Ridge
  • Bayesian
slide-23
SLIDE 23

CORRELATION AND REGRESSION

Let’s practice!