optim and ctmm.loglike to maximize the likelihood function of continuous-time movement models described in Fleming et al (2014) and Fleming et al (2015), given 2D animal tracking data.ctmm(tau=NULL,isotropic=FALSE,range=TRUE,circle=FALSE,CPF=FALSE,error=FALSE,...)
ctmm.fit(data,CTMM=ctmm(),debias=TRUE,control=list(maxit=.Machine$integer.max),...)
ctmm.select(data,CTMM,verbose=FALSE,IC="AICc",...)telemetry object.ctmm movement-model object containing the initial parameter guesses conforming to the basic structure of the model hypothesis. ctmm.select can accept a list of such objects.sigma estimate.optim, but with parscale overwritten with reasonable defaults.optim.TRUE, else return only the selected model."AICc" is currently supported.ctmm.fit returns the maximum likelihood ctmm movement-model object with all of the components of CTMM plust the following:
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]ctmm parameter guess can be the output of ctmm.guess, variogram.fit or the function ctmm(...) with the argument tau explained below and additonal model options described in vignette("ctmm").
By default, tau is an ordered array of autocorrelation timescales.
If length(tau)==0, then an IID bi-variate Gaussian model is fit to the data.
If length(tau)==1, then an Ornstein-Uhlenbeck (OU) model (Brownian motion restricted to a finite home range) is fit the data, where tau is the position autocorrelation timescale. tau=Inf then yields Brownian motion (BM).
If length(tau)==2, then the OUF model (continuous-velocity motion restricted to a finite home range) is fit to the data, where tau[1] is again the position autocorrelation timescale and tau[2] is the velocity autocorrelation timescale. tau[1]=Inf then yields integrated Ornstein-Uhlenbeck (IOU) motion, which is a spatially unrestricted continuous-velocity process.
If CPF=TRUE, then an oscillatory central place foraging model is assumed. In this case tau must be an length-2 array containaing the foraging period in tau[1] (e.g., 1 day 24*60^2 seconds) and the characteristic timescale overwhich similarity between foraging excursions persists in tau[2].
debias=TRUE causes the maximum likelihood estimate (MLE) of the covariance sigma to be corrected by a prefactor of n/(n-k), where n is the number of data points and k is the number of mean parameters. If error=FALSE and other autocorrelation parameters such as tau are exact, then this correction is exact. If error=FALSE and and the other autocorrelation parameters are simply their MLE values, then this correction removes the lowest-order bias in sigma. If error=TRUE, then this is an undercorrection that is better than doing nothing. Residual maximum likelihood estimation (REML) could be more exact for error=TRUE, buth there is a potential tradeoff between bias and variablity.ctmm.loglike, ctmm.guess, optim, summary.ctmm, variogram.fit.# Load package and data
library(ctmm)
data(buffalo)
cilla <- buffalo[[1]]
# Fit a continuous-velocity model with tau ~ c(10 days,1 hour)
# also see help(variogram.fit)
GUESS <- ctmm(tau=c(10*24*60^2,60^2))
FIT <- ctmm.fit(cilla,GUESS)
# some human-readable information
summary(FIT)Run the code above in your browser using DataLab