[R] Nonparmetric statistics with weighted data set?

Thomas Lumley tlumley at uw.edu
Sun Mar 25 21:55:17 CEST 2012


On Mon, Mar 26, 2012 at 8:45 AM, Barnet Wagman <bw at norbl.com> wrote:
> I'm doing some work with a weighted data set (the CPS) and I'd like to use
> nonparametric techniques. Is there an R package that supports this?  The np
> package doesn't appear to have provisions for weighted data. (Or have I
> missed something?)  I need to perform both density estimation and
> regressions.

You may need to be more precise about what you mean by 'nonparametric
techniques', but if you want smoothing you can probably do what you
want with the survey package.

svysmooth() does densities and both mean and quantile scatterplot smoothing.

For regression models with smooth terms you would have to use
regression splines in svyglm(), but they are almost indistinguishable
from smoothing splines in practice.

For other sorts of non-parametric techniques there are two-sample rank
tests in the survey package.

   -thomas

-- 
Thomas Lumley
Professor of Biostatistics
University of Auckland



More information about the R-help mailing list