Good morning!
I am new to the ctmm package and have a question about my results for KDE vs AKDE. I worked through the variogram and akde vignettes using my own GPS collar data (a red squirrel with sampling interval of 30 minutes between 00:00-5:00, 15 minutes between 5:05-11:00 and 60 minutes between 11:05-23:55 for total of over 3000 fixes over approximately 4 months).
As you can see from the attached plots the KDE and AKDE were almost identical, and I am wondering why this would be the case, because based on all the reading I’ve done about AKDE it was my understanding it should be quite different and more accurate than KDE, as it was in the example buffalo data for instance. I have provided my code below.
I have also repeated this with subsets of my data that were subsampled for TTI and KDE and AKDE plots were either identical or extremely similar, which makes sense to me due to the lack of autocorrelation.
I would really appreciate any guidance you can provide!
Thank you,
Devin


#Import data
ctmm.trm16LL <- as.telemetry("squirrel.trm16LL.csv")
#Look at data
plot(ctmm.trm16LL)
#Calculate variogram
SVFtrm16LL <- variogram(ctmm.trm16LL)
#Plot variogram
level <- c(0.5,0.95) #50% and 95% CIs
xlim <- c(0,12 %#% "hour") #0-12 hour window
plot(SVFtrm16LL,xlim=xlim,level=level)
title("zoomed in")
plot(SVFtrm16LL,fraction=0.65,level=level)
title("zoomed out")
#Account for 30, 15, 60 minute sampling intervals
dt <- c(30,15,60) %#% "minute"
SVFtrm16LL <- variogram(ctmm.trm16LL, dt=dt)
plot(SVFtrm16LL,xlim=xlim,level=level)
title("zoomed in")
plot(SVFtrm16LL,fraction=0.65,level=level)
title("zoomed out")
#Fit variogram
m.ouf.trm16LL <- ctmm.guess(ctmm.trm16LL, variogram = SVFtrm16LL, interactive = FALSE)
plot(SVFtrm16LL,CTMM=m.ouf.trm16LL,level=level,col.CTMM=“blue”,xlim=xlim)
title("Ornstein-Uhlenbeck-F movement")
plot(SVFtrm16LL,CTMM=m.ouf.trm16LL,fraction=0.65,level=level,col.CTMM=“blue”)
title("Ornstein-Uhlenbeck-F movement")
#Maximum likelihood
FIT.trm16LL <- ctmm.select(ctmm.trm16LL, m.ouf.trm16LL, verbose = TRUE, cores = 2)
summary(FIT.trm16LL)
M.IID.trm16LL <- FIT.trm16LL[[6]]
summary(M.IID.trm16LL)
M.OU.trm16LL <- FIT.trm16LL[[1]]
summary(M.OU.trm16LL)
M.OUF.trm16LL <- FIT.trm16LL[[2]]
summary(M.OUF.trm16LL)
FITS.trm16LL <- list(IID=M.IID.trm16LL,OU=M.OU.trm16LL,OUF=M.OUF.trm16LL)
summary(FITS.trm16LL)
#Variograms as a diagnostic for maximum likelihood
plot(SVFtrm16LL,CTMM=FITS.trm16LL,col.CTMM=c(“red”,”blue”,”purple”),fraction=0.65,level=0.5)
title("zoomed out")
plot(SVFtrm16LL,CTMM=FITS.trm16LL,col.CTMM=c(“red”,”blue”,”purple”),xlim=xlim,level=0.5)
title("zoomed in")
#Autocorrelated kernel density estimation
#Calculate an AKDE object for each model
KDE.trm16LL <- akde(ctmm.trm16LL, M.IID.trm16LL)
AKDE.trm16LL <- akde(ctmm.trm16LL, M.OUF.trm16LL)
#Calculate one extent for UDs
EXT.trm16LL <- extent(list(KDE.trm16LL, AKDE.trm16LL),level=0.95)
#Plot results
plot(ctmm.trm16LL,UD=KDE.trm16LL,xlim=EXT.trm16LL$x,ylim=EXT.trm16LL$y)
title(expression("IID KDE"["C"]))
plot(ctmm.trm16LL,UD=AKDE.trm16LL,xlim=EXT.trm16LL$x,ylim=EXT.trm16LL$y)
title(expression("OUF AKDE"["C"]))
#Compare the area estimates and effective sample sizes
summary(KDE.trm16LL)
#$DOF
#area bandwidth
#3138.349 3154.000
#$CI
#low est high
#area (hectares) 3.937613 4.07909 4.223029
summary(AKDE.trm16LL)
#$DOF
#area bandwidth
#1066.812 2342.013
#$CI
#low est high
#area (hectares) 3.796395 4.034917 4.280604