boutfreqs(x, bw, method=c("standard", "seq.diff"), plot=TRUE)
boutinit(lnfreq, x.break, plot=TRUE)
labelBouts(x, bec, bec.method=c("standard", "seq.diff"))
logit(p)
unLogit(logit)labelBouts it can also be a matrix with
different variables for which bouts should be identified.boutfreqs returns a data frame with components lnfreq
containing the log frequencies and x, containing the
corresponding mid points of the histogram. Empty bins are excluded.
A plot is produced as a side effect if argument plot is TRUE. See the
Details section. boutinit returns a list with components a1, lambda1, a2, and
lambda2, which are starting values derived from broken stick model. A plot
is produced as a side effect if argument plot is TRUE.
labelBouts returns a numeric vector sequentially labelling each
row or element of x, which associates it with a particular bout.
unLogit and logit return a numeric vector with the
(un)transformed arguments.
boutfreqs creates a histogram with the log transformed
frequencies of x with a chosen bin width and upper limit. Bins
following empty ones have their frequencies averaged over the number
of previous empty bins plus one.
boutinit fits a "broken stick" model to the log frequencies
modelled as a function of x (well, the midpoints of the binned
data), using a chosen value to separate the two processes.
labelBouts labels each element (or row, if a matrix) of x
with a sequential number, identifying which bout the reading belongs
to.
logit and unLogit are useful for reparameterizing the
negative maximum likelihood function, if using Langton et al. (1995).
Luque, S.P. and Guinet, C. (2007) A maximum likelihood approach for identifying dive bouts improves accuracy, precision, and objectivity. Behaviour, 144, 1315-1332.
Mori, Y.; Yoda, K. and Sato, K. (2001) Defining dive bouts using a sequential differences analysis. Behaviour, 2001 138, 1451-1466.
Sibly, R.; Nott, H. and Fletcher, D. (1990) Splitting behaviour into bouts. Animal Behaviour 39, 63-69.
bouts2.nls, bouts.mle.data(divesSummary)
postdives <- divesSummary$postdive.dur[divesSummary$trip.no == 2]
## Remove isolated dives
postdives <- postdives[postdives < 2000]
lnfreq <- boutfreqs(postdives, bw=0.1, method="seq.diff", plot=FALSE)
boutinit(lnfreq, 50)Run the code above in your browser using DataLab