[R] princomp with more coloumns than rows: why not?

Liaw, Andy andy_liaw at merck.com
Thu Oct 16 14:05:56 CEST 2003


In the `Detail' section of ?princomp:

princomp only handles so-called Q-mode PCA, that is feature extraction of
variables. If a data matrix is supplied (possibly via a formula) it is
required that there are at least as many units as variables. For R-mode PCA
use prcomp. 


Andy

> -----Original Message-----
> From: bhx2 at mevik.net [mailto:bhx2 at mevik.net] 
> Sent: Thursday, October 16, 2003 5:14 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] princomp with more coloumns than rows: why not?
> 
> 
> As of R 1.7.0, princomp no longer accept matrices with more 
> coloumns than rows.  I'm curious:  Why was this decision made?
> 
> I work a lot with data where more coloumns than rows is more 
> of a rule than an exception (for instance spectroscopic 
> data).  To me, princomp have two advantages above prcomp: 1) 
> It has a predict method, and 2) it has a biplot method.
> 
> A biplot method shouldn't be too difficult to implement (I 
> believe I've seen one on R-help).
> 
> A predict method seems to be more difficult, because the 
> prcomp object doesn't include the means that need to be 
> subtracted from the new data.  Would it break conformance 
> with S to let prcomp return the means as well?
> 
> -- 
> Sincerely,
> Bjørn-Helge Mevik
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list 
> https://www.stat.math.ethz.ch/mailman/listinfo> /r-help
>




More information about the R-help mailing list