I am trying to build some BBMM code and although it produces the outputs I want, I am having trouble figuring out the proper smoothing parameters using Sig 1 and Sig 2. When I use the liker function it produces the exact same curve for every individual, which does not seem right. I have tried playing with the Sig 2 number and range of sig1 but it does not seem to make any difference at all. What am I missing?
`#Load Package library(BBMM) library(sp) library(adehabitatHR) library(adehabitatLT)
##Plot Movement Rates for individuals
ctraj <- as.ltraj(xy = coordinates(RelSPDF), date = RelSPDF$Timestamp, id =RelSPDF$Animal_ID)
is.regular(ctraj)
graphics.off()
par("mar")
par(mar=c(1,1,1,1))
plotltr(ctraj)
###Establish smoother Sig1 and Sig2 parameters
x <- ctraj
lik <- liker(x, sig2 = 6, rangesig1 = c(1, 50))
xbb <- kernelbb(x, sig1 = 300, sig2 = 6, grid=1500)
image(xbb)
plot(getverticeshr(xbb, 95), add=TRUE, lwd=2)
plot(ctraj)`
I am using R 2021.09.0, 64Bit
You need to try adjusting the
rangesig1
to a different range. This is your standard deviation. See below, which is copied from the help page. View it in R with?liker
You also need to make some adjustments to the code you have provided, including transforming your Timestamp to
POSIXct
and providing coordinates in the correct format.Below is your code edited to do this.