Correlated Random Walk Filter

Share:

Description

Format track data for filtering

Usage

1
dat4jags(d, tstep = 1, tpar = tpar())

Arguments

d

a data frame of observations (see details)

tstep

the time step to predict to (in days)

tpar

generalised t-distribution parameters for ARGOS location classes. By default dat4jags uses the parameters estimated in Jonsen et al (2005) Ecology 86:2874-2880 but users may specify other ARGOS error parameter values via the tpar function.

Details

This is an internal function used by fit_ssm to format track data for JAGS.

The input track is given as a dataframe where each row is an observed location and columns

'id'

individual animal identifier,

'date'

observation time (POSIXct,GMT),

'lc'

ARGOS location class,

'lon'

observed longitude,

'lat'

observed latitude.

Location classes can include Z, F, and G; where the latter two are used to designate fixed (known) locations (e.g. GPS locations) and "generic" locations (e.g. geolocation data) where the user supplies the error standard deviations, either via the tpar function or as two extra columns in the input data.

From this dat4jags calculates interpolation indices idx and weights ws such that if x is the matrix of predicted states, the fitted locations are ws*x[idx+1,] + (1-ws)*x[idx+2,].

Value

A list with components

id

the unique identifier for each dataset

y

a 2 column matrix of the lon,lat observations

itau2

a 2 column matrix of the ARGOS precision (1/scale) parameters

nu

a 2 column matrix of the ARGOS df parameters

idx

a vector of interpolation indices

ws

a vector of interpolation weights

ts

the times at which states are predicted (POSIXct,GMT)

obs

the input observed data frame

tstep

the time step specified in the fitSSM call

References

Jonsen ID, Mills Flemming J, Myers RA (2005) Robust state-space modeling of animal movement data. Ecology 86:2874-2880 (Appendix A)