gibbs | R Documentation |
Fits the Bayesian hierarchical dose-response model of \insertCiteMiller2014;textualespresso to multiple species using rjags
\insertCitePlummer2019espresso, and estimates posterior model probabilities using a Gibbs Variable Selection (GVS) approach \insertCiteOHara2009espresso.
gibbs(
dat,
random.effects = FALSE,
pseudo.n = 10000,
mcmc.n = 1000,
burnin = 1000,
n.chains = 1,
thin = 1,
epsilon.upper = 30
)
dat |
Input data. Must be an object of class |
random.effects |
Logical. When |
pseudo.n |
Number of iterations for the pseudo-priors. |
mcmc.n |
Number of posterior samples. |
burnin |
Number of iterations to discard as burn-in. |
n.chains |
Number of MCMC chains. |
thin |
Thinning interval. |
epsilon.upper |
Upper bound on the ε parameter used in the random effect model formulation. |
Adapted from original code developed by Dina Sadykova as part of the Mocha project. The function can accommodate species/species groups either as a fixed or a random effect.
A list object of class gvs
.
Phil J. Bouchet
summary.gvs
## Not run:
library(espresso)
# Simulate data for two species
mydat <- simulate_data(n.species = 2,
n.whales = 16,
max.trials = 3,
covariates = list(exposed = c(0, 5), range = 0.5),
mu = c(101, 158),
phi = 20,
sigma = 20,
Rc = c(210, 211),
seed = 58697)
summary(mydat)
# Model selection by GVS
gvs <- gibbs(dat = mydat,
random.effects = FALSE,
mcmc.n = 1000,
burnin = 500)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.