Re: [R] Orthoblique rotation on eigenvectors (SAS VARCLUS)

From: Frank Harrell <f.harrell_at_vanderbilt.edu>
Date: Sun, 10 Apr 2011 09:52:07 -0700 (PDT)

See the varclus function in the Hmisc package. Frank

Axel Urbiz wrote:
>
> Hi All,
>
> I'd like to build a package for the community that replicates the output
> produced by SAS "proc varclus". According to the SAS documentation, the
> first few steps are:
>
> 1. Find the first two principal components.
> 2. Perform an orthoblique rotation (quartimax rotation) on eigenvectors.
> 3. Assign each variable to the rotated component with which it has the
> higher
> squared correlation.
> The cartoon example below attempt to do this, but I found my results
> differ
> from SAS in "pc3" (i.e, the standardize component scores).
>
> I'd appreciate your help in whether you see anything wrong in "pc2" or
> "pc3"?
>
> set.seed(1)
> x1=rnorm(200); x2=0.9*x1; x3=0.7*x1; x4=x1*x1; x5=x1*x1*x1;
> x6=rnorm(200); x7=0.9*x6; x8=0.7*x6; x9=x6*x6; x10=x6*x6*x6;
> x <- cbind(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)
>
> require(GPArotation)
> pc1 <- princomp(x, cor = TRUE, scores = TRUE)
> pc2 <- quartimax(pc1$loadings[,1:2],normalize=TRUE)$loadings
> pc3 <- scale(x%*% pc2)
> pc4 <- apply(x, 2, function(x) cor(x, pc3)^2)
>
> Thanks in advance for any help!
>
> Axel.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/Orthoblique-rotation-on-eigenvectors-SAS-VARCLUS-tp3438695p3440064.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.
Received on Sun 10 Apr 2011 - 16:56:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 10 Apr 2011 - 17:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive