addCI | R Documentation |
Adds simultaneous confidence intervals for quantiles and means to an existing plot.
addCI(x, CIs, component = 1, bord = NA, mean = TRUE, mean.color = 'plum4',
quan.color = 'lightsteelblue3', opaq = 0.7, ...)
x |
: a ‘Smcmc’ class object |
CIs |
: the output from the 'getCI' function |
component |
: numeric indicating which component to draw the confidence intervals for |
bord |
: logical for whether a border is desired around the confidence intervals |
mean |
: logical argument whether the mean is to be plotted |
mean.color |
: color for the mean confidence interval |
quan.color |
: color for the quantile confidence intervals |
opaq |
: opacity of |
... |
: arguments passed on to the boundaries of the confidence intervals in 'segments' |
adds segments for confidence intervals into an already existing plot environment
chain <- matrix(0, ncol = 1, nrow = 1e3)
chain[1,] <- 0
err <- rnorm(1e3)
for(i in 2:1e3)
{
chain[i,] <- .3*chain[i-1,] + err[i]
}
chain <- Smcmc(list(chain))
plot(density(chain$stacked[,1]))
CIs <- getCI(chain)
addCI(chain, CIs, component = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.