fit_ssm: Fit a Continuous-time Random Walk state-space filter to Argos...

Description Usage Arguments Value Examples

Description

fits a simple random walk in continuous time to filter Argos KF or LS data and predict locations on a regular time step

Usage

1
2
fit_ssm(d, span = 0.1, min.dt = 0, min.dist = 100, pf = FALSE,
  ptime, ...)

Arguments

d

a data frame of observations including Argos KF error ellipse info

span

degree of loess smoothing (range: 0 - 1) to identify potential outliers in prefilter

min.dt

minimum allowable time difference between observations; dt <= min.dt will be ignored by the SSM

min.dist

minimum distance from track to define potential outlier locations in prefilter ##' @param ptime the regular time interval, in hours, to predict to. Alternatively, a vector of prediction times, possibly not regular, must be specified as a data.frame with id and POSIXt dates.

pf

just pre-filter the data, do not fit the ctrw (default is FALSE)

...

arguments passed to sfilter, described below:

fit.to.subset

fit the SSM to the data subset determined by prefilter (default is TRUE)

psi

estimate scaling parameter for the KF measurement error model error ellipses (0 = no psi, default; 1 = single psi for semi-minor axis)

optim

numerical optimizer (nlminb or optim)

verbose

report progress during minimization

Value

a list with components

call

the matched call

predicted

a data.frame of predicted location states

fitted

a data.frame of fitted locations

par

model parameter summmary

data

the input data.frame

subset

the inpu subset vector

mem

the measurement error model used

opt

the object returned by the optimizer

tmb

the TMB object

rep

TMB sdreport

aic

the calculated Akaike Information Criterion

time

the processing time for sfilter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
require(dplyr)
data(ellie)
## fit KF measurement error model
fkf <- fit_ssm(ellie, min.dist = 150, ptime = 12, psi = 0)

## fit KFp measurement error model
fkfp <- fit_ssm(ellie, min.dist = 150, ptime = 12, psi = 1)

## fit LS measurement error model
fls <- fit_ssm(ellie[, 1:5], min.dist = 150, ptime = 12)

## End(Not run)

ianjonsen/ctrw documentation built on July 7, 2019, 7:30 p.m.