dens | R Documentation |
Convenient interface for plotting density estimates.
dens( x , adj=0.5 , norm.comp=FALSE , main="" , show.HPDI=FALSE , show.zero=FALSE , rm.na=TRUE , add=FALSE , ...)
x |
Vector of values to construct density from, or data frame. If |
adj |
width of density kernal. |
norm.comp |
If |
show.HPDI |
If a numeric value, displays HPDI of same width. For example, |
show.zero |
If |
rm.na |
If |
add |
If |
... |
Other parameters to pass to |
This function merely provides a convenient interface for plotting density estimates produced by density
. It handles both single vectors and multiple vectors, contained within a data frame.
Highest Posterior Density Intervals (HPDI) are calculated by HPDinterval
in the coda
package.
Richard McElreath
density
, HPDinterval
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.