On Sun, 2010-06-27 at 17:56 -0300, Alexandre F. Souza wrote:
> Hi all,
> 
>    I am using vegan to run a pca on forest structural variables (tree
> density, basal area, average height, regeneration density) in R.
> However, I could not find out how to extract factor loadings
> (correlations of each variable with each pca axis).

Loadings on each axis are given by:

scores(ord, display = "species", scaling = 2)

where 'ord' is your fitted ordination. I this scaling, angles between
the vectors defined by the scores on axis 1 and 2 are correlations.

Loadings aren't correlations themselves, however, they define a vector
in space and you need to compute the angle between this vector and each
axis.

I forget exactly how to compute the correlation between the vector
representing the species in n dimensions (n = 2) and each axis; sounds
like some elementary trigonometry is required (estimate angles of a
triangle with sides of lengths given by axis 1 score [ax1], axis 2 score
[ax2] and sqrt(ax1^2 + ax2^2) i.e. from Pythagorean distance), but the
scores give you everything you need to do this except for the trig.

If you have further questions, post on R-SIG-Ecology list or the Vegan
help forums:

https://r-forge.r-project.org/forum/forum.php?forum_id=194&group_id=68

HTH

G

>  
>    Do anyone know how to do that?
> 
>    Thanks a lot,
> 
>    Alexandre
> 
> 
> 
> Dr. Alexandre F. Souza 
> Programa de Pós-Graduação em Biologia: Diversidade e Manejo da Vida
> Silvestre
> Universidade do Vale do Rio dos Sinos (UNISINOS)
> Av. UNISINOS 950 - C.P. 275, São Leopoldo 93022-000, RS  - Brasil
> Telefone: (051)3590-8477 ramal 1263
> Skype: alexfadigas
> [email protected]
> http://www.unisinos.br/laboratorios/lecopop
> 

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

Reply via email to