
Sets up path to JAGS script, initial values, and variable list to monitor
Source:R/setup_likelihood.R
setup_likelihood.RdThis function defines the jagsmodel script to call based on the selected distribution. It also defines the initial values and variables to monitor.
Usage
setup_likelihood(
distribution,
data,
manual_prior = FALSE,
prior_list = NULL,
random = FALSE
)Arguments
- distribution
Any of
'Normal','Gamma','Skewed','Lognormal', or'Beta'.- data
Emissions data from either the best source or top performers, must have a column named
emissions.- manual_prior
Default is
FALSE, priors are uninformative and calculated from range of emissions data. ifTRUEpriors should be specified manually inprior_list.- prior_list
Optional list of
stats::dunif()upper and lower bounds for prior distributions. For'Normal'they are orderedc(sd_low, sd_high, mean_low, mean_high). For'Lognormal'they are orderedc(log_sd_low, log_sd_high, log_mean_low, log_mean_high). For'Skewed'they are orderedc(omega_low, omega_high, xi_low, xi_high, alpha_low, alpha_high). For'Gamma'they are orderedc(rate_low, rate_high, shape_low, shape_high). For'Beta'they are orderedc(alpha_low, alpha_high, beta_low, beta_high)`.- random
Default is
FALSEwhere random seeds are defined via.RNG.nameand.RNG.seedso JAGS runs will be exactly reproducible. Changing toTRUEwill use random values for.RNG.nameand.RNG.seedinstead.