danlwarren / ENMTools

ENMTools R Package
100 stars 30 forks source link

Fatal Issue encountered when running enmtool.aoc for any ENMs #260

Open jomhoff opened 5 months ago

jomhoff commented 5 months ago

Hey Dan,

I've been having a blast using ENMTools!

However, I'm encountering an issue when using the enmtools.aoc function to perform any aoc with ENMs. For context, I currently am running this on a clade with 9 tips. When I tried to run the enmtools.aoc function for maxent, the code ran for a couple minutes before my R-session was aborted. It gave this error on every attempt.

Since it seems like this function is also running the maxent models I assume it could be a computational strain, but should be manageable. For each of my species I already have maxent models from the enmtools.maxent function. Is there a way that these could be supplied to the enmtools.aoc function to lessen the computation and avoid re-running?

After trying maxent, I tried running a GLM with only two variables to just check if it'll run. I set the reps to 50 and it failed after about 30 mins (fatal issue).

I am currently trying only 3 reps with the following code: glmfunct <- pres ~ bio1 + bio11 glm.aoc <- enmtools.aoc(clade = fas.clade, env = env, nreps = 3, overlap.source = "glm", f = glmfunct, metric = "D" )

Down the road I am planning on running enmtools.aoc with a glm and 14 env variables on a tree with 32 tips, so I am hoping this is solvable.

Any suggestions on why this may be happening? I currently have the most updated Rstudio and version 4.3.3 of R.

Thanks for all your help!

jomhoff commented 5 months ago

Update: Using a GLM model with 2 env variables and 3 replicates worked, but obviously not very applicable results. Tried upping the amount of reps and encountered the previous issue.

danlwarren commented 5 months ago

It's hard for me to know what's going on without actually having your data on hand, but there is a short term fix: you can feed the enmtools.aoc function an overlap matrix and it will just work from there instead of running the models itself.

On Sat, Apr 6, 2024 at 2:58 AM Jon @.***> wrote:

Update: Using a GLM model with 2 env variables and 3 replicates worked, but obviously not very applicable results. Tried upping the amount of reps and encountered the previous issue.

— Reply to this email directly, view it on GitHub https://github.com/danlwarren/ENMTools/issues/260#issuecomment-2040162063, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4YUCZLJKE3ISK6FJZUVMTY33C4BAVCNFSM6AAAAABFZK4GUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBQGE3DEMBWGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jomhoff commented 5 months ago

Hey Dan, thanks for getting back to me -- I'll try the overlap matrix!