Fits an mp state-space model to several individual tracks at once, sharing parameters among individuals according to a share_control specification. Called by fit_ssm when model = "jmp".

jsfilter(
  x,
  model = c("jmp", "jcrw"),
  time.step = NA,
  share = share_control(),
  parameters = NULL,
  map = NULL,
  fit.to.subset = TRUE,
  control = ssm_control(),
  inner.control = NULL,
  ho_lookup = NULL,
  group_lookup = NULL,
  init = c("individual", "moment")
)

Arguments

x

a named list of prefiltered sf-tibbles, one per individual, as produced by prefilter

time.step

prediction interval in hours, a data.frame of prediction times, or NA

share

a parameter sharing specification from share_control

parameters

optional named list of initial values

map

optional named list of parameters to fix during estimation

fit.to.subset

fit to the prefiltered subset of observations

control

a list of control values from ssm_control

inner.control

control settings for the inner optimiser

ho_lookup

optional haulout lookup assembled by fit_ssm

group_lookup

optional data.frame with id and a grouping variable

init

one of "individual" (default) to initialise from separate per-individual mp fits, or "moment" for moment-based starting values. Per-individual initialisation costs an extra pass over the data but substantially improves convergence, because it supplies starting states that are consistent with the starting parameters

Value

a named list of mp_ssm objects, one per individual, all sharing the single joint fit's optimiser output, TMB object and sdreport

Details

The model is written in R using RTMB rather than as a C++ template. A joint fit builds one AD object for the whole data set, so RTMB's taping cost is paid once rather than once per individual.

By default the measurement model and sigma_g are pooled, the process innovation scale is hierarchical, and rho_p is estimated separately per individual. See share_control for the reasoning behind each of those choices, and for the combinations that are refused.