[R] question about capscale (vegan)

Alicia Amadoz Alicia.Amadoz at uv.es
Mon Nov 27 15:37:48 CET 2006


Hi Gavin,

I have been analyzing real data (sorry but I am not allowed to post
these data here) and what I got was this,

mydistmat_f.cap <- capscale(distmat_f ~ F + L + F:L, mfactors_frame)

Warning messages:
1: some of the first 30 eigenvalues are < 0 in: cmdscale(X, k = k, eig =
TRUE, add = add)
2: Se han producido NaNs in: sqrt(ev)

> mydistmat_f.cap

Call:
capscale(formula = distmat_f ~ F + L + F:L, data = mfactors_frame)

              Inertia Rank
Total          0.3758
Constrained    0.2110    4
Unconstrained  0.1648    4
Inertia is squared  distance
Some constraints were aliased because they were collinear (redundant)

Eigenvalues for constrained axes:
     CAP1      CAP2      CAP3      CAP4
1.679e-01 2.954e-02 1.349e-02 1.233e-05

Eigenvalues for unconstrained axes:
     MDS1      MDS2      MDS3      MDS4
1.388e-01 2.601e-02 4.076e-05 2.064e-07

So, by these results I can tell that there are 4 axes that explain
0.1648 of the total variance and another 4 axes that explain 0.2110 of
the total variance. But I don't understand the difference between
constrained and unconstrained.

> anova(mydistmat_f.cap)

Permutation test for capscale under direct model

Model: capscale(formula = distmat_f ~ F + L + F:L, data = mfactors_frame)
         Df    Var      F N.Perm Pr(>F)
Model     4   0.21 1.2798 400.00 0.0875 .
Residual  4   0.16
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

> summary(anova(mydistmat_f.cap))
       Df         Var               F             N.Perm        Pr(>F)
 Min.   :4   Min.   :0.1648   Min.   :1.280   Min.   :200   Min.   :0.12
 1st Qu.:4   1st Qu.:0.1764   1st Qu.:1.280   1st Qu.:200   1st Qu.:0.12
 Median :4   Median :0.1879   Median :1.280   Median :200   Median :0.12
 Mean   :4   Mean   :0.1879   Mean   :1.280   Mean   :200   Mean   :0.12
 3rd Qu.:4   3rd Qu.:0.1994   3rd Qu.:1.280   3rd Qu.:200   3rd Qu.:0.12
 Max.   :4   Max.   :0.2110   Max.   :1.280   Max.   :200   Max.   :0.12
                              NA's   :1.000   NA's   :  1   NA's   :1.00

Then, I want to know the sum of squares of anova to check with other
analysis that we performed but I can't see them by the output of anova.
Besides, I am wondering if there is any manner to identify the main
effects, factor effects and interaction in this anova analysis. I would
be very grateful if you could help me to understand these results.

Thank you very much,
Alicia



More information about the R-help mailing list