estc2: Numerically estimate c2 parameter

Description Usage Arguments Details Value See Also

View source: R/estc2.R

Description

Numerically estimate the c2 parameter for fbtgUD using a data-driven approach.

Usage

1
2
estc2(traj, tl, timefun = "exp", sigma = 0, lower = 0, upper = 1,
  rand = NA, niter = 10, tolerance = 0.01, plot = TRUE)

Arguments

traj

animal movement trajectory in the form of an ltraj object, see package adehabitatLT

tl

a TransitionLayer object

timefun

method for converting time into probability (see fbtgUD); one of:
'inverse' = \frac{1}{c_2 * t},
'inverse2' = \frac{1}{(c_2 * t)^2},
'exp' = \exp{-c_2 * t},
'norm' = \exp{-c_2 * t^2},
'rootexp' = \exp{-c_2 * √{t}},
'pareto' = \exp{-c_2 * \log{t}},
'lognorm'= \exp{-c_2 * \log{t^2}}.

sigma

location uncertainty parameter (see fbtgUD)

lower

lower bound for c2 testing range (default = 0)

upper

upper bound for c2 testing range (default = 1)

rand

if NA (the default) every second segment is evauluated (n/2), otherwise an integer indicating how many random segments to test.

niter

used to define maximum number of iterations of golden-search routine

tolerance

used to define precision of golden search routine (i.e., routine stops when the absolute difference between two consecutive test points is below this value).

plot

logical, whether or not to plot the log-likelihood curve.

Details

THe estimation of the c2 parameter for fbtgUD model takes an identical approach to that used with Brownian bridges, as originally proposed by Horne et al. (2007). A leave-one-out estimation technique is used, which essentially removes fixes and then estimates the fbtgUD surface between the two adjacent fixes – termed a segment – and computes the probability associated with the missing fix. The c2 value is returned that numerically maximizes the log-likelihood (for a given timefun – see details in fbtgUD) for length.out evenly spaced values of c2 between (user-defined) min and max. With plot = TRUE the user can verify that the chosen range of potential c2 values is appropriate, and if not, retry using a differnt range. The process is computationally demanding and is highly dependent on the number of 'segments' used. The parameter rand can be used to adjust the number of segments used to minimize computational time. If rand = NA it removes every second fix, and estimates c2 based on these n/2 segments (the default). Otherwise rand can be passed in as an integer, and rand randomly selected segments will be chosen to estimate c2. This is beneficial for trajectories with many fixes, where it might be useful to choose rand <<< n/2. Parrallelization is possible to further decrease computational time. This can be implemented by choosing an appropriate integer value for the parallel parameter (implemented using the foreach package).

Value

This function returns a numerical value estimate for c2 associated with the maximum of the log-likelihood.

See Also

fbtgUD


jedalong/wildlifeTG documentation built on July 17, 2019, 2:52 p.m.