Hi Chris,
I have a dataset from a turtle with 270 locations spanning almost 3 months. The sampling intervals are very irregular and infrequent at times (sometimes I get >15 locations per day, sometimes nothing for 3 days). This is because the animals spent most of their time in the water where I don’t get a GPS signal from.
I am trying to estimate daily distance moved (at least for the days I have locations for) using the CTMM package. I am not sure if this is even feasible given the infrequent sampling.
I haven’t calibrated the telemetry error yet, but rather have it estimated with the movement model simultaneously.
Doing this, a OU (anisotropic) model is fitted with FITS <- ctmm.select(turtle, CTMM = GUESS), but when I try to get the speed(turtle, FITS) I get the following warning message and Inf estimates for the speeds throughout:
> speed(turtle, FITS)
low est high
speed (meters/second) 0 Inf Inf
Warning message:
In speed.ctmm(CTMM, data = object, level = level, robust = robust, :
Movement model is fractal.
I suspect this has may have to do with either a small sample (although this is one of my larger samples for one turtle individual with 270 locations) or variability in sampling frequency? Is there a workaround for this?
Alternatively, I have tried assigning a telemetry error uere(turtle) <- 10. Doing this, ctmm.select fit a OUF anisotropic model, but the plot looks like this.

Doing it this way I can estimate speed without any warning messages or Inf estimates. But the fit just does not seem right. What is going on here?
Further, when I go on to estimate daily distance moved it seems to be OK for the first 8 days, but then I get this error (and Inf estimates for the distances):
0%Error in emulate.ctmm(CTMM, data = data, fast = fast, ...) : fast=TRUE (CLT) not possible when minor = 0In addition: There were 31 warnings (use warnings() to see them)
I assume the second approach is still better than estimating the error simultaneously with the model. Will I benefit from calibrating the telemetry error using my devices following using uere.fit()?
Sorry for the many questions.
Thanks in advance.
Best,
Anni
[1] "OU anisotropic error"
$DOF
mean area speed
1.247121 1.352211 0.000000
$CI
low est high
area (square kilometers) 0.1618482 2.824010 9.177807
τ[position] (months) 0.0000000 5.766410 15.498323
error (meters) 2.8869724 3.353047 3.818349

Thank you, Chris.
I seem to be particularly slow to
understand.
In the loop I get the guesses with GUESS <- ctmm.guess(turtle, variogram = variogram(turtle), interactive = FALSE), whereby turtle refers to the entire telemetry object. Are you saying I should use the fit for the entire track (i.e. FITS <- ctmm.select(turtle, CTMM = GUESS)) here instead of turtle?
Or do you mean I should use FITS (calculated from the entire dataset) in ctmm.select() in the loop: ctmm.select(FITS, CTMM = GUESS)?
They both seem kind of circular.
The code below (using fit for entire track in speed()) is what I have used now and I am getting daily distances moved from those (with relatively wide CI though).
#where turtle is my telemetry object
uere(turtle) <- UERE
turtle.vg <- variogram(turtle, fast=FALSE, CI="Gauss", dt=c(1 %#% 'hr',2 %#% 'hr',20 %#% 'hr'))
GUESS <- ctmm.guess(turtle, variogram = turtle.vg, interactive = FALSE)
GUESS$error <- TRUE
FITS <- ctmm.select(turtle, CTMM = GUESS) # fit from the entire track
summary(FITS)
plot(turtle.vg, CTMM = FITS)
speed(turtle, FITS, fast=TRUE, robust=TRUE)
SPEEDS <- speeds(turtle, FITS)
# estimating daily movement distance over the study period
turtle$day <- cut(turtle$timestamp, breaks = "day")
days <- unique(turtle$day)
res <- list()
#loop over the number of days
for(i in 1:length(days)){
message("Estimating distance travelled on day ", i, ": ", days[i])
#select data for the day in question
DATA.SUBSET <- turtle[which(turtle$day == days[i]),]
#calculate the duration of the sampling period (in seconds)
SAMP.TIME <- diff(c(DATA.SUBSET$t[1],
DATA.SUBSET$t[nrow(DATA.SUBSET)]))
#guesstimate the model for the initial parameter values
GUESS <- ctmm.guess(turtle, variogram = variogram(turtle),
interactive = FALSE)
#turn error on
GUESS$error <- TRUE
#fit movement model to the day's data
FITS.day <- ctmm.select(DATA.SUBSET, CTMM = GUESS)
#calculate speed in m/s
ctmm_speed <- speed(object = DATA.SUBSET, CTMM = FITS, units = FALSE) #using the fit for the entire track
#multiple speed (in m/s) by sample time (in s) to get estimated distance travelled
ctmm_dist <- ctmm_speed*SAMP.TIME
#re-name the variable
rownames(ctmm_dist) <- "distance (meters)"
#store results in list
x <- c(i, #the day
ctmm_dist[2],
ctmm_dist[1],
ctmm_dist[3])
names(x) <- c("date", "dist.ML", "dist.Min", "dist.Max")
res[[i]] <- x
}
Does this make sense?
Thanks,
Anni
Hi Anni,Assuming the location error is not having the larger impact, straight-line-distances strictly underestimate distance travelled, and those data do not look very ballistic where the straight-line approximation would be expected to be accurate. Second, how wide are the confidence intervals? Third, are the instantaneous speeds high all day long or only at some times? It's the integral of the instantaneous speed that gives distance.If the results still seem strange, I would plot the sample with error circles and some conditional simulations atop to get a sense of where the numbers are coming from.Best,ChrisOn Wed, Sep 16, 2020 at 9:31 PM Anne-Christine Auge <achr...@gmail.com> wrote:Hi Chris,thanks so much for your input.I am still working on the last suggestion you made using a 3-day window to run speed() centering around the day of interest.Meanwhile I looked into the instantaneous speeds again. I used speeds() to compute the instantaneous speed every hour, and from these computed the daily average speed, then calculated the distance per day from that.For some animals I found that:
- the mean distance travelled per day is very similar for all days, and;
- when I compare the distances to the mapped raw locations I find large discrepancies from the "eye-balled" straight-line distances between locations and the estimated ones from the instantaneous speeds from the model.
For example, I have attached an image with the mapped raw locations from Day 1 to Day 3. All locations are fairly close together, but I only have a small sample per day (overall the whole dataset for this animal is pretty small compared to others).The estimated daily distances I get from instantaneous speeds are much larger than I would expect (400 to 500 m per day) and very unrealistic. Is this due to the small sample size and large gaps?For other animals (mainly the ones with larger datasets) I get more realistic results.Best,Anni
--
You received this message because you are subscribed to a topic in the Google Groups "ctmm R user group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ctmm-user/9ZGH86q2f84/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ctmm-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ctmm-user/1555e4d8-a4e3-4575-9395-04490f1810d8o%40googlegroups.com.
--_________________________________________Anne-Christine Auge