Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <n.j.cox@durham.ac.uk> |
To | "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |
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. Nick n.j.cox@durham.ac.uk 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: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/