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

Format

An object of class StatDensityWatercolor (inherits from Stat, ggproto, gg) of length 4.

Arguments

k

Number of bootstrapped smoothers. The default is 1000.

color

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

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.

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.