Skip to content

randtest.enfa {adehabitat}

10 messages · Clément Calenge, Consuelo Hermosilla, Mathieu Basille

#
It is not possible to use the function scatter to plot the result of a 
randomization test.
I do not understand your question here...
Best regards,

Cl?ment Calenge
3 days later
#
Consuelo,

Here are some elements that you might find useful.
Yes they are. Look at the $co element of the enfa object. Following the 
example in ?enfa:

 > enfa1$co
               Mar        Spe1
forets  0.7178829  0.29304902
hydro   0.0977121 -0.94018385
routes -0.5394778  0.15001749
artif   0.4290224 -0.08758622

It gives you the coordinates of the arrow. The starting point of the 
vector is the average availability which is centred on zero.
You should interpret the scatter plot qualitatively. E.g. in the example 
of ?enfa, the marginality is very strong on "forets" (forest) with a 
shift towards high values, on "routes" (roads) with a shift on low 
values, and to a lesser extent on "artif" (artificial areas) with a 
shift on high values. On the other hand, the specialization is very 
pronounced on "hydro" only, with a restriction around the mean (you have 
to look at the specific distributions on this particular variable to say 
more about it).
You can indeed compute such an index. But now, how would you interpret 
it? The only case it could be useful is the comparison of two niches in 
the same environment, i.e. same availability. Two study sites cannot be 
compared on such basis. So that it would give you an idea of a global 
specialization that is totally context dependent. This is why it is not, 
from my point of view, very useful.
It is conceptually the inverse of the specialization: the specialization 
is a ratio of variances (available over used) while the tolerance is the 
sum of used variances over all variables (which is similar to divide it 
by an available variance of 1). You might have a look at ?niche.test for 
a global measure of tolerance.
Maybe try:

sum(dudi.pca(kasc2df(map), row.w = dataenfa1$pr/sum(dataenfa1$pr), 
scan=FALSE)$eig)

which gives you 5 only. The weights should sum to 1 (i.e. they are 
proportions). But then, how would you interpret this? This is the same 
as for the "global specialization".
There is no way to give a percentage of variation for a specialization 
axis, by nature: the eigenvalue of each axis gives you a ratio of 
variance. E.g. an eigenvalue of 12 tells you that the available variance 
on this axis is 12 times higher than the used variance. It is up to you 
to interpret this (is it a strong specialization or not).
No problem about it. The ENFA, however, should be seen as a very elegant 
way of exploring the data, at the manner of a PCA (and the 
interpretation is in many ways similar, when you take into account the 
specificity of the analysis).

Hope this helps a bit,
Mathieu.

  
    
#
Yes, but be careful: kasc2df returns a list with one component "tab" 
(the component of interest) and one component "index" (the component 
allowing to rebuild the original kasc), so that the correct code is:

sum(dudi.pca(kasc2df(map)$tab, row.w = dataenfa1$pr/sum(dataenfa1$pr), 
scan=FALSE)$eig)


Best,

Cl?ment Calenge
#
On 06/09/2010 09:05 AM, Cl?ment Calenge wrote:
I was a bit too hasty for this reply. Actually the code is incorrect. 
Consider the following code:

pc <- dudi.pca(kasc2df(map)$tab, row.w = dataenfa1$pr/sum(dataenfa1$pr))

This code performs a *centered and scaled* PCA of the environmental 
variables: this analysis first centers and scales the table containing 
the value of the environmental variables. Therefore, for each variable 
of pc$tab, the mean *weighted by the utilization weights* is equal to 
zero and the variance *weighted by the utilization weights* is equal to 
1. Therefore, the sum of the eigenvalues of the PCA on this transformed 
table is equal to the number of environmental variables. This code is 
incorrect (thanks Mathieu for noting the inconsistency). First, to 
calculate the global tolerance, you would need to calculate:

pc <- dudi.pca(kasc2df(map)$tab, scan=FALSE)

This preliminary analysis is performed just to center/scale the 
variables with uniform weighting. This allows to compare the different 
variables in pc$tab (they all have the same average and the same scale). 
*Then*, calculate the weighted and *unscaled* PCA of the table pc$tab:

sum(dudi.pca(pc$tab, scale=FALSE, row.w = 
dataenfa1$pr/sum(dataenfa1$pr), scan=FALSE)$eig)

This gives the tolerance of the species on the area,
Sorry for the confusion,
HTH,

Cl?ment Calenge
4 days later
1 day later
#
Consuelo,
Yes it is. You can double check it with niche.test:

bla <- niche.test(map, lynxjura$locs[tmp, c("X", "Y")])
bla$obs
0.1450481 3.1297832

The first value is the marginality (same as in enfa1), the second one is 
the tolerance.
Not necessarily. But I guess you will find different definitions of 
(global) tolerance and (global) specialization according to different 
sources.

In any cases, I would not recommend the use of a *global* 
tolerance/specialization index, unless it is used to compare:

- two species in the same study area
- the same species in two periods, given that the environment does not 
change.
According to Hirzel et al. (2002)'s definition, it should be divided by 
the number of specialization axes. It is just the mean eigenvalue of 
specialization, which can be seen as a way to define a global 
specialization. Now, as I said before, it is difficult to use it as is.
My guess: the S = 1/T relation only hold on one dimension, but not in 
the N-dimensions ecological space. Could be wrong, though. Anyway, 
Hirzel et al. (2002)'s definition of specialization cannot not be used 
in this context.
Now I see. The d=1 that you have in the upper-right corner just holds 
for the projection of pixels (simplified with the use of MCPs). Try the 
following:

 > scatter(enfa1, pts = TRUE)
 > summary(enfa1$li)

which should help. The arrows are just proportional to their real 
values, in order to adequately fit in the graph.

Regards,
Mathieu.