[R-sig-eco] Vegan CCA - Problem in constraining variables
Gavin Simpson
gavin.simpson at ucl.ac.uk
Fri Jan 18 21:12:47 CET 2013
On Thu, 2013-01-17 at 17:50 -0200, Pedro Meirelles wrote:
> Hello everyone,
>
> This is my first post in this list and I am a new r user and I am not very
> experienced in multivariate analysis, sorry if my question is silly.
>
> I am trying to run a cca (vegan package) but I am encountering a problem: I
> want to constrain the analysis by all environment variables, but it do not
> happens. The program "choose" some of it. When I try to plot the results
> only these "automatic chosen" variables are ploted. I tried to run cca with
> vegan data (varespec and varechem) and it worked fine.
>
> There is something strange on the "Biplot scores for constraining
> variables" results. The CA's have only 0 values (bellow in yellow). I
> am writing the complet "Biplot scores for constraining variables" section.
>
> My data is like this:
>
> I have 9 samples (I will not show all data to reduce the email size).
>
> I have 9 environmental variables (nutrients).
> > env
> Depth Sal Nitrite Nitrate Amonia T_Org_N Silicate Total_I_P OrthoP
> Vit1 63 37.07 0.03 1.24 0.031 5.849 0.85 0.14 0.08
> Vit2 63 37.07 0.03 1.24 0.031 5.849 0.85 0.14 0.08
> Dav1 40 37.35 0.05 1.43 0.031 8.849 0.76 0.11 0.14
> Dav2 40 37.35 0.05 1.43 0.002 8.878 0.76 0.11 0.14
By the looks of those data, some of your env samples are repeated to
make the nine total samples. That won't help matters.
You can also run `alias(spp.cca)` to see which if any terms are linearly
dependent upon one another as that can also reduce the effective number
of contraints.
Bottom line, vegan used what it could of your data and you need to look
at your data to see what is wrong as you have it and we don't.
HTH
G
> .
> .
>
> I have 32 "species" (actually this is bacterial and archeal phyla). I will
> not show all columns to reduce the email size.
>
> > spe
> Acidobacteria Actinobacteria Aquificae ...
> Vit1 9 129 5 ...
> Vit2 14 154 8 ...
> Dav1 8 122 4 ...
>
>
> I am running the cca with the follow script:
>
> >library(vegan)
> >spe <- read.csv("cvt_org_test.csv", row.names=1)
> >env <- read.csv("test_chem2.csv", row.names=1)
> > spe.hel <- decostand(spe, "hellinger")
> > spe.cca <- cca(spe.hel,env)
> > summary(spe.cca) # Scaling 2 (default)
> Call:
> cca(X = spe.hel, Y = env)
>
> Partitioning of mean squared contingency coefficient:
> Inertia Proportion
> Total 0.06054 1.0000
> Constrained 0.03120 0.5154
> Unconstrained 0.02934 0.4846
>
> Eigenvalues, and their contribution to the mean squared contingency
> coefficient
>
> Importance of components:
> CCA1 CCA2 CCA3 CCA4 CA1 CA2
> CA3 CA4
> Eigenvalue 0.01906 0.006717 0.003055 0.002371 0.01433 0.007767
> 0.00482 0.002418
> Proportion Explained 0.31480 0.110960 0.050470 0.039170 0.23673 0.128300
> 0.07963 0.039940
> Cumulative Proportion 0.31480 0.425760 0.476230 0.515400 0.75213 0.880430
> 0.96006 1.000000
>
> Accumulated constrained eigenvalues
> Importance of components:
> CCA1 CCA2 CCA3 CCA4
> Eigenvalue 0.01906 0.006717 0.003055 0.002371
> Proportion Explained 0.61079 0.215280 0.097920 0.076010
> Cumulative Proportion 0.61079 0.826070 0.923990 1.000000
>
> Scaling 2 for species and site scores
> * Species are scaled proportional to eigenvalues
> * Sites are unscaled: weighted dispersion equal on all dimensions
>
>
> Species scores
>
> CCA1 CCA2 CCA3 CCA4 CA1
> CA2
> Acidobacteria 0.065258 0.038704 0.009574 -0.112006 0.0817235
> 0.0143286
> Actinobacteria 0.077451 0.049255 -0.046415 0.045290 0.0178117
> -0.0231979
> Aquificae 0.137472 -0.057698 0.017360 -0.017047 0.0859391
> -0.0749676
> .
> .
> .
>
> Site scores (weighted averages of species scores)
>
> CCA1 CCA2 CCA3 CCA4 CA1 CA2
> Vit1 -0.35189 -0.7507 -2.6425 -0.961233 -0.72976 0.08807
> Vit2 0.04988 -0.2552 -1.0121 0.321500 0.66991 -0.08085
> .
> .
> .
>
> Site constraints (linear combinations of constraining variables)
>
> CCA1 CCA2 CCA3 CCA4 CA1 CA2
> Vit1 -0.1424 -0.4923 -1.7924 -0.2924 -0.72976 0.08807
> Vit2 -0.1424 -0.4923 -1.7924 -0.2924 0.66991 -0.08085
> .
> .
> .
>
> Biplot scores for constraining variables
>
> CCA1 CCA2 CCA3 CCA4 CA1 CA2
> Depth 0.6576 -0.3701 -0.6555 -0.02914 0 0
> Sal -0.6385 0.3949 0.6603 0.01846 0 0
> Nitrite 0.5303 0.7679 0.1164 -0.33999 0 0
> Amonia -0.9195 0.1331 0.3570 0.09710 0 0
>
>
> Thank you very much for your help and support!
>
> All the best!
>
--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
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
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
More information about the R-sig-ecology
mailing list