Writing response curve plot data ENMeval

834 views
Skip to first unread message

Wouter Beukema

unread,
Sep 25, 2021, 9:06:32 PM9/25/21
to Maxent
Hi all,

Could you advise me on how, after running ENMeval::ENMevaluate, data underlying the marginal response curves for the predictor variables can be written/exported? I'm not managing to find out where in the ENMevaluation object these data are stored.

Thank you so much, all the best,

Wouter

Jamie M. Kass

unread,
Sep 26, 2021, 4:39:20 AM9/26/21
to Maxent
Wouter,

You can use dismo::response(e@models[[1]]), where e is the output of ENMevaluate(). This would give you the marginal response curves for each variable for the first model in the e@results table.

Jamie

Wouter Beukema

unread,
Sep 26, 2021, 7:58:32 AM9/26/21
to Maxent
Perfect, thank you, Jamie!

Op zondag 26 september 2021 om 10:39:20 UTC+2 schreef Jamie M. Kass:

Ione Arbilla

unread,
Nov 4, 2021, 11:35:28 PM11/4/21
to Maxent
Hello,

Is there a way to achieve a second set of response curves, in which each curve is made by generating a model using only the corresponding variable, disregarding all other variables? In the same way that the Maxent program does.

The same outcome the image shows.

Cheers,

Ione
curves.png

Humayun Khattak

unread,
Nov 9, 2021, 12:56:35 AM11/9/21
to max...@googlegroups.com
Hello,

How can be the worldclim data used to study specific location. The whole dataset downloaded from worldclim is of the globe while I need specifically for Pakistan. How can I clip Pakistan dataset from the whole?

--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxent+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/maxent/0652dc7c-ce13-4a21-817f-7f7826d1967cn%40googlegroups.com.

Cooper Marcus

unread,
Nov 9, 2021, 11:44:50 AM11/9/21
to max...@googlegroups.com
Crop the data in a tool like QGIS - there is lots of help online for this very simple operation.

Humayun Khattak

unread,
Nov 9, 2021, 12:34:22 PM11/9/21
to max...@googlegroups.com
Hello,

thanks for your response,

After cropping the region, how should I use this in maxent. Can you explain to me? or you have any tutorial link that properly explains it.I have checked many tutorials but all in vain to fix the issue.

or If you have some time to teach me through a zoom call.

Regards
Muhammad Humayun 
Research Associate, Pollen Allergies and Human Health in Times of Climate Change
COMSATS University Islamabad, Pakistan



Jamie M. Kass

unread,
Nov 9, 2021, 7:29:33 PM11/9/21
to max...@googlegroups.com
Ione,

There is no functionality for this at present in R as I know, but you could make them yourself by running over the variables in a for loop, building a model using the chosen settings with each, then using dismo::response. Using par(mfrow=c(x,y)), where x and y are the dimensions of the plots you want would do the trick.

Jamie

--
You received this message because you are subscribed to a topic in the Google Groups "Maxent" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/maxent/LjyYh0uEcMk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to maxent+un...@googlegroups.com.

Jamie M. Kass

unread,
Nov 9, 2021, 7:37:42 PM11/9/21
to max...@googlegroups.com
Humayun,

Not sure which tutorials you looked at, but the Brief Tutorial on Maxent (https://biodiversityinformatics.amnh.org/open_source/maxent/Maxent_tutorial_2021.pdf) is a good resource for understanding how the software works. My ENMeval vignette goes through the analysis from start to finish (https://jamiemkass.github.io/ENMeval/articles/ENMeval-2.0.0-vignette.html), and there is also a dismo vignette (https://rspatial.org/raster/sdm/). It's good to read some of these resources and follow them through at the beginning, as they'll probably answer most of your initial questions.

Jamie

You received this message because you are subscribed to a topic in the Google Groups "Maxent" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/maxent/LjyYh0uEcMk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to maxent+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/maxent/CAE2uBwmWNGn%2BGPmq7rDwH5T3qPz9Nf-91LBGJGHGk%3DtbqJ1EMQ%40mail.gmail.com.

Ione Arbilla

unread,
Nov 9, 2021, 10:15:43 PM11/9/21
to max...@googlegroups.com
It occurred to me that one possibility was to calculate one model per variable, but when I only add just one predictor variable, an error comes up in ENMevaluate. The weird thing is that those same argument settings work when I add at least 2 variables in the stack, so I can figure out why there is a problem with the number of rows. This is the error that comes up:

AWC_model<-ENMevaluate(occs = occs_Train_R, envs = AWC_15_30_stack, bg = bg5,
 algorithm = "maxent.jar", partitions = 'checkerboard2',
tune.arg=list(fc = c("LQHPT"),rm=1), parallel=TRUE,numCores = 35)


*** Running initial checks... ***

* Clamping predictor variable rasters...
* Model evaluations with hierarchical checkerboard (4-fold) cross validation...

*** Running ENMeval v2.0.2 with maxent.jar v3.4.4 from dismo package v1.3.5 ***

  |                                                                                                           |   0%
Of 48 total cores using 35...
Running in parallel using doSNOW...
  |===========================================================================================================| 100%Error in { :
  task 1 failed - "arguments imply differing number of rows: 23719, 0"




Hau idatzi du Jamie M. Kass (ndimhy...@gmail.com) erabiltzaileak (2021 aza. 10, az. (10:59)):

Ione Arbilla

unread,
Nov 9, 2021, 10:35:46 PM11/9/21
to max...@googlegroups.com

I just used the maxent function of the dismo package to calculate the models with individual variables and it works fine. So I am going to use that instead.  If someone can sort it out in ENMeval, I am still interested!


Thank you so much for your help Jamie,


Ione

Hau idatzi du Ione Arbilla (ione.a...@gmail.com) erabiltzaileak (2021 aza. 10, az. (13:45)):

Jamie M. Kass

unread,
Jan 9, 2022, 5:42:00 AM1/9/22
to Maxent
Yeah, ENMeval doesn't let you run ENMevaluate() with just one variable. I should probably fix this, but then again it is not advisable. Maxent is a machine-learning algorithm that excels at handling a bunch of variables and sorting through them to figure out which are best for your data (and this improves through tuning exercises). If you plan to use a single variable to make a super simple model, Maxent is probably not the best choice. In this case, I'd use a regular logistic regression model (GLM).

Also, if you want to get marginal response curves, running models with one variable is not how you do it. The point of the marginal response curve is that you have a model with multiple predictor variables and you want to see the marginal response of one of the variables. You get it by setting all the other variables to their means (or medians) and making predictions on a range of that one variable. This tells you how suitability is affected by that one variable when all the others are held constant.

ENMeval doesn't do this because dismo already does it pretty well.

Hope this makes sense.

Jamie Kass
JSPS Postdoctoral Researcher
Okinawa Institute of Science and Technology Graduate University
Reply all
Reply to author
Forward
0 new messages