Title: | Fit Movement Models to Argos Data for Marine Animals |
---|---|
Description: | Fits various state-space animal movement models to Argos data. Models are fitted by maximum likelihood with the Laplace approximation via 'TMB' and 'nlminb'. Functionality to visualize and simulate the models is available. |
Authors: | Christoffer Moesgaard Albertsen [aut, cre] |
Maintainer: | Christoffer Moesgaard Albertsen <[email protected]> |
License: | GPL-2 |
Version: | 1.2.2-1 |
Built: | 2024-11-23 02:46:46 UTC |
Source: | https://github.com/calbertsen/argosTrack |
A dataset containing tracking data from the Argos system for an adult ringed seal (Pusa hispida) released 10-30-2011 near Sanikiluaq, Nunavut, Canada.
adult_ringed_seal
adult_ringed_seal
A data frame with 2698 rows and 5 variables:
Tag id
Date and time of the observation
Argos location class of the observation
Observed latitude (degrees north) from the Argos system
Observed longitude (degrees east) from the Argos system
Fisheries and Oceans Canada
Albertsen, C. M., Whoriskey, K., Yurkowski, D., Nielsen, A., and Flemming, J. M. (2015) Fast fitting of non-Gaussian state-space models to animal movement data via Template Model Builder. Ecology, 96(10), 2598-2604. doi: 10.1890/14-2101.1
Construct an Animal object
Animal(observation, movement, measurement, name = "", ...)
Animal(observation, movement, measurement, name = "", ...)
observation |
an Observation object |
movement |
a Movement object |
measurement |
a Measurement object |
name |
Name of the animal |
... |
Other arguments not currently used |
An Animal class object
Christoffer Moesgaard Albertsen
Animal-class
Movement-class
Observation-class
Measurement-class
d <- subadult_ringed_seal obs <- Observation(lon = d$lon, lat = d$lat, dates = as.POSIXct(d$date,tz="GMT"), locationclass = d$lc ) meas <- Measurement(model="n") mov <- RW(unique(obs$dates)) anim <- Animal(obs,mov,meas,"Subadult") plot(anim)
d <- subadult_ringed_seal obs <- Observation(lon = d$lon, lat = d$lat, dates = as.POSIXct(d$date,tz="GMT"), locationclass = d$lc ) meas <- Measurement(model="n") mov <- RW(unique(obs$dates)) anim <- Animal(obs,mov,meas,"Subadult") plot(anim)
A Reference Class for combining animal movement model parts.
name
String identifying the animal
observation
Observation reference class
movement
Movement reference class
measurement
Measurement reference class
optim
List to keep results of optimization through fitTrack
addToLatPlot(obsarglist = list(pch = 16, col = "grey"), movarglist = list(),
sdarglist = list(col = "grey", border = NA, lwd = 3, lty = 2), sd = TRUE)
Function to add estimated movement and observation latitudes to a plot. obsarglist is a list of base graphics arguments to be used for observation data, movarglist is a list of base graphics arguments to be used for movement estimates, and sdarglist is a list of base graphics arguments to be used for movement standard errors (if sd = TRUE).
addToLonPlot(obsarglist = list(pch = 16, col = "grey"), movarglist = list(),
sdarglist = list(col = "grey", border = NA, lwd = 3, lty = 2), sd = TRUE)
Function to add estimated movement and observation longitudes to a plot. obsarglist is a list of base graphics arguments to be used for observation data, movarglist is a list of base graphics arguments to be used for movement estimates, and sdarglist is a list of base graphics arguments to be used for movement standard errors (if sd = TRUE).
addToMapPlot(obsarglist = list(type = "b", pch = 16, col = "grey"),
movarglist = list())
Function to add estimated movement and observation coordinates to a plot. obsarglist is a list of base graphics arguments to be used for observation data, movarglist is a list of base graphics arguments to be used for movement estimates, and sdarglist is a list of base graphics arguments to be used for movement standard errors (if sd = TRUE).
getRange(sd = FALSE, zoomToState = FALSE)
Returns the range of animal coordinates. If zoomToState = TRUE, only movement data is used. If sd = TRUE, the range includes standard errors of the movement estimates.
getTMBdata()
Function to return a data list for TMB::MakeADFun
getTMBmap(fixcorrection = FALSE, ...)
Function to return a map list for TMB::MakeADFun. If fixcorrection = TRUE, the ratio between measurement errors for argos data is fixed.
getTMBparameters()
Function to return a parameter list for TMB::MakeADFun
initialize(observation, movement, measurement, name = "", ...)
Method to initialize the class. 'observation' is an Observation reference class object, 'movement' is a Movement reference class object, 'measurement' is a Measuremenbt reference class object, and 'name' is an identifier string.
simulate(newObject = FALSE)
Function to simulate movement and measurement data for the Animal. A list containing the movement (X) and measurement (Y) data is returned. If newObject = TRUE, an Animal object is added to the list.
updateFromFit(opt)
Function to save the result from nlminb.
The reference class methods are not intended to be used by the user. Please use appropriate functions such as fitTrack
, plot
, plotLon
, plotLat
, plotMap
, and simTrack
.
Christoffer Moesgaard Albertsen
Animal
Movement-class
Observation-class
Measurement-class
These functions are provided to guide users from old versions of the package to the new functionality.
argosTrack(...)
argosTrack(...)
... |
Not used |
Nothing
The argosTrack function is replaced by a combination of functions. To achieve the similar results as the old function call,
argosTrack <- function(lon,lat,dates,locationclass, include = rep(TRUE,length(dates)), equalbetas = TRUE, timevarybeta = 1, fixgammas = TRUE, fixcorrection = FALSE, dfVals = NULL, dfMap = NULL, minDf = 3.0, errordistribution = "t", movementmodel = "ctcrw", verbose = TRUE, timeunit = "mins", nlminb.control = list(eval.max=2000, iter.max=1500, rel.tol=1e-3, x.tol=1.5e-2))
use:
obs <- Observation(lat = lat, lon = lon, dates = as.POSIXct(dates), locationclass = locationclass, include = include) mov <- CTCRW(dates = unique(as.POSIXct(dates)), timeunit = timeunit) meas <- Measurement(model = model,minDf = minDf) anim <- Animal(obs,mov,meas) fitTrack(anim, silent = !verbose, fixcorrection = fixcorrection, nlminb.control = nlminb.control equaldecay = equalbetas, fixdrift = fixgammas)
where the input of the functions corresponds to the argument names of the argosTrack
function.
Create a CSB movement model object
CSB(dates, pars = numeric(2), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
CSB(dates, pars = numeric(2), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
dates |
Vector of distinct and increasing POSIXct dates |
pars |
Vector of movement parameters: \eqnlog(\beta), \eqn\gamma |
varPars |
Vector of movement variance parameters: \eqnlog(\sigma_S), \eqnlog(\sigma_B) |
nauticalStates |
Should latent states be transformed from longitude/latitude to nautical miles? |
timeunit |
timeunit used for calculating time steps. |
A CSB object
Christoffer Moesgaard Albertsen
d <- subadult_ringed_seal mov <- argosTrack:::CSB(unique(as.POSIXct(d$date,tz="GMT")))
d <- subadult_ringed_seal mov <- argosTrack:::CSB(unique(as.POSIXct(d$date,tz="GMT")))
Create a CTCRW movement model object
CTCRW(dates, pars = numeric(4), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
CTCRW(dates, pars = numeric(4), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
dates |
Vector of distinct and increasing POSIXct dates |
pars |
Vector of movement parameters: \eqnlog(\beta_lat), \eqnlog(\beta_lon), \eqn\gamma_lat, \eqn\gamma_lon |
varPars |
Vector of movement variance parameters: \eqnlog(\sigma_lat), \eqnlog(\sigma_lon) |
nauticalStates |
Should latent states be transformed from longitude/latitude to nautical miles? |
timeunit |
timeunit used for calculating time steps. |
A CTCRW object
Christoffer Moesgaard Albertsen
d <- subadult_ringed_seal mov <- CTCRW(unique(as.POSIXct(d$date,tz="GMT")))
d <- subadult_ringed_seal mov <- CTCRW(unique(as.POSIXct(d$date,tz="GMT")))
The reference class implements a Continuous Time Correlated Random Walk (Johnson et al. 2008). The velocity is modelled by an Ornstein Uhlenbeck process in each coordinate (),
and the locations are modelled by the integrated velocity,
Here, is the length of the time steps and
,
are random variables.
follows a Gaussian distribution with mean zero and variance
. The
's are independent in time and coordiantes.
follows a Gaussian distribution with mean zero and variance
The 's are independent in time and coordiantes.
The model correlates
and
by
For and
,
getTMBmap(...)
Function to return a map list for TMB::MakeADFun.
simulate(x0 = c(0, 0, 0, 0))
Function to simulate from the movement model. The initial states (latitudianl velocity, longitudinal velocity, latitudinal/y-coordinate location and longitudinal/x-coordinate location) must be given. If nauticalStates==TRUE, the result is returned in nautical miles.
Johnson, D. S., J. M. London, M. A. Lea, and J. W. Durban. (2008) Continuous-time correlated random walk model for animal telemetry data. Ecology 89, 1208-1215.
Albertsen, C. M., Whoriskey, K., Yurkowski, D., Nielsen, A., and Flemming, J. M. (2015) Fast fitting of non-Gaussian state-space models to animal movement data via Template Model Builder. Ecology, 96(10), 2598-2604. doi: 10.1890/14-2101.1
Other "Movement models": CSB-class
,
DCRW-class
, DIRAC-class
,
DSBHN-class
, DSBW-class
,
GDCRW-class
, MPCTCRW-class
,
Movement-class
, OUL-class
,
OUV-class
, RW-class
Create a DCRW movement model object
DCRW(dates, pars = numeric(3), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
DCRW(dates, pars = numeric(3), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
dates |
Vector of distinct, equidistant, and increasing POSIXct dates |
pars |
Vector of movement parameters: \eqnlogit_(0,1)(\gamma), \eqn\phi, \eqnlogit_(-1,1)(\rho) |
varPars |
Vector of movement variance parameters: \eqnlog(\sigma_lat), \eqnlog(\sigma_lat) |
nauticalStates |
Should latent states be transformed from longitude/latitude to nautical miles? |
timeunit |
timeunit used for calculating time steps. |
A DCRW object
Christoffer Moesgaard Albertsen
d <- subadult_ringed_seal dates <- unique(as.POSIXct(d$date,tz="GMT")) dseq <- seq(min(dates),max(dates), "day") mov <- DCRW(dseq)
d <- subadult_ringed_seal dates <- unique(as.POSIXct(d$date,tz="GMT")) dseq <- seq(min(dates),max(dates), "day") mov <- DCRW(dseq)
The reference class implements a discrete time first Difference Correlated Random Walk (Jonsen et al. 2005). The locations are modelled by
Here, is zero mean Gaussian noise with covariance
\pmatrix{ \sigma_1^2 & \rho\sigma_1\sigma_2 \cr \rho\sigma_1\sigma_2 & \sigma_2^2 }
. is the rotation matrix
\pmatrix{ \cos(\phi) & -\sin(\phi) \cr \sin(\phi) & \cos(\phi) }
. is a scalar.
getTMBmap(...)
Function to return a map list for TMB::MakeADFun.
simulate(x0 = c(0, 0))
Function to simulate from the movement model. The initial states (latitudinal/y-coordinate location and longitudinal/x-coordinate location) must be given. If nauticalStates==TRUE, the result is returned in nautical miles.
Jonsen, I., J. Mills Flemming, and R. Myers. (2005) Robust state-space modeling of animal movement data. Ecology 86, 2874-2880.
Other "Movement models": CSB-class
,
CTCRW-class
, DIRAC-class
,
DSBHN-class
, DSBW-class
,
GDCRW-class
, MPCTCRW-class
,
Movement-class
, OUL-class
,
OUV-class
, RW-class
Create a DIRAC movement model object
DIRAC(dates, pars = numeric(0), varPars = numeric(0), nauticalStates = FALSE, timeunit = "hours")
DIRAC(dates, pars = numeric(0), varPars = numeric(0), nauticalStates = FALSE, timeunit = "hours")
dates |
Vector of distinct and increasing POSIXct dates |
pars |
Zero length vector of movement parameters |
varPars |
Zero length vector of movement variance parameters |
nauticalStates |
Should latent states be transformed from longitude/latitude to nautical miles? |
timeunit |
timeunit used for calculating time steps. |
A DIRAC object
Christoffer Moesgaard Albertsen
d <- subadult_ringed_seal mov <- DIRAC(unique(as.POSIXct(d$date,tz="GMT")))
d <- subadult_ringed_seal mov <- DIRAC(unique(as.POSIXct(d$date,tz="GMT")))
The reference class implements a Dirac movement model with no movement
getTMBmap(...)
Function to return a map list for TMB::MakeADFun.
simulate(x0 = c(0, 0))
Function to simulate from the movement model. The initial states (latitudinal/y-coordinate location and longitudinal/x-coordinate location) must be given. The function only returns the locations. If nauticalStates==TRUE, the result is returned in nautical miles.
Christoffer Moesgaard Albertsen
Other "Movement models": CSB-class
,
CTCRW-class
, DCRW-class
,
DSBHN-class
, DSBW-class
,
GDCRW-class
, MPCTCRW-class
,
Movement-class
, OUL-class
,
OUV-class
, RW-class
d <- subadult_ringed_seal mov <- DIRAC(unique(as.POSIXct(d$date,tz="GMT")))
d <- subadult_ringed_seal mov <- DIRAC(unique(as.POSIXct(d$date,tz="GMT")))
Create a DSBHN movement model object
DSBHN(dates, pars = numeric(1), varPars = numeric(1), nauticalStates = FALSE, timeunit = "hours")
DSBHN(dates, pars = numeric(1), varPars = numeric(1), nauticalStates = FALSE, timeunit = "hours")
dates |
Vector of distinct and increasing POSIXct dates |
pars |
Vector of movement parameters: \eqnlog(\rho) |
varPars |
Vector of movement variance parameters: \eqnlog(\sigma) |
nauticalStates |
Should latent states be transformed from longitude/latitude to nautical miles? |
timeunit |
timeunit used for calculating time steps. |
A DSBHN object
Christoffer Moesgaard Albertsen
d <- subadult_ringed_seal dates <- unique(as.POSIXct(d$date,tz="GMT")) dseq <- seq(min(dates),max(dates), "day") mov <- DSBHN(dseq)
d <- subadult_ringed_seal dates <- unique(as.POSIXct(d$date,tz="GMT")) dseq <- seq(min(dates),max(dates), "day") mov <- DSBHN(dseq)
The reference class implements a Discrete time Step-length/Bearings model with Half Normal distributed steps.
Let be the (bivariate) location (in nautical miles) at time
. The step lengths are
and the bearings are
where denotes the east/west coordinate and
denotes the north/south coordinate.
The step lengths are modelled by a half normal distribution
and the bearings are modelled by a wrapped Cauchy distribution with location parameter and concentration parameter
.
getTMBparameters()
Function to return a parameter list for TMB::MakeADFun
simulate(x0 = c(0, 0))
Function to simulate from the movement model. The initial states (latitudinal/y-coordinate location and longitudinal/x-coordinate location) must be given. If nauticalStates==TRUE, the result is returned in nautical miles.
Step-length/Bearings models can be difficult for the Laplace approximation. Estimation problems can often be solved by decreasing the number of states relative to the number of observations.
Movement-class
, link{DSBHN}
, link{DSBW}
.
Other "Movement models": CSB-class
,
CTCRW-class
, DCRW-class
,
DIRAC-class
, DSBW-class
,
GDCRW-class
, MPCTCRW-class
,
Movement-class
, OUL-class
,
OUV-class
, RW-class
Create a DSBW movement model object
DSBW(dates, pars = numeric(3), varPars = numeric(0), nauticalStates = FALSE, timeunit = "hours")
DSBW(dates, pars = numeric(3), varPars = numeric(0), nauticalStates = FALSE, timeunit = "hours")
dates |
Vector of distinct and increasing POSIXct dates |
pars |
Vector of movement parameters: \eqnlog(\rho), \eqnlog(shape), \eqnlog(scale) |
varPars |
Zeero length vector of movement variance parameters |
nauticalStates |
Should latent states be transformed from longitude/latitude to nautical miles? |
timeunit |
timeunit used for calculating time steps. |
A DSBW object
Christoffer Moesgaard Albertsen
d <- subadult_ringed_seal dates <- unique(as.POSIXct(d$date,tz="GMT")) dseq <- seq(min(dates),max(dates), "day") mov <- DSBW(dseq)
d <- subadult_ringed_seal dates <- unique(as.POSIXct(d$date,tz="GMT")) dseq <- seq(min(dates),max(dates), "day") mov <- DSBW(dseq)
The reference class implements a Discrete time Step-length/Bearings model with Weibull distributed steps (McClintock et al. 2015, with small modifications).
Let be the (bivariate) location (in nautical miles) at time
. The step lengths are
and the bearings are
where denotes the east/west coordinate and
denotes the north/south coordinate.
The step lengths are modelled by a half normal distribution
and the bearings are modelled by a wrapped Cauchy distribution with location parameter and concentration parameter
.
getTMBparameters()
Function to return a parameter list for TMB::MakeADFun
simulate(x0 = c(0, 0))
Function to simulate from the movement model. The initial states (latitudinal/y-coordinate location and longitudinal/x-coordinate location) must be given. If nauticalStates==TRUE, the result is returned in nautical miles.
Step-length/Bearings models can be difficult for the Laplace approximation. Estimation problems can often be solved by using DSBHN
instead or by decreasing the number of states relative to the number of observations.
McClintock, B. T., London, J. M., Cameron, M. F. and Boveng, P. L. (2015) Modelling animal movement using the Argos satellite telemetry location error ellipse. Methods Ecol Evol, 6: 266-277. doi:10.1111/2041-210X.12311
Other "Movement models": CSB-class
,
CTCRW-class
, DCRW-class
,
DIRAC-class
, DSBHN-class
,
GDCRW-class
, MPCTCRW-class
,
Movement-class
, OUL-class
,
OUV-class
, RW-class
Generic function to fit movement models.
fitTrack(object, ...)
fitTrack(object, ...)
object |
The object to be fitted |
... |
Additional arguments passed to the appropriate method |
The optimization result
Fits the state-space movement determined by object using maximum likelihood estimation with the Laplace approximation.
## S4 method for signature 'Animal' fitTrack(object, method = c("laplace", "mcmc"), silent = FALSE, fixcorrection = FALSE, nlminb.control = list(), inner.control = list(maxit = 1000), ...)
## S4 method for signature 'Animal' fitTrack(object, method = c("laplace", "mcmc"), silent = FALSE, fixcorrection = FALSE, nlminb.control = list(), inner.control = list(maxit = 1000), ...)
object |
Animal reference class object |
method |
Estimation method. Either laplace for maximum likelihood estimation with the Laplace approximation or mcmc for Markov Chain Monte Carlo (not yet implemented). |
silent |
Disable all tracing information? |
fixcorrection |
Should the ratio between measurement errors be fixed? |
nlminb.control |
List of control arguments passed to 'nlminb' |
inner.control |
List of control arguments passed to 'TMB::newton' |
... |
Additional arguments passed to object$getTMBmap |
The result returned from 'nlminb' is returned invisibly.
The function changes 'object'.
Christoffer Moesgaard Albertsen
Create a GDCRW movement model object
GDCRW(dates, pars = numeric(6), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
GDCRW(dates, pars = numeric(6), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
dates |
Vector of distinct and increasing POSIXct dates |
pars |
Vector of movement parameters: \eqnlogit_(0,1)(\gamma_lat), \eqnlogit_(0,1)(gamma_lon), \eqn\phi, \eqnlogit_(-1,1)(\rho), \eqn\mu_lat, \eqn\mu_lon |
varPars |
Vector of movement variance parameters: \eqnlog(\sigma_lat), \eqnlog(\sigma_lon) |
nauticalStates |
Should latent states be transformed from longitude/latitude to nautical miles? |
timeunit |
timeunit used for calculating time steps. |
A GDCRW object
Christoffer Moesgaard Albertsen
d <- subadult_ringed_seal mov <- GDCRW(unique(as.POSIXct(d$date,tz="GMT")))
d <- subadult_ringed_seal mov <- GDCRW(unique(as.POSIXct(d$date,tz="GMT")))
The reference class implements an Irregularized first Difference Correlated Random Walk (Albertsen 2016). The velocity is modelled by the (bivariate) stochastic differential equation
dV_t = -\pmatrix{ -\log\gamma_1 & \phi \cr -\phi & -\log\gamma_2 } (V_t-\mu) d_t + S dB_t,
or for convenience
Since the locations are know from the velocity by , the increments are known as
Hence,
X_{t_n} = X_{t_{n-1}} + \mu \pmatrix{ \cos ((t_n-t_{n-1})\phi) & -\sin ((t_n-t_{n-1})\phi) \cr \sin ((t_n-t_{n-1})\phi) & \cos ((t_n-t_{n-1})\phi) } \pmatrix{ \gamma_1^{t_n-t_{n-1}} & 0 \cr 0 & \gamma_2^{t_n-t_{n-1}} } (X_{t_{n-1}} - X_{t_{n-2}} - \mu)
getTMBmap(...)
Function to return a map list for TMB::MakeADFun.
simulate(x0 = c(0, 0))
Function to simulate from the movement model. The initial states (latitudinal/y-coordinate location and longitudinal/x-coordinate location) must be given. If nauticalStates==TRUE, the result is returned in nautical miles.
Albertsen, C.M. (2016) Personal communication.
Movement-class
, GDCRW
. A generalization of DCRW
, RW
, and CTCRW
(except only the location is modelled here and it is assumed to be known given the velocities)
Other "Movement models": CSB-class
,
CTCRW-class
, DCRW-class
,
DIRAC-class
, DSBHN-class
,
DSBW-class
, MPCTCRW-class
,
Movement-class
, OUL-class
,
OUV-class
, RW-class
Generic function to extract movement track.
getTrack(object, ...)
getTrack(object, ...)
object |
The object from which to extract the track |
... |
Additional arguments passed to the appropriate method |
A data frame of positions
getTrack,Animal-method
getTrack,Movement-method
getTrack,Observation-method
Extracts the estimated and observed track from an Animal object
## S4 method for signature 'Animal' getTrack(object, ...)
## S4 method for signature 'Animal' getTrack(object, ...)
object |
Animal reference class object |
... |
Additional arguments passed to the appropriate method |
A data frame of positions
Christoffer Moesgaard Albertsen
Extracts the estimated track from a Movement object
## S4 method for signature 'Movement' getTrack(object, ...)
## S4 method for signature 'Movement' getTrack(object, ...)
object |
Movement-class reference class object |
... |
Additional arguments passed to the appropriate method |
A data frame of positions
Christoffer Moesgaard Albertsen
Extracts the observed track from an Observation object
## S4 method for signature 'Observation' getTrack(object, ...)
## S4 method for signature 'Observation' getTrack(object, ...)
object |
Observation reference class object |
... |
Additional arguments passed to the appropriate method |
A data frame of positions
Christoffer Moesgaard Albertsen
Construct a Measurement object
Measurement(model = c("n", "t", "sh"), logSdObs = c(0, 0), corObs = 0, logCorrection = matrix(c(0.6507, 0.8231, 2.3432, 2.0532, 3.8514, 2.9602, 3.828, 3.0463, 4.4417, 3.6951, 5.5714, 5.5149, 8, 8), 2, 7), splineXlogSd = 0, knotPars = numeric(5), df = numeric(8), minDf = 3, nauticalObs = FALSE, ...)
Measurement(model = c("n", "t", "sh"), logSdObs = c(0, 0), corObs = 0, logCorrection = matrix(c(0.6507, 0.8231, 2.3432, 2.0532, 3.8514, 2.9602, 3.828, 3.0463, 4.4417, 3.6951, 5.5714, 5.5149, 8, 8), 2, 7), splineXlogSd = 0, knotPars = numeric(5), df = numeric(8), minDf = 3, nauticalObs = FALSE, ...)
model |
Measurement model distribution |
logSdObs |
Variance parameters on log-scale |
corObs |
Correlation parameter |
logCorrection |
Correction parameters between location classes |
splineXlogSd |
Longitudinal variance parameter for spline model |
knotPars |
Latitudinal variance parameters for spline model |
df |
Degrees of freedom parameters for t distribution |
minDf |
Minimal degrees of freedom |
nauticalObs |
Transform observations from longitude/latitude to nautical miles? |
... |
Not currently used |
a Measurement object
Christoffer Moesgaard Albertsen
Measurement-class
Movement-class
Observation
Animal
d <- subadult_ringed_seal obs <- Observation(lon = d$lon, lat = d$lat, dates = as.POSIXct(d$date,tz="GMT"), locationclass = d$lc ) meas <- Measurement(model="t") mov <- RW(unique(obs$dates)) anim <- Animal(obs,mov,meas,"Subadult") plot(anim)
d <- subadult_ringed_seal obs <- Observation(lon = d$lon, lat = d$lat, dates = as.POSIXct(d$date,tz="GMT"), locationclass = d$lc ) meas <- Measurement(model="t") mov <- RW(unique(obs$dates)) anim <- Animal(obs,mov,meas,"Subadult") plot(anim)
A Reference Class for specifying a measurement model.
Following Albertsen et al. (2015), the reference class describes the measurement part of the state-space model for the movement data:
Here , is the observation,
is the state process at the corresponding time and
is random noise (either Gaussian, t or symmetric hyperbolic) with scale matrix
, where
is the argos location class of the observation.
If the time steps of the state process does not correspond to the observation time stamps (e.g. for a discrete time movement model), a linear interpolation between the last state before and the first state after the observation is used as
(as Jonsen et al. 2005).
The symmetric hyperbolic distribution is a special case of the distribution introduced by Barndorff-Nielsen (1977). The un-normalized density is
where is a vector of observations,
is a scalar parameter,
is a vector of location parameters, and
is a positive definite scale matrix.
model
Either "n" for multivariate Gaussian measurements, "t" for multivariate t-distributed measurements (Lange et al. 1989), or "sh" for multivariate symmetric hyperbolic distributed measurements of Argos data (Experimental; see Details).
logSdObs
Vector of scale parameters (See Details)
corObs
Correlation parameter between coordiantes (not implemented yet)
logCorrection
Matrix of scale matrix ratios (See Details)
vcov
Covariance matrix of parameter estimates
splineXlogSd
Not used for Argos data
knotPars
Not used for Argos data
df
Degrees of freedom for model == "t"
minDf
Minimum degrees of freedom to allow in the model
nauticalObs
Should the observations be modelled in nautical miles?
reportSpline
Not used for Argos data
getTMBdata(dayOfYearSpline = c())
Function to return a data list for TMB::MakeADFun. Intended to be called from an Animal reference class object.
getTMBmap(correlated = FALSE, useSpline = FALSE, fixcorrection = FALSE,
usedLevels = c("GPS", "3", "2", "1", "0", "A", "B", "Z"),
numPerLevel = c(), needExtraVarPar = FALSE)
Function to return a map list for TMB::MakeADFun. Intended to be called from an Animal reference class object.
getTMBparameters()
Function to return a parameter list for TMB::MakeADFun. Intended to be called from an Animal reference class object.
initialize(model = c("n", "t", "sh"), logSdObs = c(0, 0), corObs = 0,
logCorrection = matrix(c(0.6507, 0.8231, 2.3432, 2.0532, 3.8514, 2.9602,
3.828, 3.0463, 4.4417, 3.6951, 5.5714, 5.5149, 8, 8), 2, 7),
splineXlogSd = 0, knotPars = numeric(5), df = numeric(8), minDf = 3,
nauticalObs = FALSE, ...)
Method to initialize the class. Input corresponds to the reference class fields.
simulate(observation)
Function to simulate measurement data. 'observation' is an Observation reference class object, containing the time points and Argos location classes for the simulation. A matrix containing the measurement data is returned.
updateFromFit(parList, hessian, reportSpline)
Function to save the result from nlminb.
The reference class methods are not intended to be used by the user. Please use appropriate functions such as simTrack
.
Christoffer Moesgaard Albertsen
Albertsen, C. M., Whoriskey, K., Yurkowski, D., Nielsen, A., and Flemming, J. M. (2015) Fast fitting of non-Gaussian state-space models to animal movement data via Template Model Builder. Ecology, 96(10), 2598-2604. doi: 10.1890/14-2101.1
Barndorff-Nielsen, O. (1977) Exponentially decreasing distributions for the logarithm of particle size. Proc. R. Soc. Lond. A. 353, 401-419.
Jonsen, I., J. Mills Flemming, and R. Myers. (2005) Robust state-space modeling of animal movement data. Ecology 86, 2874-2880.
Lange, K., Roderick J. A. Little, & Jeremy M. G. Taylor. (1989). Robust Statistical Modeling Using the t Distribution. Journal of the American Statistical Association, 84(408), 881-896.
Measurement
Movement-class
, Observation-class
, Animal-class
Reference class implementing common functions for movement models.
addToLatPlot(arglist = list())
Function to add estimated movement latitudes to a plot. arglist is a list of base graphics arguments to be used for movement estimates.
addToLatPlotSd(arglist = list(col = "grey", border = NA, lwd = 3, lty = 2))
Function to add standard errors of estimated movement latitudes to a plot. arglist is a list of base graphics arguments to be used.
addToLonPlot(arglist = list())
Function to add estimated movement longitudes to a plot. arglist is a list of base graphics arguments to be used for movement estimates.
addToLonPlotSd(arglist = list(col = "grey", border = NA, lwd = 3, lty = 2))
Function to add standard errors of estimated movement longitudes to a plot. arglist is a list of base graphics arguments to be used.
addToMapPlot(arglist = list())
Function to add estimated movement coordinates to a plot. arglist is a list of base graphics arguments to be used.
getRange(sd = FALSE)
Returns the range of estimated coordinates. If sd = TRUE, the range includes standard errors of the movement estimates.
getTMBdata()
Function to return a data list for TMB::MakeADFun
getTMBmap(...)
Function to return a map list for TMB::MakeADFun.
getTMBparameters()
Function to return a parameter list for TMB::MakeADFun
updateFromFit(parList, hessian, sdParList = NULL)
Function to save the result from nlminb.
This reference class should not be used as it does not implement a model. The class is only intended to be a superclass for actual implementations of movement models. A movement model implementation must include an initialization method, a simulation method and (preferably) a getTMBmap method.
Used in Animal
. Currently the following movement models are implemented: CTCRW
, DCRW
, DSBHN
, DSBW
, RW
.
Other "Movement models": CSB-class
,
CTCRW-class
, DCRW-class
,
DIRAC-class
, DSBHN-class
,
DSBW-class
, GDCRW-class
,
MPCTCRW-class
, OUL-class
,
OUV-class
, RW-class
A Reference Class for argosTrack observations.
lat
Latitude of observations
lon
Longitude of observations
dates
POSIXct vector of time stamps for observations
dayOfYear
Day of year corresponding to dates
qual
Factor of Argos location quality classes
varModelCode
Integer vector of variance model codes (0, 1, 2, or 3)
include
Logical vector of whether observations should be included in likelihood
addToLatPlot(arglist = list(pch = 16, col = "grey"))
Function to add observed latitudes to a plot. arglist is a list of base graphics arguments to be used for plotting.
addToLonPlot(arglist = list(pch = 16, col = "grey"))
Function to add observed longitudes to a plot. arglist is a list of base graphics arguments to be used for plotting.
addToMapPlot(arglist = list(type = "b", pch = 16, col = "grey"))
Function to add observed coordinates to a plot. arglist is a list of base graphics arguments to be used for plotting.
getRange()
Returns the range of observed coordinates.
getTMBdata()
Function to return a data list for TMB::MakeADFun
getTMBmap(...)
Function to return a map list for TMB::MakeADFun.
getTMBparameters()
Function to return a parameter list for TMB::MakeADFun
initialize(lon, lat, dates, locationclass, include = rep(TRUE, length(dates)),
...)
Method to initialize the class. 'lon' is a vector of longitudes, 'lat' is a vector of latitudes, 'dates' is a vector of POSIXct dates, 'locationclass' is a factor of Argos locatin classes, and Observation reference class object, 'movement' is a Movement reference class object, 'measurement' is a Measuremenbt reference class object, and 'include' is a logical vector of whether observations should be included in likelihood.
Christoffer Moesgaard Albertsen
Movement-class
, Measurement
, Animal
d <- subadult_ringed_seal obs <- Observation(lon = d$lon, lat = d$lat, dates = as.POSIXct(d$date,tz="GMT"), locationclass = d$lc ) plot(obs)
d <- subadult_ringed_seal obs <- Observation(lon = d$lon, lat = d$lat, dates = as.POSIXct(d$date,tz="GMT"), locationclass = d$lc ) plot(obs)
Create an OUL movement model object
OUL(dates, pars = c(1, 0, 0, 1, 0, 0), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
OUL(dates, pars = c(1, 0, 0, 1, 0, 0), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
dates |
Vector of distinct and increasing POSIXct dates |
pars |
Vector of movement parameters: \eqnB_1,1, \eqnB_2,1, \eqnB_1,2, \eqnB_2,2, \eqn\gamma_lat, \eqn\gamma_lon |
varPars |
Vector of movement variance parameters: \eqnlog(\sigma_lat), \eqnlog(\sigma_lon) |
nauticalStates |
Should latent states be transformed from longitude/latitude to nautical miles? |
timeunit |
timeunit used for calculating time steps. |
A OUL object
Christoffer Moesgaard Albertsen
d <- subadult_ringed_seal mov <- OUL(unique(as.POSIXct(d$date,tz="GMT")))
d <- subadult_ringed_seal mov <- OUL(unique(as.POSIXct(d$date,tz="GMT")))
The reference class implements an Ornstein-Uhlenbeck Location (Blackwell 2016). The locations follow an Ornstein-Uhlenbeck process
where is a bivariate normal with zero mean and covariance
\pmatrix{\sigma_1^2 & 0 \cr 0 & \sigma_2^2}
.
getTMBmap(...)
Function to return a map list for TMB::MakeADFun.
simulate(x0 = c(0, 0))
Function to simulate from the movement model. The initial states (latitudinal/y-coordinate location and longitudinal/x-coordinate location) must be given. If nauticalStates==TRUE, the result is returned in nautical miles.
Blackwell, P. G., Niu, M., Lambert, M. S. and LaPoint, S. D. (2016), Exact Bayesian inference for animal movement in continuous time. Methods Ecol Evol, 7: 184-195. doi:10.1111/2041-210X.12460
Other "Movement models": CSB-class
,
CTCRW-class
, DCRW-class
,
DIRAC-class
, DSBHN-class
,
DSBW-class
, GDCRW-class
,
MPCTCRW-class
,
Movement-class
, OUV-class
,
RW-class
Plots time latitude, time
longitude and longitude
latitude for an Animal reference class object.
## S3 method for class 'Animal' plot(x, ...)
## S3 method for class 'Animal' plot(x, ...)
x |
Animal reference class object |
... |
other parameters to be passed through to plotting functions. |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
Plots time latitude, time
longitude and longitude
latitude for a Movement reference class object.
## S3 method for class 'Movement' plot(x, ...)
## S3 method for class 'Movement' plot(x, ...)
x |
Movement reference class object |
... |
other parameters to be passed through to plotting functions. |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
Generic latitude plot
plotLat(object, ...)
plotLat(object, ...)
object |
Object to plot |
... |
other parameters to be passed through to plotting functions. |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotLat,Animal-method
, plotLat,Movement-method
, plotLat,Observation-method
Latitude plot for an Animal reference class object
## S4 method for signature 'Animal' plotLat(object, plotArgs = list(), args = list(lwd = 3, col = "red"), add = FALSE, obsArgs = list(pch = 16), sdArgs = list(col = "grey", border = NA), sd = FALSE, ...)
## S4 method for signature 'Animal' plotLat(object, plotArgs = list(), args = list(lwd = 3, col = "red"), add = FALSE, obsArgs = list(pch = 16), sdArgs = list(col = "grey", border = NA), sd = FALSE, ...)
object |
Animal reference class object |
plotArgs |
Arguments to setup background plot |
args |
Arguments for plotting latitude movement data. |
add |
If FALSE a new plot window is created. |
obsArgs |
Arguments for plotting latitude observation data. |
sdArgs |
Arguments for plotting standard errors. |
sd |
Should standard errors be plotted? |
... |
additional arguments |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotLat
, plotLat,Movement-method
, plotLat,Observation-method
Latitude plot for a Movement reference class object
## S4 method for signature 'Movement' plotLat(object, plotArgs = list(), args = list(), add = FALSE, sdArgs = list(col = "grey", border = NA), sd = FALSE, ...)
## S4 method for signature 'Movement' plotLat(object, plotArgs = list(), args = list(), add = FALSE, sdArgs = list(col = "grey", border = NA), sd = FALSE, ...)
object |
Movement reference class object |
plotArgs |
Arguments to setup background plot |
args |
Arguments for plotting latitude movement data. |
add |
If FALSE a new plot window is created. |
sdArgs |
Arguments for plotting standard errors. |
sd |
Should standard errors be plotted? |
... |
additional arguments |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotLat
, plotLat,Animal-method
, plotLat,Observation-method
Latitude plot for an Observation reference class object
## S4 method for signature 'Observation' plotLat(object, plotArgs = list(), args = list(), add = FALSE, ...)
## S4 method for signature 'Observation' plotLat(object, plotArgs = list(), args = list(), add = FALSE, ...)
object |
Observation reference class object |
plotArgs |
Arguments to setup background plot |
args |
Arguments for plotting latitude observation data. |
add |
If FALSE a new plot window is created. |
... |
additional arguments |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotLat
, plotLat,Animal-method
, plotLat,Movement-method
Generic longitude plot
plotLon(object, ...)
plotLon(object, ...)
object |
Object to plot |
... |
other parameters to be passed through to plotting functions. |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotLon,Animal-method
, plotLon,Movement-method
, plotLon,Observation-method
Longitude plot for an Animal reference class object
## S4 method for signature 'Animal' plotLon(object, plotArgs = list(), args = list(lwd = 3, col = "red"), add = FALSE, obsArgs = list(pch = 16), sdArgs = list(col = "grey", border = NA), sd = FALSE, ...)
## S4 method for signature 'Animal' plotLon(object, plotArgs = list(), args = list(lwd = 3, col = "red"), add = FALSE, obsArgs = list(pch = 16), sdArgs = list(col = "grey", border = NA), sd = FALSE, ...)
object |
Animal reference class object |
plotArgs |
Arguments to setup background plot |
args |
Arguments for plotting longitude movement data. |
add |
If FALSE a new plot window is created. |
obsArgs |
Arguments for plotting longitude observation data. |
sdArgs |
Arguments for plotting standard errors. |
sd |
Should standard errors be plotted? |
... |
additional arguments |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotLon
, plotLon,Movement-method
, plotLon,Observation-method
Longitude plot for a Movement reference class object
## S4 method for signature 'Movement' plotLon(object, plotArgs = list(), args = list(), add = FALSE, sdArgs = list(col = "grey", border = NA), sd = TRUE, ...)
## S4 method for signature 'Movement' plotLon(object, plotArgs = list(), args = list(), add = FALSE, sdArgs = list(col = "grey", border = NA), sd = TRUE, ...)
object |
Movement reference class object |
plotArgs |
Arguments to setup background plot |
args |
Arguments for plotting longitude movement data. |
add |
If FALSE a new plot window is created. |
sdArgs |
Arguments for plotting standard errors. |
sd |
Should standard errors be plotted? |
... |
additional arguments |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotLon
, plotLon,Animal-method
, plotLon,Observation-method
Longitude plot for an Observation reference class object
## S4 method for signature 'Observation' plotLon(object, plotArgs = list(), args = list(), add = FALSE, ...)
## S4 method for signature 'Observation' plotLon(object, plotArgs = list(), args = list(), add = FALSE, ...)
object |
Observation reference class object |
plotArgs |
Arguments to setup background plot |
args |
Arguments for plotting Longitude observation data. |
add |
If FALSE a new plot window is created. |
... |
additional arguments |
Invisibly returns the reference class object
@seealso plotLon
, plotLon,Animal-method
, plotLon,Movement-method
Christoffer Moesgaard Albertsen
Generic map plot
plotMap(object, ...)
plotMap(object, ...)
object |
Object to plot |
... |
other parameters to be passed through to plotting functions. |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotMap,Animal-method
, plotMap,Movement-method
, plotMap,Observation-method
Map plot for an Animal reference class object
## S4 method for signature 'Animal' plotMap(object, plotArgs = list(), args = list(lwd = 3, col = "red"), add = FALSE, obsArgs = list(pch = 16), sdArgs = list(col = "grey", border = NA), ...)
## S4 method for signature 'Animal' plotMap(object, plotArgs = list(), args = list(lwd = 3, col = "red"), add = FALSE, obsArgs = list(pch = 16), sdArgs = list(col = "grey", border = NA), ...)
object |
Animal reference class object |
plotArgs |
Arguments to setup background plot |
args |
Arguments for plotting movement data. |
add |
If FALSE a new plot window is created. |
obsArgs |
Arguments for plotting observation data. |
sdArgs |
Arguments for plotting standard errors. |
... |
additional arguments |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotMap
, plotMap,Movement-method
, plotMap,Observation-method
Map plot for a Movement reference class object
## S4 method for signature 'Movement' plotMap(object, plotArgs = list(), args = list(pch = 16, lwd = 3, col = "red"), add = FALSE, sdArgs = list(col = "grey", border = NA), ...)
## S4 method for signature 'Movement' plotMap(object, plotArgs = list(), args = list(pch = 16, lwd = 3, col = "red"), add = FALSE, sdArgs = list(col = "grey", border = NA), ...)
object |
Movement reference class object |
plotArgs |
Arguments to setup background plot |
args |
Arguments for plotting movement data. |
add |
If FALSE a new plot window is created. |
sdArgs |
Arguments for plotting standard errors. |
... |
additional arguments |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotMap
, plotMap,Animal-method
, plotMap,Observation-method
Map plot for an Observation reference class object
## S4 method for signature 'Observation' plotMap(object, plotArgs = list(), args = list(pch = 16, lwd = 3, col = "red"), add = FALSE, sdArgs = list(col = "grey", border = NA), ...)
## S4 method for signature 'Observation' plotMap(object, plotArgs = list(), args = list(pch = 16, lwd = 3, col = "red"), add = FALSE, sdArgs = list(col = "grey", border = NA), ...)
object |
Observation reference class object |
plotArgs |
Arguments to setup background plot |
args |
Arguments for plotting latitude observation data. |
add |
If FALSE a new plot window is created. |
sdArgs |
Arguments for plotting standard errors. |
... |
additional arguments |
Invisibly returns the reference class object
Christoffer Moesgaard Albertsen
plotMap
, plotMap,Animal-method
, plotMap,Movement-method
Generic roseplot
roseplot(object, ...)
roseplot(object, ...)
object |
Object to plot |
... |
other parameters |
Christoffer Moesgaard Albertsen
Calls roseplot on object$movement
## S4 method for signature 'Animal' roseplot(object, ...)
## S4 method for signature 'Animal' roseplot(object, ...)
object |
Animal reference class object |
... |
parameters passed to the method for the Movement reference class |
Christoffer Moesgaard Albertsen
Roseplot for Movement reference class object
## S4 method for signature 'Movement' roseplot(object, nclass = 35, prob = TRUE, type = c("both", "step", "angle"), bearings = FALSE, show = TRUE, ...)
## S4 method for signature 'Movement' roseplot(object, nclass = 35, prob = TRUE, type = c("both", "step", "angle"), bearings = FALSE, show = TRUE, ...)
object |
Movement reference class object |
nclass |
Number of histogram classes |
prob |
Scale the frequencies to probabilities? |
type |
'step' for plotting step lengths, 'angle' for plotting angles and 'both' for plotting both. |
bearings |
Plot bearings (TRUE) or turning angles (FALSE) |
show |
Should a plot be produced? |
... |
not used |
Invisibly returns a list of bearings, step lengths and step lengths in km/h.
Christoffer Moesgaard Albertsen
d <- subadult_ringed_seal obs <- Observation(lon = d$lon, lat = d$lat, dates = as.POSIXct(d$date,tz="GMT"), locationclass = d$lc ) meas <- Measurement(model="n") mov <- RW(unique(obs$dates)) roseplot(mov)
d <- subadult_ringed_seal obs <- Observation(lon = d$lon, lat = d$lat, dates = as.POSIXct(d$date,tz="GMT"), locationclass = d$lc ) meas <- Measurement(model="n") mov <- RW(unique(obs$dates)) roseplot(mov)
Create a RW movement model object
RW(dates, pars = numeric(0), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
RW(dates, pars = numeric(0), varPars = numeric(2), nauticalStates = FALSE, timeunit = "hours")
dates |
Vector of distinct and increasing POSIXct dates |
pars |
Zero length vector of movement parameters |
varPars |
Vector of movement variance parameters: \eqnlog(\sigma_lat), \eqnlog(\sigma_lon) |
nauticalStates |
Should latent states be transformed from longitude/latitude to nautical miles? |
timeunit |
timeunit used for calculating time steps. |
A RW object
Christoffer Moesgaard Albertsen
d <- subadult_ringed_seal mov <- RW(unique(as.POSIXct(d$date,tz="GMT")))
d <- subadult_ringed_seal mov <- RW(unique(as.POSIXct(d$date,tz="GMT")))
The reference class implements a Random Walk (e.g. Nielsen et al. 2006).
simulate(x0 = c(0, 0))
Function to simulate from the movement model. The initial states (latitudinal/y-coordinate location and longitudinal/x-coordinate location) must be given. The function only returns the locations. If nauticalStates==TRUE, the result is returned in nautical miles.
Nielsen, A., Bigelow, K. A., Musyl, M. K. and Sibert, J. R. (2006) Improving light-based geolocation by including sea surface temperature. Fisheries Oceanography, 15: 314-325. doi: 10.1111/j.1365-2419.2005.00401.x
Other "Movement models": CSB-class
,
CTCRW-class
, DCRW-class
,
DIRAC-class
, DSBHN-class
,
DSBW-class
, GDCRW-class
,
MPCTCRW-class
,
Movement-class
, OUL-class
,
OUV-class
d <- subadult_ringed_seal mov <- RW(unique(as.POSIXct(d$date,tz="GMT")))
d <- subadult_ringed_seal mov <- RW(unique(as.POSIXct(d$date,tz="GMT")))
Generic function to simulate tracks
simTrack(object, n, ...)
simTrack(object, n, ...)
object |
Object to simulate from |
n |
Number of replications |
... |
other parameters |
Christoffer Moesgaard Albertsen
simTrack,Animal-method
, simTrack,Measurement-method
, simTrack,Movement-method
Simulate from an Animal state-space model
## S4 method for signature 'Animal' simTrack(object, n = 1, newObject = TRUE, ...)
## S4 method for signature 'Animal' simTrack(object, n = 1, newObject = TRUE, ...)
object |
Animal reference class describing the state-space model to simulate from |
n |
Number of replications |
newObject |
Should a new Animal object be added to the returned matrix? |
... |
Not used |
A (2 + newObject) x n matrix where the first row (X) contains lists with a matrix of simulated movement tracks, the second row (Y) contains lists with a matrix of simulated observations, and the third row (Animal - if present) contains lists with a new Animal object based on the simulated values.
Christoffer Moesgaard Albertsen
simTrack
, simTrack,Measurement-method
, simTrack,Movement-method
Simulate from a measurement model with observation information
## S4 method for signature 'Measurement' simTrack(object, n = 1, observation, ...)
## S4 method for signature 'Measurement' simTrack(object, n = 1, observation, ...)
object |
Measurement reference class object to simulate from |
n |
Number of replications |
observation |
Observation reference class object with time points and Argos location class information to use in the simulation |
... |
Not used |
A 2 x number of time steps in observation x n array of simulated values
Christoffer Moesgaard Albertsen
simTrack
, simTrack,Animal-method
, simTrack,Movement-method
Simulate from a movement model
## S4 method for signature 'Movement' simTrack(object, n = 1, x0 = object$mu[, 1], ...)
## S4 method for signature 'Movement' simTrack(object, n = 1, x0 = object$mu[, 1], ...)
object |
Movement reference class object implementing the model to simulate from |
n |
Number of replications |
x0 |
Initial values |
... |
not used |
A 2 x number of time steps in object x n array of simulated values
Christoffer Moesgaard Albertsen
simTrack
, simTrack,Animal-method
, simTrack,Measurement-method
Track data from the adult ringed seal with tag id 43847.
subadult_ringed_seal
subadult_ringed_seal
A data frame with 3586 rows and 5 variables:
Tag id
Date and time of the observation
Argos location class of the observation
Observed latitude (degrees north) from the Argos system
Observed longitude (degrees east) from the Argos system
Fisheries and Oceans Canada
Albertsen, C. M., Whoriskey, K., Yurkowski, D., Nielsen, A., and Flemming, J. M. (2015) Fast fitting of non-Gaussian state-space models to animal movement data via Template Model Builder. Ecology, 96(10), 2598-2604. doi: 10.1890/14-2101.1