oSCR.parfit | R Documentation |
This is a wrapper that executes oSCR.fit for multiple cores using doParallel.
oSCR.parfit(mods, data, ncores = 2)
mods |
A table of models to fit, see make.mods() |
data |
A list with the required oSCR.fit objects: data$sf = scrFrame, data$ss = ssDF, data$cs = costDF For example, the function sim.SCR.ms produces the correct objects (see below) |
ncores |
How many cores should be used to fit the models? |
Uses the doParallel package.....
an oSCR fitList object
Andy Royle
make.mods
mods <- make.mods(density= c(~1,~session),
detection = c(~1,~session),
sigma = c(~1,~session),
cost = c(~1))
data<- sim.SCR.ms(sessions=2, sex=TRUE, sex.ratio=0.5, N = 100, K = 3,
alpha0 = -1.5, sigma = 0.5, discard0 = TRUE,
array3d = FALSE, ssRes = 0.5)
# Note: In practice, allowing for model-specific starting values will probably
# be necessary to avoid crashes. Not done yet.
fmL <- oSCR.parfit(mods=mods, scrFrame=data$sf, ssDF=data$ssDF, ncores=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.