dnplot | R Documentation |
Primarily intended for plotting posterior densities
dnplot(
M,
labs,
pos = FALSE,
lwd = 3,
bty = "n",
lty = 1,
col = pal(p),
ylab = "Density",
xlab = "",
las = 1,
dens.par = NULL,
...
)
M |
A vector or matrix of values upon which the density plot is based; if a matrix, separate densities will be estimated and plotted for each column |
labs |
If supplied, a legend is printed; order of |
pos |
Are the densities strictly positive? If so, a boundary correction is applied. Default: FALSE |
lwd , bty , lty , col , xlab , ylab , las |
Plotting options, as in |
dens.par |
Additional arguments to |
... |
Additional arguments to |
M <- cbind(rgamma(1000, 2, 2), rnorm(1000))
dnplot(M[,1])
dnplot(M[,1], pos=TRUE)
dnplot(M)
dnplot(M, labs=c('Gamma', 'Normal'))
dnplot(M, labs=c('Gamma', 'Normal'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.