[R] factor analysis (pca): how to get the 'communalities'?

Wolfgang Lindner LindnerW at t-online.de
Sat Jan 4 12:52:03 CET 2003


Brett Magill schrieb:
| If interested, on my web site I have code to do factor analysis by PC.  Does
| exactly as below, but a nice wrapper to print methods, rotations, sorting, and
| other conveniences.
|
|   home.earthlink.net/~bmagill/MyMisc.html 
|
| The relevant code snipets are "prinfact", "plot.pfa", and "print.pfa", along
| with the other required functions as indiciated on the web site.

Dear Brett,

thanks very much for supplying your code. It's really illuminating.
Now, let me quote you
 'When I have time, I will document them and wrap them up into a package that
  can be installed.'
I hope you will find some time to prepare 'Your'Misc-1.0.R ;-) ..
Helpful could be to give some examples of calling your functions. 

Please excuse me, if the following questions are *too* off-topic, but I found it 
interesting. In inspecting your code I came across an R feature, I could not 
find in the online manuals:

Q1. Looking at the left-handside in your function def:

"cov.cor" <- function ( covmat ) {
                        sdev <- diag ( sqrt ( diag ( covmat ) ) ) 
                        solve(sdev) %*% covmat %*% t(solve(sdev))  }
^       ^
|       |
?       ?

- *Why* is the (identifier) function name cov.cor included in question marks? 
- How is "cov.cor" then called?  "cov.cor"(..) or cov.cor(..) or ?

Q2. Please, can someone give me a pointer where this feature is described.

Finally I want to thank the list for this thread.

Wolfgang
--
Wolfgang Lindner                           Lindner at math.uni-duisburg.de
   Gerhard-Mercator-Universitaet Duisburg  Tel: +49 0203 379-1326
   Fakultaet 4 - Naturwissenschaften       Fax: +49 0203 379-2528
   Institut fuer Mathematik,  LE 424
   Lotharstr. 65
   D 47048  Duisburg (Germany)




More information about the R-help mailing list