fit,commOccu-method | R Documentation |
Convenience function for fitting community occupancy models (defined in a commOccu object) in JAGS or Nimble.
## S4 method for signature 'commOccu'
fit(
object,
n.iter = 100,
thin = 1,
n.burnin = n.iter/2,
n.adapt = 0,
chains = 3,
inits = NULL,
compile = TRUE,
WAIC = FALSE,
quiet = FALSE,
...
)
object |
|
n.iter |
number of iterations to monitor |
thin |
thinning interval for monitors |
n.burnin |
burnin length. Defaults to half of n.iter. |
n.adapt |
Length of adaptive phase |
chains |
number of MCMC chains to run |
inits |
named list. Initial values to use. If NULL (default), the values from the inits function in |
compile |
logical. If Nimble model, compile model with |
WAIC |
logical. Return WAIC (only Nimble models) |
quiet |
if TRUE messages and progress bar will be suppressed |
... |
additional arguments to pass to |
Models will be fit either in JAGS or Nimble, depending on the decision made in the nimble
argument in communityModel
.
For Nimble, compilation is strongly recommended for long model runs. Uncompiled models can run extremely slow. Compilation itself can take a while also, and requires that Rtools is available on the system.
This is a convenience function only which hides some of the configuration options. If you require more control over model fitting, you can run all steps individually. See vignette 5 for details.
A coda::mcmc.list
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.