Duccio Rocchini ducciorocchini at gmail.com
Sun Oct 16 18:35:25 EDT 2011

```Dear Gaspar

just seen your message in the queue...

You are definitively right. Each input value should be multiplied by
the corresponding eigenvector after the covariance matrix
(unstandardized PCA) or the correlation matrix (standardized PCA) have
been built.

PC1 = eigenvector1*input1+eigenvector2*input2+eignevectorn*inputn
PC2 = eigenvector1*input1+eigenvector2*input2+eignevectorn*inputn
...
PCn = eigenvector1*input1+eigenvector2*input2+eignevectorn*inputn

where n=number of dimensions.

In some books the eigenvectors are also referred to as "loadings" but
they have nothing to deal with W in the wiki page [0].

This correction in [0] reads ok:
r.mapcalc 'pc.1 =  .4372107421*map.1 +.7210155161 *map.2 + .5375717557*map.3'
r.mapcalc 'pc.2 = -.8309940700 *map.1 + .0952787255*map.2 + .5480609638*map.3'
r.mapcalc 'pc.3 =   .3439413070*map.1 - .6863370819*map.2 +  .6408165005*map.3'

factor analysis is also provided by Basilewsky [1]. In general terms
calculated) between variables and factors. In this case between maps
and PCs,

[0] http://grass.osgeo.org/wiki/Principal_Components_Analysis
[1] Basilevsky, A., 1994. Statistical Factor Analysis and Related
Methods: Theory and Applications. Wiley.

P.S.1 Obviously no corrections must be made on matrices being used in
[0] since the same results hold for both standardized and
unstandardized PCA being:
covariance matrix of standardized data = correlation matrix
once data have been standardized simply by subtracting the sample mean
and dividing by standard deviation.

P.S.2 Dealing with Principal Component Analysis, it is nice that you

Best!
Duccio

--
Duccio Rocchini, PhD

Edmund Mach Foundation
Research and Innovation Centre
Department of Biodiversity and Molecular Ecology
GIS and Remote Sensing Unit
Via Mach 1, 38010 San Michele all'Adige (TN) - Italy
Phone +39 0461 615 570
ducciorocchini at gmail.com
duccio.rocchini at iasma.it
skype: duccio.rocchini
web page: http://gis.cri.fmach.it/rocchini/

Best!
Duccio

>
> Message: 2
> Date: Sun, 28 Aug 2011 19:21:57 -0500
> From: Gaspar Reyes P?ndigo <gos47 at hotmail.com>
> To: grass-user at lists.osgeo.org
> Message-ID: <BLU0-SMTP3087C1EAE2EA8A01379D31B7140 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi, dear grass-users
>
> The new dimensions (principle components) are formed from the eigen vector (1, 2, 3), not of the factor loadings (W). Therefore there is an error in the GRASS-wiki - Principal Components Analysis, the line of code error is copied below:
>
> ###########################################################
> Using the W vector, new maps can be created :
>
> r.mapcalc 'pc.1 =  385.6992*map.1 +636.0665*map.2 + 474.2358*map.3'   r.mapcalc 'pc.2 = -364.5920*map.1 + 41.8027*map.2 + 240.4573*map.3'    r.mapcalc 'pc.3 =   37.4824*map.1 - 74.7964*map.2 +  69.8356*map.3'
>
> ###########################################################
>
> Correct me if i'm wrong?
>
>
> REFERENCES
>
> 1. Baronti, S., R. Carla, S. Sigismondi & L. Alparone. 1994. Principal component analysis for change detection on polarimetric multitemporal SAR data, Pp: 2152-2154 vol.2154, In: Geoscience and Remote Sensing Symposium, 1994. IGARSS '94. Surface and Atmospheric Remote Sensing: Technologies, Data Analysis and Interpretation, International.
>
> 2.Fung, T. & E. LeDrew. 1987. Application of Principal Components Analysis to Change Detection. Photogrammetric Engineering & Remote Sensing. 53(12): 1649-1658.
>
> 3. Singh, A. & A. Harrison. 1985. Standardized principal components. International Journal of Remote Sensing. 6(6): 883-896.
>
> ------------------------------
>
> Gaspar Reyes Póndigo
> Universidad del Mar, Oaxaca, México
> Campus Puerto-Ángel
> Carretera principal Puerto Ángel Zipolite km 1.5
> C.P. 70902
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110828/bf7436be/attachment-0001.html
>
> ------------------------------
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
> End of grass-user Digest, Vol 64, Issue 45
> ******************************************
>
```