posteriorTP: Function to generate posterior samples of a trophic position...

posteriorTPR Documentation

Function to generate posterior samples of a trophic position JAGS model

Description

This is a wrapper of coda.samples which in turn, is a wrapper of jags.samples. It extracts random samples from the posterior distribution of the parameters of a jags model.

Usage

posteriorTP(
  model,
  variable.names = c("TP", "muDeltaN"),
  n.iter = 10000,
  burnin = NULL,
  thin = 10,
  quiet = FALSE,
  ...
)

Arguments

model

a JAGS model object returned by any of functions jagsOneBaseline, jagsTwoBaselines, jagsTwoBaselinesFull or jagsBayesianModel

variable.names

vector of characters giving the names of variables to be monitored.

n.iter

integer defining the number of iterations. By default is 10000

burnin

number of iterations discarded as burn in.

thin

thinning interval to get posterior samples.

quiet

logical value to indicate whether messages generated during posterior sampling will be suppressed, as well as the progress bar.

...

additional arguments passed to coda.samples.

Value

mcmc.list object containing posterior samples of the Bayesian model.

Examples

## Not run: 
isotopeData <- generateTPData()
model.string <- jagsBayesianModel()
model <- TPmodel(data = isotopeData, model.string = model.string,
n.adapt = 500)
posterior.samples <- posteriorTP(model, n.iter = 500)

## End(Not run)

clquezada/tRophicPosition documentation built on Jan. 4, 2023, 12:31 p.m.