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

Description Usage Arguments Value

Description

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

Usage

1
2
FitCTMCdive(forms, dat, model = "iid", model.args = NULL,
  print = TRUE, iterlim = 500)

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.

model

"iid" fits a CTMC where durations are independent over time, "cor" fits temporal smooths so that durations can be temporally correlated.

model.args

if model = "cor" then model.args is a list with "nknots" set to the number of knots in the temporal smooth; it also must contain a vector "lambda" with two elements that correspond to "dive" and "surface" processes, if set to NA then no temporal smooth is fit, otherwise must be a positive number. This lambda is the smoothing penalty: the larger lambda is, the smoother the estimated temporal curve.

print

if TRUE, useful output is printed

iterlim

iteration limit for nlm optimiser (default is 500)

Value

a CTMCdive model object: a list of the estimated results (res), variance matrix (var), fitted model returned from nlm (mod), design matrices (Xs), formulae (forms), indices that divide par between dive and surface parameters (len), data frame (dat), model arguments (model.args) including smoothing matrices, and the model type (model).


r-glennie/CTMCdive documentation built on June 3, 2019, 5:46 p.m.