Hi Chris,
I though files were attached, sorry for that. Here goes one month of data for the first individual in the dataset and the one producing the error. This is the code I used:
##bring data
vulture<-as.telemetry("E:\\Vultures_Fixes\\Vultures position Summer-Fall 2020 MBf id+season.csv")
##read calibration data
cal<-as.telemetry("E:\\Vultures_Fixes\\Calibration data CTT E-400 MB unit 12340 Nov15-21.csv")
#calibrate
UERE <- uere.fit(cal) # only using calibration data
summary(UERE)
uere(vulture)<-UERE
names(vulture[[1]])
V.zFITS <- list()
V.FITS <- list()
V.AKDE <- list()
V.PRED <- list()
for(i in 1:length(vulture))
{
print(i)
# fit vertical movement model
zSVF <- variogram(vulture[[i]], axes="z")
zGUESS <- ctmm.guess(vulture[[i]],variogram=zSVF,CTMM=ctmm(error=TRUE),interactive=F)
V.zFITS[[i]] <- ctmm.select(vulture[[i]],zGUESS,trace=2)
# fit horizontal movement model
SVF <- variogram(vulture[[i]])
GUESS <- ctmm.guess(vulture[[i]],CTMM=ctmm(error=TRUE),interactive=F)
V.FITS[[i]] <- ctmm.select(vulture[[i]],GUESS,trace=2)
#V.AKDE[[i]] <- akde(vulture[[i]],V.FITS[[i]],trace=TRUE)
V.PRED[[i]] <- predict(vulture[[i]],CTMM=V.FITS,VMM=V.zFITS,complete=TRUE)
}
Thanks for the help. Best
Adrian
--
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/3yTRsDvc7Ak/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/8104c0c2-88b4-4865-9ee2-1b14b6af7dbfn%40googlegroups.com.
Hi Chris,
Thanks for looking at this. Today I noticed that I got the error when I split the data by season or day. For example, today I split the dataset by day so in the input file each bird-day is a unique individual. By doing that I got this:
* Fitting model IID isotropic error
Maximizing likelihood.
Calculating Hessian.
Error in dim(z) <- c(n, OBS * DIM, VEC) :
dims [product 228] do not match the length of object [285]
In addition: Warning messages:
1: In FUN(X[[i]], ...) : Objective function failure at c(major=0)
2: In FUN(X[[i]], ...) : Objective function failure at c(major=0)
3: In FUN(X[[i]], ...) : Objective function failure at c(major=0)
4: In FUN(X[[i]], ...) : Objective function failure at c(major=0)
Error in dim(z) <- c(n, OBS * DIM, VEC) :
dims [product 228] do not match the length of object [285]
Profiling REML likelihood.
Calculating REML Hessian.
Error in dim(z) <- c(n, OBS * DIM, VEC) :
dims [product 228] do not match the length of object [285]
In addition: Warning messages:
1: In ctmm.fit(data, GUESS, trace = trace2, ...) :
pREML failure: indefinite ML Hessian or divergent REML gradient.
2: In FUN(X[[i]], ...) : Objective function failure at c(major=0)
3: In FUN(X[[i]], ...) : Objective function failure at c(major=0)
4: In FUN(X[[i]], ...) : Objective function failure at c(major=0)
5: In FUN(X[[i]], ...) : Objective function failure at c(major=0)
Error in dim(z) <- c(n, OBS * DIM, VEC) :
dims [product 228] do not match the length of object [285]
After this, I ran the dataset without splitting, and it is working, so far there is no error in the first individual which is the one producing the error. I’ll let you know if something happen.
All the best,
Adrian
From: ctmm...@googlegroups.com <ctmm...@googlegroups.com> On Behalf Of Christen Fleming
Sent: Thursday, March 11, 2021 6:30 PM
To: ctmm R user group <ctmm...@googlegroups.com>
Subject: [ctmm-user] Re: VMM
Hi Adrian,
--
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/3yTRsDvc7Ak/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/e1ca6044-27d8-4327-b9a0-16ed6c3c7e29n%40googlegroups.com.