par.openCR.fit: Fit Multiple openCR Models

par.openCR.fitR Documentation

Fit Multiple openCR Models

Description

This function is a wrapper for openCR.fit.

Usage


par.openCR.fit (arglist, ncores = 1, seed = 123, trace = FALSE, logfile = NULL, 
    prefix = "")

Arguments

arglist

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

ncores

integer number of cores used by parallel::makeClusters()

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

Details

In openCR >= 1.5.0, setting ncores > 1 is deprecated and triggers a warning: multithreading makes it faster to set ncores = 1 in par.secr.fit.

trace overrides any settings in arglist.

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).

Using ncores>1 is obsolete under the multithreading regime in openCR >= 1.5.0. It is usually slower than ncores = 1. If used it has these effects:

– worker processes are generated using the parallel package,

– one model is fitted on each worker, and

– if no logfile name is provided then a temporary file name will be generated in tempdir().

Value

For par.openCR.fit - openCRlist of model fits (see openCR.fit and openCRlist). 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.

Note

Any attempt in arglist to set ncores > 1 for a particular openCR fit was ignored in openCR < 1.5.0. Now it is allowed.

See Also

openCR.fit, Parallel, make.table, openCRlist

Examples


## Not run: 

m1 <- list(capthist = ovenCH, model = list(p~1, phi~1)) 
m2 <- list(capthist = ovenCH, model = list(p~session, phi~1))
m3 <- list(capthist = ovenCH, model = list(p~session, phi~session) )
setNumThreads(7)  # on quadcore Windows PC
fits <- par.openCR.fit (c('m1','m2','m3'), ncores = 1)
AIC(fits)


## End(Not run)

openCR documentation built on Sept. 25, 2022, 5:06 p.m.