[R] pca

Christian Hennig hennig at stat.math.ethz.ch
Wed Apr 30 11:59:01 CEST 2003


Hello,

the first thing you should do is to look at your data. You should know if
there are Inf, NaN, or NA values. I do not more about princomp's facilities
to handle such values than the help page says, but PCA with infinite values
does definitely not make sense. You should omit, correct or replace these
values (the latter two options only if you have subject-matter information how
to do this properly). 

Christian

On Wed, 30 Apr 2003, Martin Wegmann wrote:

> Hello,
> I tried to compute a PCA of values derived from satellite imagery but
> with princomp I get the following output:
> 
> >  pca.late <- princomp(late, na.action=na.fail)
> Error in cov.wt(z) : x must contain finite values only>
> 
> the datasets are values from satellite imagery, therfore I assume they
> are finite. But if not is there a way to minimize the decimal place?
> 
> I tried prccomp as well but I don't understand this output at all and I
> can't add "na.action=na.pass" what I thought could be the problem.
> 
>  pcalate<-prcomp(late,scale=T)
> Error in svd(x, nu = 0) : NA/NaN/Inf in foreign function call (arg 1)
> 
> any idea how to fix it?
> 
> thanks in advance, cheers Martin
> 
> 
> --
> Martin Wegmann
> Department of Animal Ecology and Tropical Biology
> Zoology III, Biocenter
> Am Hubland
> 97074 Würzburg
> Germany
> 0931/888-4378
> wegmann at biozentrum.uni-wuerzburg.de
> m.wegmann at web.de
> 
> 

-- 
***********************************************************************
Christian Hennig
Seminar fuer Statistik, ETH-Zentrum (LEO), CH-8092 Zuerich (currently)
and Fachbereich Mathematik-SPST/ZMS, Universitaet Hamburg
hennig at stat.math.ethz.ch, http://stat.ethz.ch/~hennig/
hennig at math.uni-hamburg.de, http://www.math.uni-hamburg.de/home/hennig/
#######################################################################
ich empfehle www.boag.de



More information about the R-help mailing list