This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Smoothing and NonParametric Regression Germ´ an Rodr´ ıguez [email protected] Spring, 2001 Objective: to estimate the effects of covariates X on a response y non parametrically , letting the data suggest the appropriate functional form. 1 Scatterplot Smoothers Consider first a linear model with one predictor y = f ( x ) + . We want to estimate f , the trend or smooth . Assume the data are ordered so x 1 < x 2 < ... < x n . If we have multiple observations at a given x i we introduce a weight w i . 1.1 Running Mean We estimate the smooth at x i by averaging the y ’s corresponding to x ’s in a neighborhood of x i : S ( x i ) = X j ∈ N ( x i ) ( y j ) /n i , for a neighborhood N ( x i ) with n i observations. A common choice is to take a symmetric neighborhood consisting of the nearest 2 k + 1 points: N ( x i ) = { max( i k, 1) ,...,i 1 ,i,i + 1 ,..., min( i + k,n ) } . Problems: it’s wiggly, bad near the endpoints (bias). Use only for equally spaced points. 1 1.2 Running Line One way to reduce the bias is by fitting a local line: S ( x i ) = ˆ α i + ˆ β i x i , where ˆ α i and ˆ β i are OLS estimates based on points in a neighborhood N ( x i ) of x i . This is actually easy to do thanks to wellknown regression updating formulas. Extension to weighted data is obvious. Much better than running means. 1.3 Kernel Smoothers An alternative approach is to use a weighted running mean, with weights that decline as one moves away from the target value. To calculate S ( x i ), the jth point receives weight w ij = c i λ d (  x i x j  λ ) , where d ( . ) is an even function, λ is a tunning constant called the window width or bandwidth, and c i is a normalizing constant so the weights add up to one for each x i . Popular choices of function d ( . ) are • Gaussian density, • Epanechnikov: d ( t ) = 3 4 (1 t 2 ) ,t 2 < 1, 0 otherwise, • Minimum var: d ( t ) = 3 8 (3 5 t 2 ) ,t 2 < 1, 0 otherwise. One difficulty is that a kernel smoother still exhibits bias at the end points. Solution? Combine the last two approaches: use kernel weights to estimate a running line. 1.4 Loess/Lowess One such approach is loess , a locally weighted running line smoother due to Cleveland and implemented in S and R. To calculate S ( x i ) you basically • find a symmetric nearest neighborhood of x i , • find the distance from x i to the furthest neighbor and use this as λ , • use a tricube weight function d ( t ) = (1 t 3 ) 3 , ≤ t ≤ 1, 0 otherwise, • estimate a local line using these weights, take the fitted value at x i as S ( x i ). A variant uses robust regression in each neighborhood. 2 1.5 Other Approaches Splines are a popular family of smoothers. We will study splines in the next section....
View
Full
Document
This note was uploaded on 02/12/2008 for the course ECON 572 taught by Professor Rodriguez during the Spring '06 term at Princeton.
 Spring '06
 Rodriguez

Click to edit the document details