## Not run:
# #Load the data
# data("IslandBirds")
# data("Daily_Cov")
# data("siteCov")
#
# #Model the abundance for 5 bat species and calculate alpha diversity from that
#
# BirdDiversity <-diversityoccu(pres = IslandBirds, sitecov = siteCov,
# obscov = Daily_Cov,spp = 5, form = ~ Day + Wind + Time + Rain +
# Noise ~ Elev + AgroFo + SecVec + Wetland + Upland)
#
# #Select the best model that explains diversity using genetic algorithms
# set.seed(123)
# glm.Birdiversity <- model.diversity(BirdDiversity, method = "g")
#
# #see the best models
#
# glm.Birdiversity$Best.model
#
# #plot the response of diversity to individual variables
#
# plot(glm.Birdiversity, elev)
#
# #To add the quadratic components of models
#
# glm.birdiversity <- model.diversity(BirdDiversity , method = "g", squared = TRUE)
#
# responseplot.diver(glm.birdiversity, Elev)
# ## End(Not run)
Run the code above in your browser using DataLab