GEOG 566

         Advanced spatial statistics and GIScience

May 1, 2017

Tutorial 1: Assessing distribution shifts in kernel density probability surfaces

Filed under: Tutorial 1 2017 @ 1:48 pm

Overview: question & approach

Identifying spatial repulsion and/or shifts in distribution are often examined to identify interspecific competition effects. Therefore, I wanted to assess the distribution of cougar kill sites including the spatial clustering and frequency in pre- and post-wolf time periods focusing on identifying shifts. A simple solution to my presence only data (kill events) was to create a density feature. However, there are several elements in my data sets, besides the presence of wolves, which could produce a shift in kill density or distribution that I will need to account for including: 1) catch-per-unit effort discrepancies (i.e. larger sample sizes of cougars (and kill sites) in one data set), or 2) time effects from seasonal distribution shifts (i.e. prey migration patterns). Before getting into an investigation of causal mechanisms, a first step is to determine if there are differences in where cougar are killing prey between study time periods by asking:

Is the distribution of post-wolf cougar kill sites different than the distribution of pre-wolf cougar kill sites?

There are two ways to assess this question. For the purposes of this analysis the data would be “location, implicit” with the variable of interest (cougar kill sites post-wolf) having a covariate (cougar kill site density/distribution pre-wolf) measurable at each sampled location and the causal mechanism inferred from co-variation. Density measures for each kill site could be pulled from the density feature raster created, but would be most relatable on a prey species level since elk and mule deer behave differently at a landscape level. Alternatively, an isopleth (or contour line) probability surface created from the density features could be used to calculate the proportion of post-wolf cougar kill sites within specified probability features of the pre-wolf cougar kill site distribution.


My approach to this question was to relate the proportion of post-wolf cougar kill sites (points) to the pre-wolf cougar kill site density (raster) using the probability contours (polygon feature) of kill site density as a measure of distribution. I used several tools in ArcGIS and the Geospatial Modeling Environment (GME) to carry out this analysis. GME is a standalone application that makes use of ArcGIS shape files and R software to carry out spatial and quantitative analyses.


Figure 1. Geospatial Modeling Environment (GME) home page.



I had already created point shape files of cougar kill sites for each time period in ArcCatalog, and used the kde call in GME to calculate kernel density estimates, or utilization distributions, for cougar kill sites in each time period (exercise 1). For that analysis, I used the PLUGIN bandwidth and a 30-m resolution cell size. Multiple bandwidth estimators are available as well as input options for scaling, weighted fields, data subset and/or edge inflation.

Figure 2. GME kde call in the command builder GUI.


The next step for this analysis was to standardize the two cougar kill time period KDE raster data sets so the densities relative to catch (in this case kill events) per sample (cougar) were comparable. This was necessary because the sample of kill sites (and sample of cougar) in the pre-wolf time period was higher (45-48%) than the post-wolf sample of kill sites (and cougar). I used the raster calculator in ArcGIS to divide each period kill site KDE raster by that periods’ respective kills/per cougar ‘effort’.

Figure 3. Density raster data standardization using ArcGIS raster calculator.


Figure 4. Raw code for analysis. GME runs like an R GUI, therefore code can be written in any text editor and past into the command window.


Using the new density raster, I then used the ‘isopleth’ command in GME to create a polygon probability surface. The resulting polygons represent quantiles of interest (programmable) expressed as the proportion of the density surface volume. I specified isopleths for the 25th, 50th, 75th, 95th, and 99th quartiles. I also used the ‘addarea’ command in GME to calculate and add information to the isopleth shapefiles for each polygons’ area and perimeter. Next, I used the ‘countpntsinpolys’ command to add a column with the count of post-wolf cougar kills in each pre-wolf cougar kill isopleth polygon. In ArcGIS, I created another column in the attribute table and used the ‘Field Calculator’ to fill each field with the proportion of total kills. Finally, I used ArcMap to visualize the data and make a figure showcasing the process.


Figure 5. GME command text box where you can enter code directly, copy from the command builder, or paste code constructed in another editor. Because GME uses R you can program iterative analysis for loops to batch process large data sets.



Visual examination of the standardized kill density rasters demonstrated that part of the distributional shift observed was related to catch-per-unit effort influences, but a shift between the two highest density areas of kills was still evident from pre- to post-wolf time periods (Figure 6). This suggests other variables, like time effects from seasonal prey distribution changes or the presence of wolves, could also be factors influencing the distribution of kill density.

Figure 6. Comparison of pre- and post-wolf cougar kill site kernel density estimate (KDE) rasters before and after standardization for catch-per-unit effort (kills/cougar), and with 25th, 50th, 75th, 95th, and 99th isopleth probability contours. The isopleth contours for pre-wolf cougar kill site distribution is also fit with post-wolf cougar kill point locations to demonstrate posterior distributional shift.


The observed shift was further evident from the proportional changes in post-wolf cougar kills within the pre-wolf cougar kill probability surface. For example, only 28.5% of all post-wolf cougar kills were within the 50% pre-wolf cougar kill probability contour. Even if I exclude the kills outside the study area boundary the proportion of kills in each probability contour were 5-22% lower than would be expected based on the pre-wolf kill site distribution.


Table 1. Pre-wolf cougar kill site probability contour attribute table. Isopleths represent the 25th, 50th, 75th, 95th, and 99th quartiles. ‘Out’ refers to areas outside the probability contour surface. Number of kills (No. Kills) is the number of post-wolf cougar kill sites, % is the proportion of all kills within each polygon ‘donut’, and % Kills is the cumulative proportion of all post-wolf cougar kills within each quartile class.

Method Critique

Standardization of the two kill density rasters improved visual interpretation of the spatial patterns and accounted for one of the other factors (catch-per-unit effort) that might mask distributional influences related to wolf presence. However, similar to the visual examination of the non-standardized density raster this method allowed for only an implicit understanding of space-time concepts and lacked inferential measures of significance to quantify the shifts and formally relate the patterns of cougar predation across time. Further, because the isopleth contours represent quantiles expressed as the proportion of the density surface volume they were identical when created from the standardized or non-standardized density rasters. Using the probability contours as a ‘prior’ distribution of kill sites offered a more robust and meaningful measure to quantify the shift in cougar kill distribution. However, the mechanism behind the shift could still be related to factors other than wolf presence like seasonal shifts in prey distribution or density. Both methods (standardization and prior distribution comparison) were useful and provide evidence toward the presence of a shift in where cougars are killing prey (i.e. the answer to my ‘question asked’ is yes), but further analysis is necessary to infer causal mechanisms.

Print Friendly, PDF & Email

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

© 2019 GEOG 566   Powered by WordPress MU    Hosted by