dcrw: Correlated Random Walk Filter

Description Usage Arguments Details Value

Description

Correlated Random Walk Filter

Usage

1
2
3
4
dcrw(data, subset = rep(TRUE, nrow(data)), tstep = 6/24, nu = 10,
  gamma = 0.5, span = 0.1, verbose = FALSE, optim = c("nlminb",
  "optim"), extrap = FALSE, parameters = NULL, esf = aesfCRAWL(),
  theta.zero = FALSE, common.tau = FALSE)

Arguments

data

A dataframe representing the track (see details)

subset

Logical vector indicating which rows of the data frame be kept in the filtering

tstep

The time step to predict to (in days)

nu

The degrees of freedom parameter for the location errors

gamma

The autocorrelation parameter used to estimate initial parameters.

span

The span parameter for the loess fits used to estimate initial locations.

verbose

Enable tracing information

optim

The function used to minimize the negative log likelihood.

extrap

If TRUE, the final predicted state occurs immediately before the last observation, otherwise the final predicted state occurs immediately after the last observation.

parameters

The TMB parameter list.

esf

The error scale factors for the location classes.

theta.zero

Should theta be fixed at zero.

common.tau

Should a common tau parameter be fitted for longitude and latitude.

Details

Fit a correlated random walk to filter a track and predict locations on a regular time step.

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

'date'

observation time (as GMT POSIXct),

'lon'

observed longitude,

'lat'

observed latitude,

'lc'

location class.

The TMB parameter list can be specified directly with the parameters argument. Otherwise suitable parameter values are estimated from predicted locations estimated by fitting loess smooths to the raw observations.

If extrap is TRUE, the last observations occur after the last predicted location and the last fitted locations are extrapolations, otherwise the final observations occur before the final predicted locations and all fitted locations are interpolated.

The filtering model assumes the errors in longitude and latitude are proportional to scale factors determined by the location class. The scale factors are speficied through the aes argument. By default the function uses the same scaling factors for location accuracy as used in crawl for ARGOS data.

Value

a list with components

predicted

a dataframe of predicted locations

fitted

a dataframe of fitted locations

par

model parameter summary

data

the input dataframe

subset

the input subset vector

tstep

the prediction time step

theta.zero

has theta been fixed at zero

common.tau

has a common tau been fitted for lon and lat

opt

the object returned by the optimizer

tmb

the TMB object


SWotherspoon/Marseille documentation built on May 9, 2019, 12:05 p.m.