Calculating UDs with hard boundaries

16 views
Skip to first unread message

Amelia J

unread,
May 17, 2026, 10:21:56 PMMay 17
to ctmm R user group
Hi there,

I have calculated UDs for an individual for each month/year combination, using this code:

UDs_all <- akde(telemetry_myall, fit_list)
UDs_all_restricted <- akde(telemetry_myall, fit_list, SP=water_sp,SP.in =FALSE)

The latter incorporates a waterbody shapefile because I want to remove the large waterbodies (e.g. lake, ocean) from this individual's home range – they are a terrestrial animal.

Comparing the two UDs, I see something unexpected – for one, the restricted UD is larger than the unrestricted, and it in fact extends across even more of the non-habitat (i.e. waterbody, hatched) areas. Any idea why this hasn't worked? I have made an effort to ensure the same coordinate system is used for the telemetry and fit_list and water sp. You can see the datapoints on the unrestricted map, for reference.

Screenshot 2026-05-18 at 12.15.31.png
Screenshot 2026-05-18 at 12.15.49.png

I appreciate any help on this matter!
Cheers,
Amelia

Amelia J

unread,
May 18, 2026, 10:10:04 PMMay 18
to ctmm R user group
I've done some more testing, with other individuals. I've found that the akde works for all but three individuals (including the one above). It may be worth noting these are the three individuals with the largest home range estimates, and are likely being considerably overestimated given the nature of the area they live in – constrained by waterbodies, coastline and roads. The above is using water as a constraint (SP = water_sp, SP.in = FALSE); I also tried with using land as a constraint (SP = land_sp, SP.in = TRUE) and that didn't work either. I also plotted them, and I think that may also shed some light on what is going on, but I can't interpret it myself. Note – these (including those above) are the mean AKDEs, using:

individual_ids <- sapply(names(UDs), function(x) sub("_[^_]+$", "", x))
# Group UDs by individual
UDs_by_individual <- split(UDs, individual_ids)
mean_UDs <- lapply(UDs_by_individual, mean, sample = FALSE)

This individual has a home range estimate of 431 km2 (for mean home range), with a DOF of 425,777 (which clearly wrong). This is the output when I use the land boundary as the constraint. The hatched lines is the water.
Screenshot 2026-05-19 at 11.32.45.png
Water-bounded AKDE and land-bounded AKDE (square) for another individual for whom the constrained AKDE hasn't worked. This individual has a home range estimate of 394 km2 (for mean home range), with a DOF of 631::
Screenshot 2026-05-19 at 11.33.16.png
Water-bounded AKDE and land-bounded AKDE (square) for the third individual for whom the constrained AKDE hasn't worked. This individual has a home range estimate of 653 km2 (for mean home range), with a DOF of 228:
Screenshot 2026-05-19 at 11.34.11.png
Using plot(UDs_by_individual[[individual_name]]) I created these plots. Those with blue are the ones that have not been correctly constrained:
31dc2ce8-e023-4d89-b92d-c2ceb0524ce2.png
All individuals had OU, OUF, OU anisotropic or OUF anisotropic models.
So evidently it seems like there are some issues with regards to DOF (possibly, for the orange individual), possibly overestimating size of home range, the plots looking very wrong, and the constraint parameter. But I can't figure out where it has gone wrong!
I can't see how to attach a script with some of the data necessary to recreate this situation, however I'd be happy to email it.

Kind regards,
Amelia
Reply all
Reply to author
Forward
0 new messages