Learn R Programming

foieGras (version 0.6-7)

fit_mpm: fit a a Move Persistence Model (mpm)

Description

fit a random walk with time-varying move persistence to location data (e.g., output from fit_ssm)

Usage

fit_mpm(
  x,
  model = c("mpm", "jmpm"),
  optim = c("optim", "nlminb"),
  verbose = 1,
  control = NULL,
  inner.control = NULL
)

Arguments

x

a data frame of observations (see details)

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)

optim

numerical optimizer

verbose

report progress during minimization

control

list of control parameters for the outer optimization (type ?nlminb or ?optim for details)

inner.control

list of control parameters for the inner optimization

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

Run this code
# NOT RUN {
## fit jmpm to two southern elephant seals
data(fssm)
dmp <- grab(fssm, "predicted", as_sf=FALSE)
dmp <- dmp[, c("id", "date", "lon", "lat")]
fmpm <- fit_mpm(dmp, model = "jmpm")


# }

Run the code above in your browser using DataLab