mpmm: Move Persistence Mixed-Effects Model

View source: R/mpmm.r

mpmmR Documentation

Move Persistence Mixed-Effects Model

Description

Fit a move persistence random walk via TMB to a pre-filtered/regularized animal track and estimate gamma as a linear function of covariates

Usage

mpmm(
  formula = NA,
  data = NULL,
  map = NULL,
  control = mpmm_control(),
  inner.control = inner_control()
)

Arguments

formula

a right-hand-side regression formula (no response variable)

data

a data frame of observations (see details)

map

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

control

a list of control parameters for the outer optimization (see mpmm_control)

inner.control

a list of control parameters for the inner optimization (see MakeADFun and newton)

Details

The input track is given as a dataframe where each row is an observed location and columns

'id'

individual animal identifier,

'date'

observation time (POSIXct,GMT),

'lon'

observed longitude,

'lat'

observed latitude,

'tid'

identifier for tracks if there are more than one track per individual (optional),

'...'

named covariates appended to track

Value

a list with components

states

a dataframe of estimated states

fitted

a dataframe of fitted locations

par

model parameter summmary

data

input dataframe

tmb

the tmb object

opt

the object returned by the optimizer

Examples

data(ellie.ice.short)
fit <- mpmm(~ ice + (1 | id), data = ellie.ice.short)
summary(fit)


ianjonsen/mpmm documentation built on Dec. 7, 2022, 4:27 a.m.