Producing ENFA derived suitability maps with adehabitat
Dear Alexandre, I think that this should be doable. Once you run the ENFA to estimate the habitat model, copy the values of new rasters (future habitat) and replace the original values in the "" object. Then simply re-run the predict.enfa method e.g.: # prepare the dataset for ENFA:
beidata <- data2enfa(as.kasc(list(dem=import.asc("dem.asc"), grad=import.asc("grad.asc"),
twi=import.asc("twi.asc"), achan=import.asc("achan.asc"))), bei.sub.pnt at coords)
# run ENFA:
enfa.bei <- enfa(dudi.pca(beidata$tab, scannf=FALSE), beidata$pr, scannf=FALSE, nf=2)
# same area, new environmental conditions:
beidata.new <- data2enfa(as.kasc(list(dem=import.asc("dem_new.asc"),
grad=import.asc("grad_new.asc"), twi=import.asc("twi_new.asc"), achan=import.asc("achan_new.asc"))),
bei.sub.pnt at coords) # needs to have the same mask!
enfa.bei.new <- enfa(dudi.pca(beidata.new$tab, scannf=FALSE), beidata.new$pr, scannf=FALSE, nf=2)
# copy the model parameters fitted previously:
enfa.bei.new$m <- enfa.bei$m enfa.bei.new$s <- enfa.bei$s enfa.bei.new$lw <- enfa.bei$lw enfa.bei.new$li <- enfa.bei$li enfa.bei.new$co <- enfa.bei$co enfa.bei.new$mar <- enfa.bei$mar bei.dist.new <- predict(enfa.bei.new, beidata.new$index, beidata.new$attr)
...something like this (I am not really sure which parameters do you have to copy, but the $tab data.frame certainly needs to be replaced with new predictors). Let me know if it works. cheers, T. Hengl http://spatial-analyst.net/wiki/index.php?title=Species_Distribution_Modelling
-----Original Message----- From: r-sig-geo-bounces at stat.math.ethz.ch [mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of Alexandre VILLERS Sent: Monday, September 07, 2009 9:31 AM To: Aide R SIG GEO; r-sig-ecology at r-project.org Subject: [R-sig-Geo] Producing ENFA derived suitability maps with adehabitat Dear list(s) 'members, I have a dataset representing the position of a species over a large region for 3 different years (2000, 2004 and 2008) and seven ecogeographical variables. Given that the study takes place on an agricultural region, the landscape changes every year at fine scale and there is a long term trend in crops sowed, leading me to account for between years variability. I would like to use the niche determined by the landscape and location of birds in 2000 and then, appply this niche over the landscape in 2004 and 2008 (this would, I believe, give me a first answer on whether changes in birds' location are due to a decrease in habitat suitability or birds). I have already computed ENFA with adehabitat (using the doc provided with the package "adehabitat" and the www.spatial-analyst.net of T. Hengl) but I don't see how exactly using the result of an ENFA on a "new" landscape... Any link or help would be welcome. Alex -- Alexandre Villers PhD Student Team "Biodiversity" Centre d'Etudes Biologiques de Chiz?-CNRS UPR1934 79360 Beauvoir sur Niort Phone +33 (0)5 49 09 96 13 Fax +33 (0)5 49 09 65 26 __________ Information from ESET Mail Security, version of virus signature database 4401 (20090906) __________ The message was checked by ESET Mail Security. http://www.eset.com
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo