[R-sig-Geo] Help with ENFA in R
JonathanAronson
jagaronson at gmail.com
Tue Apr 9 14:49:29 CEST 2013
Hello there
I am really hoping someone out there can help me. I have read the various
forums but havent found information that can help me.
I am running an ENFA in R for 12 species using 15 environmental variables.
Below is my code and some questions:
library(ade4)
library(adehabitat)
test<- read.csv("Species_Localities/R.blasii.csv", header=T)
var1<- import.asc("Data/bio_01.asc")
var2<- import.asc("Data/bio_12.asc")
var3<- import.asc("Data/Aridity.asc")
var4<- import.asc("Data/altitude.asc")
var5<- import.asc("Data/unpalatable.asc")
var6<- import.asc("Data/thicket.asc")
var7<- import.asc("Data/succulent.asc")
var8<- import.asc("Data/shrubland.asc")
var9<- import.asc("Data/rainforest.asc")
var10<- import.asc("Data/mosaic.asc")
var11<- import.asc("Data/mopane.asc")
var12<- import.asc("Data/misavanna.asc")
var13<- import.asc("Data/hydro.asc")
var14<- import.asc("Data/fynbos.asc")
var15<- import.asc("Data/desert.asc")
map<- as.kasc(list(bio_01 = var1, bio_12 = var2, Aridity = var3, altitude =
var4, unpalatable = var5, thicket = var6, succulent = var7, shrubland =
var8, rainforest = var9, mosaic = var10, mopane = var11, misavanna = var12,
hydro = var13, fynbos = var14, desert = var15))
enfatest<- data2enfa(map, test)
pc <- dudi.pca(enfatest$tab, scannf = FALSE, nf = 1)
enfatest1 <- enfa(pc, enfatest$pr, scannf = FALSE)
renfa <- randtest(enfatest1, nrepet=999)
list(enfatest1$m)
list(enfatest1$s)
list(enfatest1$co)
hist(enfatest1)
hist(enfatest1, scores = FALSE, type = "l")
image(enfatest1)
list(renfa$expvar)
list(renfa$pvalue)
list(renfa$obs)
scatter(enfatest1)
niche.test(map, test, nrep = 999, o.include = TRUE)
list(enfatest1$m) has given me the global marginality for each species and
those are:
Species Marginality
R.a 4.8
R.b 12.47
R.ca 19.27
R.cl 15.16
R.da 12.36
R.de 15.31
R.e 12.19
R.f 6.07
R.h 9.65
R.l 9.14
R.si 13.7
R.sw 13.11
I do not know how to get the global tolerance scores. Can you please help me
with that?
I also do not know what the randomisation test for ENFA does. Could you
please explain that?
I am unsure about what list(renfa$expvar), list(renfa$pvalue),
list(renfa$obs) are telling me. I get a p-value of 0.001.
I have tried to test the significance of my results using a Monte Carlo test
but i get this error when I run the code:
Error in niche.test(map, test, nrepet = 999, o.include = TRUE) :
should be an object of class SpatialPixelsDataFrame
Please can someone provide some assistance because I have been stuck with
this for months.
Thank you in advance
Jonathan
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Help-with-ENFA-in-R-tp7583243.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list