fitNLSbouts,data.frame-method {diveMove} | R Documentation |
Fit mixture of Poisson Processes to Log Frequency data via Non-linear Least Squares regression
Description
Methods for modelling a mixture of 2 or 3 random Poisson processes to histogram-like data of log frequency vs interval mid points. This follows Sibly et al. (1990) method.
Usage
## S4 method for signature 'data.frame'
fitNLSbouts(obj, start, maxiter, ...)
## S4 method for signature 'Bouts'
fitNLSbouts(obj, start, maxiter, ...)
Arguments
obj |
Object of class |
start , maxiter |
Arguments passed to |
... |
Optional arguments passed to |
Value
nls
object resulting from fitting this model to data.
Methods (by class)
-
data.frame
: Fit NLS model ondata.frame
-
Bouts
: Fit NLS model onBouts
object
Author(s)
Sebastian P. Luque spluque@gmail.com
References
Sibly, R.; Nott, H. and Fletcher, D. (1990) Splitting behaviour into bouts Animal Behaviour 39, 63-69.
See Also
fitMLEbouts
for a better approach;
boutfreqs
; boutinit
Examples
## Run example to retrieve random samples for two- and three-process
## Poisson mixtures with known parameters as 'Bouts' objects
## ('xbouts2', and 'xbouts3'), as well as starting values from
## broken-stick model ('startval2' and 'startval3')
utils::example("boutinit", package="diveMove", ask=FALSE)
## 2-process
bout2.fit <- fitNLSbouts(xbouts2, start=startval2, maxiter=500)
summary(bout2.fit)
bec(bout2.fit)
## 3-process
## The problem requires using bound constraints, which is available
## via the 'port' algorithm
l_bnds <- c(100, 1e-3, 100, 1e-3, 100, 1e-6)
u_bnds <- c(5e4, 1, 5e4, 1, 5e4, 1)
bout3.fit <- fitNLSbouts(xbouts3, start=startval3, maxiter=500,
lower=l_bnds, upper=u_bnds, algorithm="port")
plotBouts(bout3.fit, xbouts3)
[Package diveMove version 1.6.2 Index]