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

fit_mpm

fit a a Move Persistence Model (mpm)


Description

fit a random walk with time-varying move persistence to temporally regular or irregular location data

Usage

fit_mpm(
  x,
  what = "predicted",
  model = c("jmpm", "mpm"),
  coords = 3:4,
  control = mpm_control(),
  inner.control = NULL,
  optim = NULL,
  optMeth = NULL,
  verbose = NULL
)

Arguments

x

a fG_ssm fit object or a data frame of observations (see details)

what

if a fG_ssm fit object is supplied then what determines whether fitted or predicted (default) values are mapped; ignored if x is a data frame

model

mpm model to fit; either mpm with unpooled random walk variance parameters (sigma_(g,i)) or jmpm with a single, pooled random variance parameter (sigma_g)

coords

column numbers of the location coordinates (default = 3:4)

control

list of control settings for the outer optimizer (see mpm_control for details)

inner.control

list of control parameters for the inner optimization

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

verbose

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

Value

a list with components

fitted

a dataframe of fitted locations

par

model parameter summary

data

input dataframe

tmb

the tmb object

opt

the object returned by the optimizer

Examples

## fit jmpm to two southern elephant seal tracks
xs <- fit_ssm(sese2, spdf=FALSE, model = "rw", time.step=72, 
control = ssm_control(se = FALSE, verbose = 0))

fmpm <- fit_mpm(xs, model = "jmpm")

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.