par.secr.fit: Fit Multiple SECR Models

Description Usage Arguments Details Value See Also Examples

View source: R/par.secr.fit.R

Description

These functions are wrappers for secr.fit, region.N and derived that allow multiple models to be fitted simultaneously on multi-core machines.

Usage

1
2
3
4
par.secr.fit (arglist, ncores = 1, seed = 123, trace = TRUE, logfile = "logfile.txt", 
    prefix = "fit.")
par.derived (secrlist, ncores = 1, ...)
par.region.N (secrlist, ncores = 1, ...)

Arguments

arglist

list of argument lists for secr.fit or a character vector naming such lists

ncores

integer number of cores to be used for parallel processing

seed

integer pseudorandom number seed

trace

logical; if TRUE intermediate output may be logged

logfile

character name of file to log progress reports

prefix

character prefix for names of output

...

other arguments passed to derived or region.N

secrlist

secrlist object

Details

Any attempt in arglist to set ncores > 1 for a particular secr fit is ignored.

trace overrides any settings in arglist. Reporting of intermediate results is unreliable on Windows when ncores > 1.

It is convenient to provide the names of the capthist and mask arguments in each component of arglist as character values (i.e. in quotes); objects thus named are exported from the workspace to each worker process (see Examples).

Value

For par.secr.fit - secrlist of model fits (see secr.fit). Names are created by prefixing prefix to the names of argslist. If trace is TRUE then the total execution time and finish time are displayed.

For par.derived - a list of dataframes output from derived, applied to each model in turn.

For par.region.N - a list of dataframes output from region.N, applied to each model in turn.

See Also

secr.fit, region.N, derived, AIC.secr, predict.secr, Parallel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

fit0 <- list(capthist = 'captdata', model = g0~1) 
fitb <- list(capthist = 'captdata', model = g0~b)
fits <- par.secr.fit (c('fit0','fitb'), ncores = 2)
AIC(fits)

par.derived(fits, ncores = 2, se.esa = FALSE)

par.region.N(fits, ncores = 2)


## End(Not run)

secr documentation built on May 19, 2017, 10:32 p.m.

Search within the secr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.