Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


trps (version 0.1.0)

two_source_priors_params: Adjust Bayesian priors - Two Source Trophic Position

Description

Adjust priors for two source trophic position model derived from Post 2002.

Usage

two_source_priors_params(
  a = NULL,
  b = NULL,
  c1 = NULL,
  c1_sigma = NULL,
  c2 = NULL,
  c2_sigma = NULL,
  n1 = NULL,
  n1_sigma = NULL,
  n2 = NULL,
  n2_sigma = NULL,
  dn = NULL,
  dn_sigma = NULL,
  tp_lb = NULL,
  tp_ub = NULL,
  sigma_lb = NULL,
  sigma_ub = NULL,
  bp = FALSE
)

Value

stanvars object to be used with brms() call.

Arguments

a

(α) exponent of the random variable for beta distribution. Defaults to 1. See beta distribution for more information.

b

(β) shape parameter for beta distribution. Defaults to 1. See beta distribution for more information.

c1

mean (μ) prior for the mean of the first δ13C baseline. Defaults to -21.

c1_sigma

variance (σ)for the mean of the first δ13C baseline. Defaults to 1.

c2

mean (μ) prior for or the mean of the second δ13C baseline. Defaults to -26.

c2_sigma

variance (σ)for the mean of the first δ13C baseline. Defaults to 1.

n1

mean (μ) prior for the mean of the first δ15N baseline. Defaults to 8.

n1_sigma

variance (σ)for the mean of the first δ15N baseline. Defaults to 1.

n2

mean (μ) prior for or the mean of the second δ15N baseline. Defaults to 9.5.

n2_sigma

variance (σ) for the mean of the second δ15N baseline. Defaults to 1.

dn

mean (μ) prior value for ΔN. Defaults to 3.4.

dn_sigma

variance (σ) for δ15N. Defaults to 0.25.

tp_lb

lower bound for priors for trophic position. Defaults to 2.

tp_ub

upper bound for priors for trophic position. Defaults to 10.

sigma_lb

lower bound for priors for σ. Defaults to 0.

sigma_ub

upper bound for priors for σ. Defaults to 10.

bp

logical value that controls whether informed priors are supplied to the model for both δ15N and δ15C baselines. Default is FALSE meaning the model will use uninformed priors, however, the supplied data.frame needs values for both δ15N and δ15C baseline (c1, c2, n1, and n2).

Details

We will use the following equations from Post 2002:

  1. δ13Cc=α(δ13C1δ13C2)+δ13C2

  2. δ15N=ΔN×(tpλ1)+n1×α+n2×(1α)

  3. δ15N=ΔN×(tp(λ1×α+λ2×(1α)))+n1×α+n2×(1α)

  • The random exponent (α; a) and shape parameters (β; b) for α. This prior assumes a beta distribution.

  • The mean (c1; μ) and variance (c1_sigma; σ) of the mean for the first δ13C for a given baseline. This prior assumes a normal distributions.

  • The mean (c2;μ) and variance (c2_sigma; σ) of the mean for the second δ13C for a given baseline. This prior assumes a normal distributions.

  • The mean (n1; μ) and variance (n1_sigma; σ) of the mean for the first δ15N for a given baseline. This prior assumes a normal distributions.

  • The mean (n2;μ) and variance (n2_sigma; σ) of the mean for the second δ15N for a given baseline. This prior assumes a normal distributions.

  • The mean (dn; μ) and variance (dn_sigma; σ) of ΔN (i.e, trophic enrichment factor). This prior assumes a normal distributions.

  • The lower (tp_lb) and upper (tp_ub) bounds for priors for trophic position. This prior assumes a uniform distributions.

  • The lower (sigma_lb) and upper (sigma_ub) bounds for variance (σ). This prior assumes a uniform distributions.

See Also

two_source_priors(), two_source_model(), and brms::brms()

Examples

Run this code
two_source_priors_params()

Run the code above in your browser using DataLab