list.secr.fit {secr}R Documentation

Fit Multiple SECR Models

Description

This function is a wrapper for secr.fit that allows multiple models to be fitted.

Usage


list.secr.fit (..., constant = list(), prefix = "fit", names = NULL) 

Arguments

...

varying arguments of secr.fit

constant

list of named arguments held constant

prefix

character prefix for automatic names

names

character names of output

Details

The ... argument may be one or several vectors of the same length that refer to a different named argument of secr.fit. secr.fit is called with the constant arguments plus the first value in each vector, then the second value, etc. The logic follows mapply.

Each of the ... arguments may also be a named argument with a single value, although the compound values should be wrapped in list(), passed by name (in quotes), or placed in the 'constant' list to avoid misinterpretation. For example, the capthist argument of secr.fit should be be wrapped in list() or " " if it is placed outside 'constant'.

'prefix' is used only if 'names' is not supplied.

Value

An secrlist of the successful model fits (see secr.fit).

In the special case that ‘constant’ specifies ‘details’ with component LLonly = TRUE, the list of values from secr.fit without checking or modification.

Note

This function replaces the previous function par.secr.fit: since the introduction of multi-threading in secr 4.0 it is no longer efficient to use parallel worker processes.

See Also

secr.fit, AIC.secr, predict.secr

Examples


## Not run: 

# fit two detection models
fits <- list.secr.fit (model = c(g0~1, g0~b), constant = list(captdata, trace = FALSE))
AIC(fits)

# alternatively,
fits <- list.secr.fit ('captdata', model = c(g0~1, g0~b), trace = FALSE)
AIC(fits)

# replacing par.derived and par.region.N:

lapply(fits, derived)
lapply(fits, region.N)


## End(Not run)


[Package secr version 5.0.0 Index]