Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sfilter

fit the state-space model to data after passing through prefilter


Description

generates initial values for model parameters and unobserved states; structures data and initial values for C++ TMB template; fits state-space model; minimizes the joint log-likelihood via the selected optimizer (nlminb or optim); structures and passes output object to fit_ssm

Usage

sfilter(
  x,
  model = c("rw", "crw"),
  time.step = 6,
  scale = FALSE,
  parameters = NULL,
  map = NULL,
  fit.to.subset = TRUE,
  control = ssm_control(),
  inner.control = NULL
)

Arguments

x

Argos data passed through prefilter()

model

specify which SSM is to be fit: "rw" or "crw"

time.step

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.

scale

scale location data for more efficient optimization.

parameters

a list of initial values for all model parameters and unobserved states, default is to let sfilter specify these. Only play with this if you know what you are doing...

map

a named list of parameters as factors that are to be fixed during estimation, e.g., list(psi = factor(NA))

fit.to.subset

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

control

list of control parameters for the outer optimization (see ssm_control for details)

inner.control

list of control settings for the inner optimization (see ?TMB::MakeADFUN for additional details)

verbose

[Deprecated] use ssm_control(verbose = 1) instead, see ssm_control for details

optim

[Deprecated] use ssm_control(optim = "optim") instead, see ssm_control for details

optMeth

[Deprecated] use ssm_control(method = "L-BFGS-B") instead, see ssm_control for details

lpsi

[Deprecated] use ssm_control(lower = list(lpsi = -Inf)) instead, see ssm_control for details

Details

called by fit_ssm, not intended for general use. sfilter can only fit to an individual track, use fit_ssm to fit to multiple tracks (see ?fit_ssm).


foieGras

Fit Continuous-Time State-Space and Latent Variable Models for Quality Control of Argos Satellite (and Other) Telemetry Data and for Estimating Movement Behaviour

v0.7-6
MIT + file LICENSE
Authors
Ian Jonsen [aut, cre, cph], Toby Patterson [aut, ctb]
Initial release
2021-04-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.