dsdive.fwdsample.dive: Simulate dive trajectories across discrete depth bins

Description Usage Arguments Value Examples

View source: R/dsdive.fwdsample.dive.R

Description

The method will simulate a complete dive from its beginning to end.

Usage

1
dsdive.fwdsample.dive(depth.bins, beta, lambda, t0, steps.max, T1, T2)

Arguments

depth.bins

n x 2 Matrix that defines the depth bins. The first column defines the depth at the center of each depth bin, and the second column defines the half-width of each bin.

beta

Directional preference model parameters. See dsdive.tx.params for more details.

lambda

Diving rate model parameters. See dsdive.tx.params for more details.

t0

Initial time for the dive

steps.max

maximum number of transitions to sample before stopping, regardless of whether dive has finished.

T1

stage 1 duration

T2

stage 2 duration

Value

A dsdive object, which is a list with the following vectors:

depths

Record of which depth bin indices the trajectory visited

durations

Record of amount of time spent in each depth bin

times

The time at which each depth bin was entered

stages

The stage at which each depth bin was entered

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data('dive.sim')
attach(dive.sim)
attach(dive.sim$params)

# simulate dive
x = dsdive.fwdsample.dive(depth.bins = depth.bins, beta = beta, 
                          lambda = lambda, t0 = 0, steps.max = 1e3, 
                          T1 = 15*60, T2 = 12*60)

pl = plot(x = x, depth.bins = depth.bins)

detach(dive.sim$params)
detach(dive.sim)

jmhewitt/dsdive documentation built on May 29, 2020, 5:18 p.m.