stat_density_watercolor: Bootstrapped Confidence Envelope for Density

View source: R/stat_density_watercolor.R

stat_density_watercolorR Documentation

Bootstrapped Confidence Envelope for Density

Description

This function creates a confidence envelope for the empirical density by bootstrapping from the data. Transparency is used to indicate the level of uncertainty.

Arguments

k

Number of bootstrapped smoothers. The default is 1000.

alpha

Transparency level for the paths that make up the bootstrapped fitted lines. This may need to be adjusted if the argument ⁠k=⁠ is changed. The default value is alpha=0.03.

color

Color for the bootstrapped densities that make up the confidence envelope. The default is color="#1D91C0"

model

The model to bootstrap from. The default is model="none" which bootstraps from the data. Using model="normal" draws repeated samples from a normal distribution with parameters based on the data.

Aesthetics

These stat uses geom_line() so support the same aesthetics: alpha, colour, group, linetype and size.


zief0002/educate documentation built on July 27, 2023, 9:25 a.m.