Copyright © 2011 Dan Nettleton

Slides:



Advertisements
Similar presentations
Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize.
Advertisements

1 Chapter 13 Curve Fitting and Correlation This chapter will be concerned primarily with two separate but closely interrelated processes: (1) the fitting.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
1 Functions and Applications
Model assessment and cross-validation - overview
Chapter 3 Section 4 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Preprocessing Methods for Two-Color Microarray Data
1 An Introduction to Nonparametric Regression Ning Li March 15 th, 2004 Biostatistics 277.
1 Normalization Methods for Two-Color Microarray Data 1/13/2009 Copyright © 2009 Dan Nettleton.
Chapter 5 Regression. Chapter outline The least-squares regression line Facts about least-squares regression Residuals Influential observations Cautions.
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
Slide Copyright © 2008 Pearson Education, Inc. Chapter 4 Descriptive Methods in Regression and Correlation.
Dr. Fowler AFM Unit 8-5 Linear Correlation Be able to construct a scatterplot to show the relationship between two variables. Understand the properties.
Chapter 15: Apportionment
Chapter 3 Descriptive Statistics: Numerical Methods Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
Curve Fitting and Regression EEE 244. Descriptive Statistics in MATLAB MATLAB has several built-in commands to compute and display descriptive statistics.
Advanced Topics- Polynomials
Curve-Fitting Regression
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers Chapter 5B Model.
Regression Lines. Today’s Aim: To learn the method for calculating the most accurate Line of Best Fit for a set of data.
CORRELATION. Correlation key concepts: Types of correlation Methods of studying correlation a) Scatter diagram b) Karl pearson’s coefficient of correlation.
Microarray Data Pre-Processing
Section 2.6 – Draw Scatter Plots and Best Fitting Lines A scatterplot is a graph of a set of data pairs (x, y). If y tends to increase as x increases,
5.3 Function Rules, Tables, & Graphs. List some pairs of numbers that will satisfy the equation x + y = 4. x = 1 and y = 3 x = 2 and y = 2 x = 4 and y.
A. Write an equation in slope-intercept form that passes through (2,3) and is parallel to.
Describing Relationships
Section 1.4 Equations of Lines and Modeling Copyright ©2013, 2009, 2006, 2001 Pearson Education, Inc.
Curve Fitting with Polynomial Models Essential Questions
Chapter 14 Introduction to Regression Analysis. Objectives Regression Analysis Uses of Regression Analysis Method of Least Squares Difference between.
Lecture 29: Modeling Data. Data Modeling Interpolate between data points, using either linear or cubic spline models Model a set of data points as a polynomial.
The normal distribution
Department of Mathematics
CHAPTER 3 NUMERICAL METHODS
Data manipulation II: Least Squares Fitting
1 Functions and Applications
Chapter 11 LOcally-WEighted Scatterplot Smoother (Lowess)
Multivariate Data.
Statistics 101 Chapter 3 Section 3.
Rules for Graphing.
Curve-Fitting Spline Interpolation
Warm Up What do you know about the graph of f(x) = (x – 2)(x – 4)2 ?
Unit 4 Lesson 4 (5.4) Summarizing Bivariate Data
Chapter 5 Lesson 5.3 Summarizing Bivariate Data
Chapter 5 STATISTICS (PART 4).
The Method of Least-Squares
Normalization Methods for Two-Color Microarray Data
Unit 2.2 Linear Regression
Probability and Statistics for Computer Scientists Second Edition, By: Michael Baron Section 11.1: Least squares estimation CIS Computational.
Some Rules for Expectation
CHAPTER 29: Multiple Regression*
LESSON 21: REGRESSION ANALYSIS
Copyright © Cengage Learning. All rights reserved.
Ice Cream Sales vs Temperature
The normal distribution
Descriptive Analysis and Presentation of Bivariate Data
Numerical Analysis Lecture 23.
Nonlinear regression.
Scatter Plots and Best-Fit Lines
M248: Analyzing data Block D UNIT D2 Regression.
Nonlinear and Multiple Regression
Linear regression.
Diagnostics and Remedial Measures
Sang-Hyop Lee & Comfort Sumida 3rd NTA Workshop January 21, 2006
政治大學統計系余清祥 2004年5月26日~ 6月7日 第十六、十七週:估計密度函數
Correlation & Regression
For vectors {image} , find u + v. Select the correct answer:
Diagnostics and Remedial Measures
Empirical Distributions
CESD: Center for Epidemiologic Studies Depression.
Presentation transcript:

Copyright © 2011 Dan Nettleton The LOWESS Smoother 1/19/2011 Copyright © 2011 Dan Nettleton 1

LOWESS “lowess” stands for LOcally WEighted polynomial regreSSion. The original reference for lowess is Cleveland, W. S. (1979). Robust locally weighted regression and smoothing scatterplots. JASA 74 829-836. 2

