jagsBayesianModel: Returns a JAGS-based Bayesian model to use within...

jagsBayesianModelR Documentation

Returns a JAGS-based Bayesian model to use within tRophicPosition.

Description

This function returns a string with a Bayesian model to be used with trophic position calculations

Usage

jagsBayesianModel(model = NULL, ...)

Arguments

model

string. Can be "oneBaseline", "twoBaselines" or "twoBaselinesFull" at the moment.

...

additional arguments passed to jagsOneBaseline, jagsTwoBaselines or jagsTwoBaselinesFull.

Value

a jags model as a character string

Examples

# Example with priors for TP.
# One baseline Bayesian model with prior for trophic position of consumer
# defined as a normal distribution with mean 3 and sd 1
model.string <- jagsBayesianModel(model = "oneBaseline", TP = "dnorm(3,1)")

# Two baselines model with trophic level of baseline = 1
model.string <- jagsBayesianModel(model = "twoBaselines", lambda = 1)

# Two baselines full model with priors for alpha
model.string <- jagsBayesianModel(model = "twoBaselinesFull",
alpha = "dbeta(10,1)")

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