FitCTMCdive: Fits continuous-time Markov chain to dive and surface...

View source: R/ctmc_dive.R

FitCTMCdiveR Documentation

Fits continuous-time Markov chain to dive and surface duration data

Description

Fits continuous-time Markov chain to dive and surface duration data

Usage

FitCTMCdive(
  forms,
  dat,
  print = TRUE,
  min_dwell = list(dive = 0, surface = 0),
  series = FALSE,
  re = "none",
  exp_time = NULL,
  fixed_decay = FALSE,
  knots = NULL,
  dt = NULL
)

Arguments

forms

a list with formulae for dive and surface variables

dat

a data.frame with at least three columns named dive (dive durations), surface (surface durations), and time (start time of dive); all of these must be numeric.

print

if TRUE, useful output is printed

min_dwell

Minimum dwell time in a state. Useful if, for example, dives are only categorised as such if they are longer than a certain interval. Named list, needs to be in the same units as time, surface and dive.

series

if TRUE then series data, otherwise dive-by-dive data

dt

set time-step in integration, otherwise set to total_time / 10000

rf

if TRUE then fit a discrete random effect on dive


r-glennie/CTMCdive documentation built on July 3, 2023, 11:01 p.m.