This function plots a variogram object overlayed with a continuous-time movement model guesstimated from the variogram's shape. Sliders are given to adjust the parameter guesstimates and the result can be saved to a global variable. The intention of this function is to facilitate good starting guesses for ctmm.fit, starting with a prototype hypothesis argument CTMM, which can contain features such as isotropic, range, circle, etc..

ctmm.guess(data,CTMM=ctmm(),variogram=NULL,name="GUESS",interactive=TRUE)

variogram.fit(variogram,CTMM=ctmm(),name="GUESS",fraction=0.5,interactive=TRUE,...)

Arguments

data

A telemetry object.

CTMM

Optional model prototype or initial guesstimate of the model parameters, in ctmm object format.

name

Name of the global variable to store the guesstimate in.

interactive

Boolean denoting whether to render the initial guess with interactive sliders or store the result silently.

variogram

A variogram object from the output of variogram.

fraction

Initial fraction of the variogram to render.

...

Optional parameters passed to plot.variogram.

Details

By default, sigma is the asymptote of the variogram and tau is an array of autocorrelation timescales. The position timescale is roughly the time lag it takes of the variogram to reach 63% of its asymptote. The velocity autocorrelation timescale visually corresponds to width of the concave bowl shape at the beginning of the variogram. If CTMM=ctmm(range=FALSE), sigma is the asymptotic slope of the variogram and only the velocity timescale is finite.

By default, parameter values are estimated from the shape of the variogram. If this fails, the CTMM option can provide alternative initial guesstimates.

variogram.fit is called by ctmm.guess, and there is usually no reason to call variogram.fit directly.

Author

C. H. Fleming.

Note

If the manipulate package is unavailable, then interactive is set to FALSE.

Examples

#Load package and data
library(ctmm)
data(buffalo)

#Extract movement data for a single animal
DATA <- buffalo$Cilla

# generate a visual fit of the variogram (requires RStudio or a guess object is returned)
ctmm.guess(DATA)
#> An object of class "ctmm"
#> [[1]]
#> [1] "stationary"
#> 
#> [[2]]
#> [1] "identity"
#> 
#> [[3]]
#> [1] "identity"
#> 
#> [[4]]
#> [1] "stationary"
#> 
#> [[5]]
#>            x       y
#> [1,] 41242.5 -89.949
#> 
#> [[6]]
#> An object of class "covm"
#>          x        y
#> x 29518888  1390014
#> y  1390014 13085098
#> Slot "par":
#>        major        minor        angle 
#> 2.963563e+07 1.296836e+07 8.378940e-02 
#> 
#> Slot "isotropic":
#> sigma 
#> FALSE 
#> 
#> 
#> [[7]]
#>   all 
#> FALSE 
#> 
#> [[8]]
#> [1] FALSE
#> 
#> [[9]]
#> [1] "x" "y"
#> 
#> [[10]]
#> sigma 
#> FALSE 
#> 
#> [[11]]
#>   position   velocity 
#> 475866.739   6855.693 
#> 
#> [[12]]
#> [1] 0
#> 
#> [[13]]
#> [1] TRUE
#> 
#> Slot "info":
#> $identity
#> [1] "Cilla"
#> 
#> $timezone
#> [1] "UTC"
#> 
#> $projection
#> [1] "+proj=tpeqd +lon_1=31.7775407470691 +lat_1=-24.2850983757726 +lon_2=31.8880063438124 +lat_2=-25.024736901024 +datum=WGS84"
#> 
#> $axes
#> [1] "x" "y"
#> 
#>