Skip to contents

EcoState priors

Usage

evaluate_prior(priors, p)

Arguments

priors

Either:

  • A list of sampling statements (e.g., logtau_i[] ~ dnorm(mean = log(0.5), sd = 1)) for named parameters. See "Details" for a list of parameters and their descriptions.

  • A function that takes as input the list of parameters out$obj$env$parList() where out is the output from ecostate(), and returns a numeric vector where the sum is the log-prior probability. For example log_prior = function(p) dnorm( p$logq_i[1], mean=0, sd=0.1, log=TRUE) specifies a lognormal prior probability for the catchability coefficient for the first taxa with logmean of zero and logsd of 0.1

p

List of parameters

Value

Log-prior density (numeric)

Details

Priors can be specified as a list of sampling statements, with parameter names on the left-hand side and density functions and their named arguments on the right-hand side. SEM parameters should be referred to by their names, while all other parameters are indexed (e.g., by taxa, year, or stanza group) and should be specified with brackets. E.g., the following list specifies priors on an SEM parameter named rho_X, the biomass process errors for all time steps for taxa Y epsilon_ti[,"Y"], and the ecotrophic efficiency for all taxa:


 priors <- list(
   rho_X ~ dnorm(mean = 0, sd = 0.5),
   epsilon_ti[,"Y"] ~ dnorm(mean = 0, sd = 0.1),
   EE_i[] ~ dnorm(mean = 1, sd = 0.1)
 )