How is the lowess curve determined? Suppose we have data points (x1,y1), (x2,y2),...(xn,yn). Let 0 < f ≤ 1 denote a fraction that will determine the smoothness of the curve. Let r = n*f rounded to the nearest integer. Consider the tricube weight function defined as Tricube Weight Function T(t) = ( 1 - | t | 3 ) 3 for | t | < 1 = 0 for | t | ≥ 1. T(t) For i=1, ..., n; let hi be the rth smallest number among |xi-x1|, |xi-x2|, ..., |xi-xn|. For k=1, 2, ..., n; let wk(xi)=T( ( xk – xi ) / hi ). 3 t

An Example i 1 2 3 4 5 6 7 8 9 10 xi 1 2 5 7 12 13 15 25 27 30 yi 1 8 4 5 3 9 16 15 23 29 Suppose a lowess curve will be fit to this data with f=0.4. y 4 x

Table Containing |xi-xj| Values x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x1 0 1 4 6 11 12 14 24 26 29 x2 1 0 3 5 10 11 13 23 25 28 x3 4 3 0 2 7 8 10 20 22 25 x4 6 5 2 0 5 6 8 18 20 23 x5 11 10 7 5 0 1 3 13 15 18 x6 12 11 8 6 1 0 2 12 14 17 x7 14 13 10 8 3 2 0 10 12 15 x8 24 23 20 18 13 12 10 0 2 5 x9 26 25 22 20 15 14 12 2 0 3 x10 29 28 25 23 18 17 15 5 3 0 5

Calculation of hi from |xi-xj| Values n=10, f=0.4  r=4 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x1 0 1 4 6 11 12 14 24 26 29 h1= 6 x2 1 0 3 5 10 11 13 23 25 28 h2= 5 x3 4 3 0 2 7 8 10 20 22 25 h3= 4 x4 6 5 2 0 5 6 8 18 20 23 h4= 5 x5 11 10 7 5 0 1 3 13 15 18 h5= 5 x6 12 11 8 6 1 0 2 12 14 17 h6= 6 x7 14 13 10 8 3 2 0 10 12 15 h7= 8 x8 24 23 20 18 13 12 10 0 2 5 h8=10 x9 26 25 22 20 15 14 12 2 0 3 h9=12 x10 29 28 25 23 18 17 15 5 3 0 h10=15 6

Weights wk(xi) Rounded to Nearest 0.001 1 2 3 4 5 6 7 8 9 10 1 1.000 0.986 0.348 0.000 0.000 0.000 0.000 0.000 0.000 0.000 2 0.976 1.000 0.482 0.000 0.000 0.000 0.000 0.000 0.000 0.000 3 0.000 0.193 1.000 0.670 0.000 0.000 0.000 0.000 0.000 0.000 4 0.000 0.000 0.820 1.000 0.000 0.000 0.000 0.000 0.000 0.000 5 0.000 0.000 0.000 0.000 1.000 0.976 0.482 0.000 0.000 0.000 6 0.000 0.000 0.000 0.000 0.986 1.000 0.893 0.000 0.000 0.000 7 0.000 0.000 0.000 0.000 0.850 0.954 1.000 0.000 0.000 0.000 8 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.976 0.670 9 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.986 1.000 0.954 10 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.893 0.976 1.000 i w6(x5) = (1 - ( | x6 - x5 | / h5 ) 3 ) 3 = ( 1 - ( | ( 13 – 12 ) / 5 | ) 3 ) 3 = ( 1 – 1 / 125 ) 3 0.976 ~ ~ 7

Next consider local weighted regressions For each i=1, 2, ..., n; let and denote the values of and that minimize . For i=1, 2, ..., n; let and

9

10

11

12

13

14

15

16

17

18

Next measure the degree to which an observation is outlying. Consider the bisquare weight function defined as B(t) = ( 1 - t 2 ) 2 for | t | < 1 = 0 for | t | ≥ 1. Bisquare Weight Function B(t) For k=1,2,...,n; let 19 t where s is the median of |e1|, |e2|, ..., |en|.

Now down-weight outlying observations and repeat the local weighted regressions. For each i=1, 2, ..., n; let and denote the values of and that minimize . For i=1, 2, ..., n; let . 20

Iterate one more time. Now use the new fitted values to compute new as described previously. Substitute the new for the old and repeat the local weighted regressions one last time to obtain the final values. These resulting values are the lowess fitted values. Plot these values versus x1, x2, ..., xn and connect with straight lines to obtain the lowess curve. 21

22

23

24

25

26

27

28

29

30

31

Plot Showing All 10 Lines and Predicted Values after One More Iteration 32

The Lowess Curve 33

lowess in R o=lowess(x,y,f=0.4) plot(x,y) lines(o$x,o$y,col=2,lwd=2) o$x will be a vector containing the x values. o$y will contain the lowess fitted values for the values in o$x. f controls the fraction of the data used to obtain each fitted value. 34

o=lowess(y~x,f=.2) plot(fossil) lines(o,lwd=2) #See also the function 'loess' which has more #capabilities than 'lowess'.