View source: R/Module_calcPercChangeMCMC.R
MCMC version of trend metric calculation (replaces old version based on PBSModelling and Metropolis algorithm)
1 2 3 4 5 6 7 8 9 | calcPercChangeMCMC(
vec.in,
model.in = NULL,
perc.change.bm = -25,
na.skip = FALSE,
out.type = "short",
mcmc.plots = FALSE,
convergence.check = FALSE
)
|
vec.in |
vector with numeric values |
model.in |
if NULL, use the BUGS code in the built in function trend.bugs.1() |
perc.change.bm |
benchmark for Prob(Decl>BM), default = -25 |
na.skip |
if TRUE, skip the calculations when vec.in contains any NA |
out.type |
"short" or "long". "short" gives summary table of posterior plus "PercChange" and "ProbDecl" "long" also includes the full mcmc samples and the jags output object |
mcmc.plots |
if true, create the standard series of MCMC diagnostic plots Note that these are printed to the default device (i.e. need to external wrap the function call inside a pdf /dev.off call) To get a plot of the model fit, run this function with out.type = "long", and then use plot.trend.fit(). |
convergence.check |
if TRUE, do an automated convergence check |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.