# [R] Weighted Principle Components analysis

David Carlson dcarlson at tamu.edu
Fri Apr 26 16:17:24 CEST 2013

```When you run an unweighted analysis on all three systems, do the scores
agree? I would have expected that replicating the observations would give
you similar results.

You might be able to run the weighted analysis using princomp() instead of
principal since you can supply data and a covariance matrix (but the manual
page does not specifically mention supplying a correlation matrix - you
might have to run the analysis on standardized variables).

-------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Dimitri Liakhovitski
Sent: Friday, April 26, 2013 6:32 AM
To: r-help
Subject: Re: [R] Weighted Principle Components analysis

The reason for  my asking is because I have to replicate the same analysis
done in SPSS and SAS.

Again, to make it clear - it's respondent-weighted Factor Analysis with a
desired number of factors. Method of extraction: Principal Components.
Rotation: Varimax.

The only solution I can think of is to multiply my respondent weight by 10
(or by 100) and round it so that the new "weight" has no decimals, then
repeat every row as many times as the new weight says and run regular,
unweighted "principal" on the new data. I've done it - but again, this does
not match the Factor Scores from SPSS and SAS exactly.

Any other ideas?
Thank you!

On Thu, Apr 25, 2013 at 9:21 AM, Dimitri Liakhovitski <
dimitri.liakhovitski at gmail.com> wrote:

> Hello!
>
> I am doing Principle Componenets Analysis using "psych" package:
>
> mypc<-principal(mydata,5,scores=TRUE)
>
> However, I was asked to run a case-weighted PCA - using an individual
> weight for each case.
>
> I could use "corr" from "boot" package to calculate the case-weighed
> intercorrelation matrix. But if I use the intercorrelation matrix as
> input (instead of the raw data), I am not going to get factor scores,
> which I do need to get.
>
> Thank you very much!
>
> --
> Dimitri Liakhovitski
>

--
Dimitri Liakhovitski

[[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help