Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: locally weighted regression with weighted data

From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: locally weighted regression with weighted data
Date   Fri, 7 Jan 2011 17:59:54 +0000

It's easier (e.g.) to construct your own set of spline predictors with -mkspline- and then call up -regress- directly. Then you can have any weights you want. 

Tastes and experiences will vary -- a lot -- but for a default regression-type smooth I typically now prefer fractional polynomial or cubic spline regressions, rather than any kernel method, such as lowess (loess) or local polynomials. 

They tend to be smoother (informally) and faster and come equipped with confidence interval machinery -- to be treated sceptically rather than deferentially, of course. 
Also, you can combine with other predictors. 

[email protected] 

Jorge Eduardo Pérez Pérez

You could bin your x variable and calculate weighted means of the y
variable for each bin, then run -lowess- on the means. This is the
approach used in the following article, although it is used to local
polinomial regression (command -lpoly-).

D. R. Bellhouse and J. E. Stafford. Local polynomial regression in complex
survey. Survey Methodology, 27(2):197–203, 2001.

Florian Scheuer

> does anyone know how to run a locally weighted regression with weighted data? the stata command 'lowess' does not allow for weights.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index