Skip to main content Skip to navigation
CEREO maps

Research Profile: GLMM and Predictions

Tomorrow PhD Candidate Zoe Hanley will discuss generalized linear models  in R and making prediction maps for wolf distribution. Necessary packages are:

library(glmmADMB) #Generalized Linear Mixed Modeling (GLMMs). Includes zero-inflated distributions.
#Use download instructions from:
library(graphics) #temporal autocorrelation graphs
library(lattice) #PACK vs. YEAR graphs
library(bbmle) #AIC table
library(plyr) #create cross-validation progress bar

The data and script can be found below:





Simple Mapping in R

Today we discussed using the “maps” package and the “ggplot2” package to make simple maps in R.

Our test dataset is from the “rgbif” data package which makes use of publicly available data (see the “getting data” Topic). To deal with some of the georeferenced data we made use of the “dismo” package .

We made a basic map using ‘maps’:


And then took the same data and mapped it using ggplot2:


Because maps limits its field of view to the “states” basemap, whereas ggplot2 does not, we weren’t able to see this spurious detection way out in the middle of the ocean. Now that we see it, we used subset() to remove it and then made a fancy WSU themed cougar map using ggplot2:


The Script is here: simple-mapping