Fits a BAM model of one of several variants using Hamiltonian Monte Carlo.
bam_estimate(bamdata, variant = c("manning", "amhg", "manning_amhg"), bampriors = NULL, meas_error = TRUE, reparam = TRUE, cores = getOption("mc.cores", default = parallel::detectCores()), chains = 3L, iter = 1000L, stanmodel = NULL, pars = NULL, include = FALSE, ...)
bamdata | A bamdata object, as produced by |
---|---|
variant | Which BAM variant to use: amhg, manning_amhg, or manning |
bampriors | A bampriors object. If none is supplied, defaults are used
from calling |
meas_error | Include measurement error in inference? Setting this to TRUE will slow down the inference by roughly an order of mangnitude. |
reparam | Reparameterize measurement errors to speed up sampling? |
cores | Number of processing cores for running chains in parallel.
See |
chains | A positive integer specifying the number of Markov chains. The default is 3. |
iter | Number of iterations per chain (including warmup). Defaults to 1000. |
stanmodel | A |
pars | (passed to |
include | (passed to |
... | Other arguments passed to rstan::sampling() for customizing the Monte Carlo sampler |