side.density: Add an estimate of the probability density function.

View source: R/side.density.R

side.densityR Documentation

Add an estimate of the probability density function.

Description

The function adds an estimate of the probability density function (PDF) of the projections.

Usage

side.density(
  x,
  horiz = TRUE,
  col = "black",
  scale = 0.1,
  alpha = 0.3,
  shades = FALSE,
  prob = c(0.25, 0.5, 0.75),
  density.offset = 0,
  density.reverse = FALSE
)

Arguments

x

Numeric vector with the values of the individual projections.

horiz

Logical (default = TRUE). If TRUE the PDF is drawn horizontally.

col

Color for the PDF.

scale

A vector indicating how much to scale the PDF. Default is 0.1

alpha

A vector indicating the transparency to be applied to col. Alpha ranges from 0 (fully transparent) to 1 (opaque). Default is 0.3.

shades

Logical (default = FALSE). If TRUE add shades for the quantiles defined in prob.

prob

A vector giving the quantiles to be highlighted in the PDF. Default is the quartiles.

density.offset

A vector indicating how much the PDF should be shifted relative to the bottom part of the plot. Default is 0.

density.reverse

Logical (default = FALSE). If TRUE plot the PDF upside down.

Details

The function is intended for internal use only. The function adds the PDF to the cascade plot.

Author(s)

J. Fernández and M.D. Frías


SantanderMetGroup/visualizeR documentation built on Oct. 28, 2023, 6:11 a.m.