Manually assigning weights to observations

47 views
Skip to first unread message

Annika Dean

unread,
Mar 4, 2026, 6:14:12 PMMar 4
to ctmm R user group
Hello! 

I am currently using ctmm to construct home ranges based on opportunistic survey data. I am really appreciating the ease of including hard boundaries into the estimate but hoping to also include uneven sampling effort in this model like done in the literature noted below. Is there a way to incorporate manual weighting in this package? I see previously studies have used ArcMap or the R spatialEco package to assign manual weights but I was enjoying the ctmm package. 

Horne, J. S., Garton, E. O., & Sager-Fradkin, K. A. (2007). Correcting Home-Range Models for Observation Bias. The Journal of Wildlife Management, 71(3), 996–1001. https://doi.org/10.2193/2005-678

Bennington, S., Guerra, M., Johnston, D., Currey, R., Brough, T., Corne, C., Johnson, D.,
Henderson, S., Slooten, E., Dawson, S., & Rayment, W. (2023). Decadal stability in the distribution of bottlenose dolphins in Dusky Sound/Tamatea, New Zealand. New Zealand Journal of Marine and Freshwater Research, 57(3), 411–424. https://doi.org/10.1080/00288330.2022.2038214

Thank you!
Annika 

Christen Fleming

unread,
Mar 4, 2026, 9:39:29 PMMar 4
to ctmm R user group
Hi Annika,

You should be able to feed a vector of manual weights into the weights argument of akde().

Best,
Chris

Annika Dean

unread,
Mar 14, 2026, 4:49:44 PMMar 14
to ctmm R user group
Hi Chris, 

Thank you for the speedy response! I just ran a test on one individual where each observation was weighted by the survey effort in the 100m^2 area the observation fell in (function call for akde below). I compared the output of akde home range estimates with weighted observations to unweighted observations and there was no difference in the area estimates for these two methods. How are the weights incorporated in the estimates? 

kde_weighted <-
  akde(
    telem_individual_a,
    SP = land_sp,
   
    # Locations expected to be outside of the polygon:
   
    SP.in = FALSE,
   
    # Don't include auto-correlation:
   
    CTMM = individual_a_iid_fit_list,
   
    # Include manual weights:
   
    weights = points_for_telem %>%
      filter(id == "individual_a") %>%
      pluck("weights_standardized")
  )

Thanks again!
Annika 

Annika Dean

unread,
Mar 24, 2026, 7:33:10 PM (13 days ago) Mar 24
to ctmm R user group
Hi Chris, 

Little follow up with added information. I am using ctmm to fit KDEs and not AKDEs and am wondering if potentially this would make it so the weights are not considered. I have standardized my weights so that for each home range they sum to 1. 

This is what the weights for a singular home range look like and what I am feeding into the weights argument: 

[1] 0.0202490381 0.0057882034 0.0160065316 0.0056852567 0.0202490382 0.0010916228
 [7] 0.0236238797 0.0053507533 0.0034268383 0.0250953631 0.0202490374 0.0035627815
[13] 0.0202490398 0.0368503911 0.0118119390 0.0236238794 0.0043834807 0.0047322554
[19] 0.0170130589 0.0236238787 0.0183546365 0.0340298838 0.0049728194 0.0008540778
[25] 0.0109525000 0.0041779317 0.0010941807 0.0018807421 0.0014863706 0.0067496798
[31] 0.0236238781 0.0157048498 0.0021625585 0.0029577291 0.0014924478 0.0236238776
[37] 0.0015040204 0.0017539192 0.0011188674 0.0023962341 0.0106532381 0.0234963753
[43] 0.0152707629 0.0137979313 0.0205004839 0.0167641429 0.0236238774 0.0213564827
[49] 0.1417432653 0.0138738215 0.0019050558 0.0024203881 0.1417432744 0.0042139976
[55] 0.0202490380 0.0041296624 0.0054693493 0.0020844600 0.0053004052 0.0149603216
[61] 0.0109665440 0.0022906640 0.0012826424 0.0094495509 0.0016796583 0.0023072664
[67] 0.0028895767 0.0030784326 0.0013130698 0.0009647045 0.0035007262 0.0024200931
[73] 0.0007432659

But, when I pull the weights from the fitted kde with kde_indivA$out_adult$weights , this is what it returns: 

[1] 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863
 [8] 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863
[15] 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863
[22] 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863
[29] 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863
[36] 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863
[43] 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863
[50] 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863
[57] 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863
[64] 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863 0.01369863
[71] 0.01369863 0.01369863 0.01369863

Thanks again for your help, 
Annika 

Christen Fleming

unread,
Apr 4, 2026, 11:42:35 PM (2 days ago) Apr 4
to ctmm R user group
Hi  Annika,

I'm getting the weights that I supply to the weights argument, but normalized to sum to 1.

Can you try updating the package from GitHub and trying again. If the problem persists, please send me a minimal working example (script + data) so that I can reproduce the issue.

Best,
Chris
Reply all
Reply to author
Forward
0 new messages