Start by generating some data

Generate SpatialPoints data for 4 different UDs.

Take a look at the points.

Playing around with the grid

Grid 1

## [1] 0.444307
## [1] 0.4443922
## [1] 0.4434003
## [1] 0.4443624

All UDs sum to the almost exactly the same value, regardless of sample size (n) and spread (sd).

Grid 2

Now change the grid extent and see what happens…

## [1] 0.9998706
## [1] 0.9998943
## [1] 0.9990162
## [1] 0.9998803

Again, all UDs sum to the almost exactly the same value, regardless of spread and sample size. But, changing the grid has changed what value the UDs sum to (bigger grid, higher value, it would seem).

Grid 3

Now change the grid resolution to be finer…

## [1] 99.98728
## [1] 99.98737
## [1] 99.88627
## [1] 99.98732

Using the previous grid extents, the sums were all around 1, now they are all approaching 100. i.e. making the grid resolution finer by a factor of 100 (/10 on each axis), increased the sum of @data$ud by a factor of 100. So now plot these ranges to look at them.

Note how the scale bar is diff for each UD! Thus, from range 1 to range 4, the high density areas are “worth” less and less (shallower peaks) in order to maintain the equal sum of @data$ud across wider home ranges. Therefore, this is NOT a good value to use for UD comparisons, because larger UDs will end up having smaller values (as an artifact of the math, not the actual density).

To illustrate this even more clearly, force the colour scales to be the same (using the zlim arg), then more wider-spread (LGsd) ranges almost dissappear…

Comparing UD pixel values

Generate random points in the grid that cluster around where the ranges overlap the most (for the sake of having nice plots, without too many (0,0) points).

Try some different methods for extracting and comparing pixel values…

Using raw UD data

Look at some UD pixel value comparisons - eventhough this method is prob not the right one, but just to see what happens…

Now extract the value of each UD at the random pts

Super teeny tiny numbers on the axes, if set asp=1, can barely see any variation in relationships between ranges with different degrees of spread (SMLsd vs LGsd). Ok, try something else….

Using inverted volume UD data

Continue with the UDs from the last section, but now use the volume function before extracting values…

## [1] 120062506
## [1] 119861560
## [1] 109944887
## [1] 115771854

The scale bar doesn’t change (so peaks are ‘equal’ even with different sample sizes (n) and spreads (sd). Notice how the sum of the volume is less for wider spread data (because there are fewer 100 cells), but is not so affected by sample size. This is good… now we are getting somewhere….

To make these values more intuitive (for me with my current goals, higher use = higher value), change all cell values to their inverse.

Now the volume values are inverted - so a higher value means higher use - and the range of values is independent of the spread (sd) of the points, i.e. high peaks in the different ranges are ‘equally high’.

Now extract the values at our random pts again…

Values extracted from the volume UDs yield easier to interpret plots and visible relationships between values in ranges with different spreads (SMLsd vs LGsd).

Using scaled raw UD values

Using the original UDs’ (before the volume conversion) @data$ud slot, scale the values in this slot for each range so that the values range from 0 to 1…

Notice how the scale bar is the same for all ranges. i.e. high peaks in the different ranges are ‘equally high’.

Now extract the values at the random pts and plot them…

Again, these rescaled values are easier to interpret, and the relationships between ranges with different spreads are visible and not artificially flattened.

Zoom in on UD comparisons

Now subset these final data frames to just look at points that are essentially within the first (small sample size, small spread, SMLn_SMLsd) range’s 99%iso (but for the sake of simplicity, I won’t actually calculate the range and put points in there, I’ll just use points for which the values are already calculated, and the SMLn_SMLsd values are >0).

And look at the relationship between ‘SMLn_SMLsd’ and ‘LGn_SMLsd’

Note here how, because we’re comparing two ranges with similar spread (both SMLsd), it doesn’t really matter too much which values we use, the relationship always looks the same.

And look at the relationship between ‘SMLn_SMLsd’ and ‘SMLn_LGsd’

But now here, comparing a small spread range (SMLsd) to a wide-spread range (LGsd), we see that the raw data looses it’s power to show the relationship because the variance within the wide-spread range is so little since each UD pixel is worth less. The two different scaling methods, however, both produce similar results

And look at the relationship between ‘SMLn_SMLsd’ and ‘LGn_LGsd’

Same as the previous one.

Abbreviated Conclusion

I think that using the inverted volume (vol) or the rescaled @data$ud (rscl) methods are both appropriate and both basically the same, in the end. I like the rscl option because it’s fewer steps, and I find the 0 to 1 range to be even more intuitive than a 0 to 100 range.