Hi Mohammad,
ctmm uses the Movebank format. See help("as.telemetry") in R. I highly recommend that get your data through Movebank to make sure that it is formatted correctly and to archive it long term for the benefit of science. You can keep your data private if you want.
Timestamps are interpreted by strptime as per help("as.telemetry"). If strptime can't interpret your timestamps, there is a timeformat argument to assist it.
Lat-lon will be projected by as.telemetry. If no projection is specified, a generally safe projection will be chosen for you.
and when I tried to build variogram, the below error was obtaind:
> vg.cilla <- variogram(F5) Error in `[.data.frame`(data.frame(data), , axes) : undefined columns selected
dAICc DOF[mean] OUF anisotropic 0 13.16465
> summary(ouf) $DOF mean area 150.9119 399.8980 $CI low ML high area (square kilometers) 184.413009 2.039112e+02 224.37521 tau position (days) 1.087903 1.209006e+00 1.34359 tau velocity (seconds) 0.000000 1.581533e-02 24.52188 speed (kilometers/day) 0.000000 1.011324e+04 398224.76850 > summary(ou) $DOF mean area 150.6674 298.2717 $CI low ML high area (square kilometers) 181.700394 204.221510 228.039312 tau position (days) 1.068653 1.210988 1.372281
| Tau (crossing time) | ID | KDE | AKDE |
| 4.4 day | Borzou/M1 | 418 | 563.4 (448.8-690.8) |
| 8.2 hour | Bardia/M2 | 43.6 | 43.9 (41.2-46.7) |
| 1.2 day | Borna/M3 | 194 | 206.6 (183.8-230.7) |
| 13.4 hour | Tandoureh/M4 | 56.8 | 59.8 (54.0-65.8) |
| 2.5 day | Iran/F5 | 423 | 330.9 (208.9-480.6) |
| 27 day | Kaveh/M6 | 752 | 2269.0 (1262.4-3565.9) |
## tau position (days) 3.505292 5.972745 10.17709
Can you clarify that?#This current version only treats one animal at a time and requries a dataframe with at least three columns:
#my.data$X (must be a capital "X") for the X coordinate
#my.data$Y (must be a capital "Y") for the Y coordinate
#This function relies on kernel.area (from adehabitatHR); currently it uses the kernel.area defaults, though the function can be modified to accomodate other parameters
#Similarly this function relies on nls() to fit the curve which may require different starting parameters depending on your data
#Cut and past the following 11 lines of code:
library(adehabitatHR)
core.area<-function(data){
IVseq<-seq(0.01,0.99,0.01)#sequence of isopleth volumes
kernel.areas<-as.numeric(as.character(kernel.area(kernelUD(SpatialPoints(data[,c("X","Y")])),percent=c(1:99))))#areas within the isopleths, modify kernel parameters here including coordinate systems
df<-as.data.frame(cbind(IVseq,kernel.areas/max(kernel.areas)))#create a dataframe with the percent area (PA) and isopleth volume (IV) scaled from 0-1
colnames(df)<-c("IV","PA")#name the columns
nls.fit<-nls(PA~(b0)*(exp(b1^IV)), data=df, start=list(b0=0.01, b1=4.2), na.action="na.omit", model=TRUE)#Caution: Starting parameters may differ for your data.
b0<-summary(nls.fit)$coefficients[1,1]#b0 coefficient
b1<-summary(nls.fit)$coefficients[2,1]#b0 coefficient
(-log(b0*b1)/b1)#isopleth volume where the curve's slope = 1
}