# NOT RUN {
# Load environmental predictors
data(predictors2005_2012)
envi <- predictors2005_2012
envi
# Realise a null model type #2 with BRT
#--------------------------------------
modelN2 <- SDMPlay:::null.model(xy=NULL,predictors=envi,type=2,algorithm='brt',
nb=300,unique.data=TRUE, same=TRUE, nb.rep=2,lr=0.0005)
# Look at the inputs used to implement the model
modelN2$input
# Get the evaluation of the models produced
modelN2$eval
# Get the evaluation of the mean of all these produced models (i.e. evaluation
# of the null model)
modelN2$eval.null
# Get the values of Spearman correlations between the all the prediction maps produced
modelN2$correlation
# Plot the mean null model map with nice colors
library(grDevices)
palet.col <- colorRampPalette(c('deepskyblue','green','yellow', 'red'))(80)
data('worldmap')
raster::plot(modelN2$pred.mean, col=palet.col)
points(worldmap, type="l")
# }
Run the code above in your browser using DataLab