as.telemetry issue for argos error ellipses and pkde custom weights

5 views
Skip to first unread message

Allie Anderson

unread,
Oct 29, 2025, 5:40:00 PM (6 days ago) Oct 29
to ctmm R user group
Hi Chris,
I' have enjoyed learning how to use ctmm. I’m having trouble with two separate issues and wondering if you might be able to help.

1) I’m encountering an error when running as.telemetry() in v1.3.0 (R v 4.5.1) on the same dataset (a dataframe formatted to match Movebank attributes) that previously ran as anticipated in 1.2.0 (R v 4.4.0).  The input data file is the same .rds file where the dataframe has the following column names: 
Argos.lc (character)
Argos.semi.major
Argos.semi.minor
Argos.orientation (numeric)

All data are Argos, though one individual does not have error ellipses (only LC codes). I can run that individual through fine. 

The other birds with error ellipses give the following error:
“Error in `[[<-.data.frame`(`*tmp*`, DOP.LIST$horizontal$VAR, value = numeric(0)) : replacement has 0 rows, data has 27”. The error is the same for individuals/years minus the number of observations. 

I think something is going on with the error ellipses, but I can't seem to identify the issue. 

2) Is there a way to specify custom weights across individuals in pkde()? I tried to add a vector of weights = c(1, 0.5, 0.5, 1, 1,1) to account for the one individual tracked in two years. pkde runs, but when I check with head(pkde$weights) the weights appear the same as when I run weights = TRUE (the default weighting method) instead of those in the vector.

This leads to another question previously discussed in this group: when the sample size of individuals is low (5 in this case), should we be considering running pkde? Should we be running mean instead? When I compare the unweighted mean UD to the unweighted pkde, the 95% UD is very similar, slightly larger than the pkde. Ideally we'd account for that one individual tracked in two years, though. 

Any tips appreciated. Thank you so much,
Allie
Reply all
Reply to author
Forward
0 new messages