Open aanaranjo opened 7 months ago
I ran into this same issue recently. I found the documentation a little scarce around how to make predictions. Try changing args = "outputformat=cloglog" to type="cloglog".
I did this a little differently than you did, though, by using dismo::predict(env, mod@models[[1]], type="cloglog")
Sorry for the confusion. In ENMeval 2.0.5, you can do the following:
future.raster <- maxnet.predictRaster(mod, envs.future, pred.type = "cloglog", doClamp = TRUE)
The reason you got negative results was because you were predicting exponential values. This was because you were using args = "outputformat=cloglog"
, which is only for maxent.jar. I wish this was simpler, but the way the two Maxents are run is fundamentally different.
I've been encountering some issues interpreting a future projection of an ENMEval model. While as the scale for the present-day model is on a 0-1 scale, the projected model ASCII is on a -9 to -24 scale. This understandably makes interpreting the projection output difficult. The only warning we receive is a missing data for certain cells (which are then labeled as NA). Any idea what could be going wrong in the projection step? Thank you in advance!
These are the lines of code we use to project the ENMEvaluate model:
futureStack <- setMinMax(futureStack)
projection(futureStack) <- "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs" plot(futureStack[[1]])
Extract predictor variables values for the reference records; should ideally be the occurrences + background
ref.vals <- raster::extract(stack, bg, method = 'simple', na.rm = TRUE)
Clamp variables
f_envs <- clamp.vars(futureStack, ref.vals, left = NULL, right = NULL, categoricals = NULL)
Future predictions for our optimal model
os <- list(validation.bg="partition", doClamp=TRUE, args=c("outputformat=cloglog")) future <- enm.maxnet@predict(Mod2pred, f_envs, other.settings = os)