[GRASS-stats] Re: [GRASS-user] Testing i.pca ~ prcomp(),
m.eigensystem ~ princomp()
Nikos Alexandris
nikos.alexandris at felis.uni-freiburg.de
Wed Apr 1 19:33:21 EDT 2009
Markus:
> 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.
The "thing" is that with the SPOT data all seems fine and "i.pca ==
prcomp(x, center=TRUE, scale=FALSE)" which is not the case for the MODIS
bands I work with.
> 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
I think this depends on what you are trying to achieve. Of course,
components with small(-er) eigenvalues include more "noizzze". In my
change detection project I used *only* components with eigenvalues < 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>.
I didn't find the time to rescale and re-test. I will... at some
point :-)
> 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.
Kind regards, Nikos
More information about the grass-stats
mailing list