Description Arguments Value See Also Examples
Method for plotting an object of class smcmc
.
x |
An object of class |
trans |
Name list or vector containing names of
transforms for some parameters (ex: |
addPlot1 |
Name of additional plotting function that
will be call after the MCMC chain have been plotted. It
has to have prototype |
addPlot2 |
Name of additional plotting function that
will be call after the histograms have been plotted. It
has to have prototype |
... |
additional arguments to be passed to the plotting functions. |
NULL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(ricker_smcmc)
# Functions for additional annotations (true parameters)
addline1 <- function(parNam, ...){
abline(h = exp(ricker_smcmc@param[parNam]), lwd = 2, lty = 2, col = 3)
}
addline2 <- function(parNam, ...){
abline(v = exp(ricker_smcmc@param[parNam]), lwd = 2, lty = 2, col = 3)
}
# Transformations (exponentials)
trans <- rep("exp", 3)
names(trans) <- names(ricker_smcmc@param)
plot(ricker_smcmc,
trans = trans,
addPlot1 = "addline1",
addPlot2 = "addline2")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.