View source: R/get_bmaBUGScode.R
get_bmaBUGScode | R Documentation |
Gets a copy of the BUGS code and writes it to the screen and (optionally) to a text file
get_bmaBUGScode(
option = "smooth",
print.screen = FALSE,
save.local = FALSE,
incl.2deriv = FALSE,
Y1perfect = FALSE,
seFromData = FALSE
)
option |
text string defining which particular variant is desired |
print.screen |
Logical, should the code be printed to the console? |
save.local |
Logical, should text file of the BUGS code be produced? |
incl.2deriv |
Logical, Should there be a calculation of the indicator's second derivative? |
Y1perfect |
Logical, should the first year for each species be assumed to be known without error ('TRUE') |
seFromData |
Logical, Should the standard errors be read in from data ('TRUE') or estimated ('FALSE') |
There are a number of model to choose from:
"smooth"
The default option. Indicator defined by Growth rates, with Ruppert smoother, allowing for species to join late. Error on the first year of each species' time-series is assumed to be zero. The indicator is the expected value of the geometric mean across species (with missing species imputed).
Includes three options: 'seFromData' 'Y1perfect' and 'incl.2deriv'. See bayesian_meta_analysis for mode details. Using the default values 'seFromData = FALSE' and 'Y1perfect = TRUE' are the options used in Freeman et al. (2020).
"smooth_det2"
Equivalent to smooth with 'seFromData = TRUE' and 'Y1perfect = FALSE'. Retained for backwards compatability. Choosing this option will overwrite user-entered options for 'seFromData' and 'Y1perfect'.
"smooth_det_sigtheta"
Equivalent to smooth with 'seFromData = FALSE' and 'Y1perfect = FALSE'. Retained for backwards compatability. Choosing this option will overwrite user-entered options for 'seFromData' and 'Y1perfect'.
"smooth_det"
Specific variant of smooth_det2 - deprecated but retained here for backward compatibility
get_bmaBUGScode(option="smooth", print.screen=TRUE, save.local=FALSE)
get_bmaBUGScode(option="smooth_JABES", print.screen=TRUE, save.local=FALSE)
get_bmaBUGScode(option="smooth_det", print.screen=TRUE, save.local=FALSE)
get_bmaBUGScode(option="smooth_det2", print.screen=TRUE, save.local=FALSE)
get_bmaBUGScode(option="smooth_det_sigtheta", print.screen=TRUE, save.local=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.