Skip to content

PCA functions

5 messages · glenn, Bjørn-Helge Mevik, Andrew +1 more

2 days later
#
"glenn" <g1enn.roberts at btinternet.com> writes:
Yes, there is: princomp(). :-)
#
The PCA is just a singular value decomposition on a sample covariance/
correlation matrix.  Do a search for ?svd and get the eigenvalues and
vectors from that function.
On Feb 14, 10:30?am, "glenn" <g1enn.robe... at btinternet.com> wrote:
#
Hi Glen, Andrew,
I believe that Bj?rn-Helge Mevik's point was that __if you read the
documentation__ you will see the argument "covmat" to princomp(). This,
really, is much more straightforward and practical than Andrew's suggestion.

Regards, Mark.
andrew-246 wrote:

  
    
#
sqrt(svd(x)$d) maybe 2 more operations than princomp(covmat=x), but it
is hardly a chore.
On Feb 16, 9:15?pm, Mark Difford <mark_diff... at yahoo.co.uk> wrote: