[GRASS-stats] Re: [GRASS-user] Testing i.pca ~ prcomp(), m.eigensystem ~ princomp()

Markus Metz markus.metz.giswork at googlemail.com
Wed Apr 1 11:59:16 EDT 2009


Edzer Pebesma wrote:
> Markus Metz wrote:
>   
>>> I'm more familiar with non-spatial PCA, so it's high time I read the
>>> manual of i.pca, and the new wiki page on it...
>>>     
>>>       
> I think there's no such thing as spatial or non-spatial PCA. There's
> just PCA.
>   
That was a feeble attempt to buy time to go through some statistics 
literature ;-)

So it seems that this thread is about the different values for 
eigenvalues. AFAIKT, the answer is in the very first post of this thread 
[1]. It seems that i.pca output is supposed to be identical to 
prcomp(center=FALSE, scale=FALSE) output in R, because a PCA is 
scale-sensitive and the eigenvalue as reported by i.pca is the variance 
of the raw, unstandardised data. If outputs are not identical, either R 
or grass do some hidden modification or there is a bug in either grass 
or R (all within limits, e.g. identical up to the 5th digit in 
scientific format is fine?).

Some textbooks give a rule of thumb for further analysis to use only 
components with an eigenvalue >=1 which obviously only works if the 
eigenvalue is calculated from standardised values (center=TRUE, 
scale=TRUE or e.g. r.mapcalc standardised_map = (map - mean) / stddev). 
E.g., comparing the results of MODIS raw and MODIS scaled with 0.0001 
should give <eigenvalue #x of MODIS scaled> = 1E-8 * <eigenvalue #x of 
MODIS raw>.

BTW, the rescaling method of i.pca is not very convincing, as pointed 
out by Augustin Lobo. IMHO, fool-proof would be normalization (x - mean) 
/ stddev.

[1] http://lists.osgeo.org/pipermail/grass-user/2009-March/049306.html


More information about the grass-user mailing list