denFill: Density plot with confidence interval filled in

Description Usage Arguments Details Author(s) See Also Examples

View source: R/denFill.R

Description

Plot the interpolated density of data (most likely results from a Monte Carlo simulation or estimation) along with a confidence interval (specified by alpha) shadded in.

Usage

1
2
3
denFill(dist, alpha = 0.05, alternative = c("two.sided", "less",
  "greater"), col = "black", lwd = 2, transp = 0.3, add = FALSE,
  ...)

Arguments

dist

numeric vector for which density is to be plotted

alpha

critical value

alternative

specify whether to plot a two-sided CI, upper or lower

col

color for plotting

lwd

line width

transp

transparancy of shadded region

add

logical, whether to add to an existing plot

...

further arguments passed to plot

Details

This function can plot desnity and quantiles for any vector and would be well suited for bootstrapping, permutational null models and also credible intervals from Bayesian MCMC samples

Author(s)

Andy Rominger <ajrominger@gmail.com>

See Also

density, quantile

Examples

1
2
x <- rnorm(100)
denFill(x)

ajrominger/socorro documentation built on Jan. 3, 2020, 6:25 a.m.