Toolbox update 2: Creating bias grids for MaxEnt modelling

Let’s say you’ve been travelling across Peninsular Malaysia looking for a particular animal or plant over the years and you’ve marked the GPS coordinates of its presence through an indirect sign (e.g., tracks or vocalizations) or an actual sighting. And one day, you decide to make a map of its distribution, but of course, you do not have the time and effort to look in every nook and cranny of the peninsula to make an accurate map. So wouldn’t you like to know potential places where your species might be found? Over the years, scientists have developed a range of species distribution models (SDMs) to help you do just that. SDMs try to establish a relationship between your species records and the environmental or spatial characteristics (e.g., rainfall, temperature, forest cover, land use types, distance to water sources) of your sampling area (Franklin 2009). In other words, SDMs help to predict where you might find other suitable habitats for your species – you don’t always have to depend on luck to go find them! One of the more popular types of SDMs is Maximum Entropy Modelling (see Phillips et al. 2006; Phillips and Dudík 2008). We won’t go through the statistical explanations for MaxEnt modelling, but you can refer to Elith et al. (2011). However, one limitation of presence-only data is the effect of sample selection bias, where some areas in the landscape are sampled more intensively than others (Phillips et al. 2009) – MaxEnt requires an unbiased sample and this applies to all SDMs. Two of Rimba’s researchers, Reuben and Sheema, were recently involved in a study on tapirs. In this study, some areas in Peninsular Malaysia were more intensively surveyed for tapirs than others and the predictions by MaxEnt were less biologically meaningful if this bias was not accounted for. So a bias grid was created to upweight presence-only datapoints with fewer neighbours in the geographic landscape. You can now create bias grids in R. Here’s a tutorial on how to do so.


Elith J, Phillips SJ, Hastie T, Dudík M, Chee YE, Yates CJ (2011) A statistical explanation of MaxEnt for ecologists. Diversity and Distributions 17:43-57 Franklin, J. (2009) Mapping species distributions: spatial inference and prediction. Cambridge University Press, Cambridge, UK. Phillips SJ, Anderson RP, Schapire RE (2006) Maximum entropy modelling of species geographic distributions. Ecological Modelling 190:231-259.

Phillips SJ, Dudík M (2008) Modeling of species distributions with MaxEnt: new extensions and a comprehensive evaluation. Ecography 31:161-175. Phillips SJ, Dudík M, Elith J, Graham CH, Lehmann A, Leathwick J, Ferrier S (2009) Sample selection bias and presence-only distribution models: implications for background and pseudo-absence data. Ecological Applications 19:181-197.


7 thoughts on “Toolbox update 2: Creating bias grids for MaxEnt modelling

  1. Okay, that makes sense. Will look forward to the real map! BTW, historical records of tapir include fossil molars from Batu Caves. I guess that site is no longer suitable…

  2. Sorry I meant decreasing probability towards the highlands. Typo.

    Let’s just wait for the map OK? Btw, that map on the post is just a bias grid of biased sampling effort of tapirs. It’s not the real distribution map 🙂

  3. Okay, now I am really confused. You found that there is a decreasing probability of finding suitable tapir habitats at lower elevations? If I am not mistaken, the literature points that large mammal density is negatively correlated with elevation (i.e. the most suitable natural habitat is in the lowlands). If hunting pressure means that tapirs have been extirpated from the lowlands this does not mean that lowland habitat is “unsuitable” – it just points to the need to control hunting. I am also a bit puzzled by “GPS points” for historical records (GPS was not around when the bulk of the historical records were recorded – although many of the points have been plotted on maps which are available in the literature and should be fairly straightforward to digitise).

    I am still not convinced on the usefulness of MaxEnt for mapping tapir distribution. If your objective is to highlight the importance of logged over forests, I really feel that the map is doing a big disservice. If I were a timber-latex freak I would take one look at the map and be like, hey, what’s the big deal, your map says that most of the logged-over forest is of “low” suitability for tapir. Very dangerous.

    Regardless of my feelings about MaxEnt, I do see this as a great opportunity to compile recent tapir sightings and display them on a map. I understand that last year Stephen Hogg got a camera trap shot of a tapir in Bukit Cherakah FR (3.1055491919739353, 101.50680541992188). So far there have been at least seven tapirs recorded from that location over the last few years. Over the last two years I’ve also seen tapir prints here: 3.169869, 101.785090; here: 3.268996,101.76109 and here: 4.552212,101.983595. About ten years ago I saw some tapir scat in the mineral soils part of Pekan FR on the banks of the Sg Bebar. All these areas are currently “low” suitability on the map.

    A number of obvious type i errors are apparent on your map: the mangroves in Matang (Perak) and Pulai (Johor). I am not aware of any tapir records from mangrove at any rate, they shouldn’t be of the same value as the main range which is known to have lots of tapirs. One other point, the literature suggests a maximum elevation of 2200 m asl – which does not appear to be factored in.

  4. Yup we used an altitude layer and there was a decreasing probability of finding suitable tapir habitats at lower elevations. Unfortunately, we did not use historical records as a background points. It would probably have produced a better map and we can do this exercise if you can furnish me the GPS points of historical records. Well in this era where conservation prioritization is important, I think distribution maps based on probability are valid – we are not saying that you should write of unsuitable areas. If you have limited time and resources, and if the tapir is one day threatened by over hunting, the map would tell you where’s best to look for them. One our main goals of doing that map was to underscore how important selectively logged forests are for mammal conservation (i.e., sounds logical but alas not all of us know that we shouldn’t just turn all of them into timber-latex clone plantations). MaxEnt showed that selectively logged forests cover more than 59% of suitable tapir habitats. Well reintroduction of species into their historical range is possible (Emkay also shares the sames sentiments), but limited conservation funds can be used more wisely. Alas, the conservative tapir population density estimates (from the same paper) indicate they seem to be doing well in Peninsular Malaysia (for now).

  5. Thanks for the quick reply. However, I still don’t get it. Why would you want to come up with a “finer resolution map”? We have known for more than a hundred years that tapirs are found on the main range. Does MaxEnt assign an altitude gradient? Does it show that density is negatively correlated with elevation? Does MaxEnt assign increased probabilities to areas where tapirs were seen recently (compared with historic records)? If it does any of these things then this would be interesting and potentially important for conservation. However, if it does not do these things then I fail to see what is achieved. Furthermore, there is a danger that areas displayed as having a low value would be written off unfairly (due to type ii error). Also, I take some objection to the fact that areas with no forest are written off as “unsuitable”. I would prefer to open peoples minds to the potential for restoration and reintroduction. We should be reminding people that tapir are naturally found throughout the peninsula and borneo (although no record from Singapore)!

  6. Hi Teck Wyn, thanks for your query. You are right to say that MaxEnt would be more suited for rare species. Short of painting the whole of the forests in the peninsula red to indicate tapir presence, we wanted to come up with a finer resolution map for its distribution. The final tapir distribution map, which I cannot post until the publication is accepted, indicates that the probability of finding tapirs in the Titiwangsa Mountain Range are lower compared to other areas based on several environmental covariates, even after assuming tapirs can be found in all the forested areas within the peninsula (i.e., background points for MaxEnt), including the Titiwangsa range. But the map is by no means final. The more tapir presence points we have, the better will be the model support!

  7. Hi guys,
    Very impressive mapping and statistics. I can see the advantage of this for species with naturally restricted ranges. However, what would be the point of using this method for identifying potential habitat for species such as tapir (which has long known to be distributed throughout the peninsula)?

Comments are closed.