stat_cubicspline: Plot the cubic spline density

Description Usage Arguments

Description

This function is to be added as a stat_ to a ggplot2 plot. It creates a density plot calculated from the cubic spline of the cumulative frequency of a variable.

Usage

1
2
3
4
stat_cubicspline(mapping = NULL, data = NULL, geom = "line",
  position = "identity", na.rm = FALSE, show.legend = NA,
  inherit.aes = TRUE, minval = 0, maxval = 100, break_size = 10,
  adjust_to_zero = FALSE, to_density = TRUE, ...)

Arguments

minval

The minimum value in a range of values

maxval

The maximum value in a range of values

break_size

The size of each break

adjust_to_zero

If minimum derivative is < 0 update derivatives to derivatives + min(derivatives)

to_density

Adjust derivatives so that AUC = 1


jcbain/cubicsplines documentation built on May 24, 2019, 4:06 a.m.