[R] Weighted principal components analysis?
Stéphane Dray
dray at biomserv.univ-lyon1.fr
Fri Apr 3 23:13:33 CEST 2009
see the row.w argument of the function dudi.pca in the ade4 package.
Cheers.
Alan Cohen wrote:
> Hello R-ers,
>
> I'm trying to do a weighted principal components analysis. I couldn't find any such option with princomp or prcomp. Does anyone know of a package or way to do this?
>
> More specifically, the observations I'm working with are averages from populations of varying sizes. I thus need to weight the observations by sample size. Ideally I could apply these weights at the cell level (i.e., allowing sample size to vary within observations across variables), but even applying them just to the observations would get me most of the way there.
>
> I'm using R v2.8.1 on Windows XP. I've searched Help and the R site and had no luck. Thanks for any help you can provide.
>
> Cheers,
> Alan Cohen
> Centre for Global Health Research
> Toronto, Ontario
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>
--
Stéphane DRAY (dray at biomserv.univ-lyon1.fr )
Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - Lyon I
43, Bd du 11 Novembre 1918, 69622 Villeurbanne Cedex, France
Tel: 33 4 72 43 27 57 Fax: 33 4 72 43 13 88
http://pbil.univ-lyon1.fr/members/dray/
More information about the R-help
mailing list