This function writes an R script for JAGS to call based on the selected
distribution and prior. The priors are uninformative and
set based on emissions data, unless specified manually via setup_likelihood().
The likelihood distributions are truncated to (0,maxY), where maxY can be
specified or used with the default maxY = 3*max(data$emissions) in run_likelihood().
Arguments
- distribution
Any of
'Normal','Gamma','Skewed','Lognormal', or'Beta'.- manual_prior
Default is
FALSE, if priors should be specified manually or be uninformative calculated from range of emissions data.- write_wd
Default is
NULL, in which case the JAGS scripts are written into inst/JAGS folder in package directory. This is the locationrun_likelihood()will look for the JAGS scripts assigned viasetup_likelihood().
