Thanks again Chris.
I know there is so much to learn but I was hoping you could look over this code very quickly for me. I am getting a larger home range than I had expected for this turtle. They don't move too much but I created a HDOP based on the uncalibrated error code found in the viginette('error') you provided... I wasn't sure to put it to the default of 10m for 2D, as I know the gps has a normal error of 3m.
I think I am a tad lost. The more I read, the less I know. ha
I am going to attach my code very quickly... could you let me know if/where I may be missing something.
spotted<-read.csv("male102_2021.csv",header=T)
View(spotted)
spotted$datetime <- as.POSIXct(strptime(as.character(spotted$datetime),"%m-%d-%Y %H:%M", tz="America/New_York"))
spotted = spotted %>% mutate(hour = hour(datetime), year = year(datetime), month = month(datetime)) #add time
spotted = spotted %>% arrange(Turtle_ID, datetime)
head(spotted)
#transform in to a movement data
move.spotted <- move(x=spotted$X,y=spotted$Y,
time=spotted$datetime,
data=spotted, proj=CRS("+proj=longlat +epsg=WGS84"),
animal = spotted$Turtle_ID)
##transform data##
plot(move.spotted)
spotted2<- spTransform(move.spotted, CRS("+init=epsg:32616"))
View(spotted2)
#create dataframe, either use the reprojected or the WGS 84 version
main.df<- as.data.frame(spotted2)
head(main.df)
# Home Range using ctmm
test.ctmm<- as.telemetry(move.spotted)
###error model selection HDOP values###
uere(test.ctmm)<-NULL
#assign 3m error
uere(test.ctmm)<-c(3)
#the default uncertainty is none for numerical assignments
UERE<-uere(test.ctmm)
UERE$DOF
summary(UERE)
UERE$DOF[]<-2
summary(UERE)
uere(test.ctmm)<-UERE
JC11.w3.svf<- variogram(test.ctmm)
dev.off()
zoom(JC11.w3.svf) # interactive plots
level=c(50,95)
plot(JC11.w3.svf,xlim=c(0,120) %#% "day", level = 0.95) #change val and time units
variogram.fit(JC11.w3.svf, name = "JC11.w3.svf")
GUESS<-ctmm.guess(test.ctmm,CTMM=ctmm(error=T,interactive=F),variogram=JC11.w3.svf)
FIT<-ctmm.select(test.ctmm,GUESS,trace=T,verbose=F,cores=2)
summary(FIT)
summary(uere(test.ctmm))
###weighted AKDE (weights=TRUE). The optimally weighted estimate features smaller error, finer resolution, and mitigation of sampling bias##
wAKDEc<-akde(test.ctmm,FIT,weights=T,Fast=T,debias=T) #for kde + 3 m error margin
summary(wAKDEc)