fitDrate: 'fitDrate' Fit state-space model to weighted drift dive...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/fitDrate.R

Description

fitDrate Fit state-space model to weighted drift dive record

Usage

1
fitDrate(data, weight = "default", prefilter = 0)

Arguments

data

Data frame with dive data output from the pDrift function.

weight

Select weightingbvariables to be used. Default is to use weight created by pDrift. See example for how to specify other weighting

prefilter

Should any prefiltering be done (based on selected weight) prior to running the model.

Details

Takes a dive set of dive data from SRDLs (Sea Mammal Research Unit), with added variables from rbs and pDrift and fits a state-space model to change over time (using TMB).

Value

A list with several objects from fit:

data

Original input data

w

Weighting used for probability of drift dive

tSeq

Regular time series (e.g. whole days) where predictions are obtained

obj

TMB object

opt

TMB optimization

par

Fitted parameters

rep

TMB report

allsd

Standard deviation of fitted values

plsd

Fitted values

Author(s)

Martin Biuw

See Also

rbs Reverse Broken Stick algorithm

check.pDrift to interactively check drift dive weightings

pDrift to calculate drift rate and probability weightings for drift dive detection

fitPlot To plot output from fitDrift

Other Drift dive functions: check.pDrift(), fitPlot(), pDrift(), rbs()

Examples

1
2
3
4
5
rbs(data=dive, num=100, n.bs=4)
dive <- rbs(data=dive, num=NA, n.bs=4)
dive <- pDrift(dive)
fit <- fitDrate(dive, prefilter=0.01)
fit2 <- fitDrate(dive, weight='rRes*span*dWt', prefilter=0.01)

embiuw/drifteR documentation built on March 1, 2021, 6:40 a.m.