sylvainschmitt/SSDM

Stacked species distribution models (SSDMs)

Alemoraca opened this issue · 1 comments

Hello,
My doubt is about generating the model with de SSDM function in R (I use RStudio). I don´t know why, but at first, with the environmental variables and with de occurrences it seems to be all fine, but when I try to do the model with the SSDM function (that I follow from https://cran.r-project.org/web/packages/SSDM/vignettes/SSDM.html) it just get stuck saying "Opening clusters, 1 cores, Exporting environment to clusters..." and that´s it. I already tried several times to let it "run" but it only stays there for a long time, once I got the following error "Error in stack_modelling(c("CTA", "SVM"), Occurrences, Env, Xcol = "LONGITUDE", :
Less than two species models were retained, you should lower the ensemble threshold value (ensemble.thresh parameter).", buth I already had the ensemble.thresh in "0". So can you help me please? what can I do to make this run?

I'll add my script for what it's worth

load_var(format =".tif")->Env
Env
occ <- load_occ(path = getwd(), Env, file = "Occurrences.csv", Xcol = 'LONGITUDE', Ycol = 'LATITUDE', sep = ',')
head(occ)

-----up to here everything works-----
Then...
(Here is where it get stuck...)

SSDM <- stack_modelling(c('CTA', 'SVM'), Occurrences, Env, Xcol = 'LONGITUDE', Ycol = 'LATITUDE', Spcol ="SPECIES", rep=1, ensemble.thresh=c(0))

I really appreciate your reply as soon as possible, thanks

Hi! Well there's two things I notice straightaway:

  1. Why do you run in parallel on 1 core, this doesn't make sense? The default should be sequential, just to be sure you can force it with cores=0 and see if that works.
  2. You assigned the occurrence data to occ, however in the modelling function you use Occurrences