No known key found for this signature in database
GPG Key ID: 1D7529BE14E2BBA9
2 changed files with
24 additions and
0 deletions
-
R/stat-logspline.R
-
man/stat_logspline.Rd
|
@ -68,6 +68,17 @@ StatLogspline <- ggproto( |
|
|
|
|
|
|
|
|
#' Computes logspline density (+ counts estimate), probability, survival & hazard |
|
|
#' Computes logspline density (+ counts estimate), probability, survival & hazard |
|
|
#' |
|
|
#' |
|
|
|
|
|
#' |
|
|
|
|
|
#' @section Computed variables: |
|
|
|
|
|
#' |
|
|
|
|
|
#' - `density` : the density estimate |
|
|
|
|
|
#' - `count`: computed counts (similar to [ggplot2::stat_density()]) |
|
|
|
|
|
#' - `probs`: distribution function |
|
|
|
|
|
#' - `survival`: survival function |
|
|
|
|
|
#' - `hazard` : hazard function |
|
|
|
|
|
#' |
|
|
|
|
|
#' By default the `y` aesthetic is mapped to `stat(density)` |
|
|
|
|
|
#' |
|
|
#' @inheritParams ggplot2::stat_density |
|
|
#' @inheritParams ggplot2::stat_density |
|
|
#' @param n numbe of points for the density estimation (larger == smoother) |
|
|
#' @param n numbe of points for the density estimation (larger == smoother) |
|
|
#' @param max_knots the maximum number of knots. The routine stops adding knots when |
|
|
#' @param max_knots the maximum number of knots. The routine stops adding knots when |
|
|
|
@ -71,6 +71,19 @@ to the paired geom/stat.} |
|
|
\description{ |
|
|
\description{ |
|
|
Computes logspline density (+ counts estimate), probability, survival & hazard |
|
|
Computes logspline density (+ counts estimate), probability, survival & hazard |
|
|
} |
|
|
} |
|
|
|
|
|
\section{Computed variables}{ |
|
|
|
|
|
|
|
|
|
|
|
\itemize{ |
|
|
|
|
|
\item \code{density} : the density estimate |
|
|
|
|
|
\item \code{count}: computed counts (similar to \code{\link[ggplot2:stat_density]{ggplot2::stat_density()}}) |
|
|
|
|
|
\item \code{probs}: distribution function |
|
|
|
|
|
\item \code{survival}: survival function |
|
|
|
|
|
\item \code{hazard} : hazard function |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
By default the \code{y} aesthetic is mapped to \code{stat(density)} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
\examples{ |
|
|
\examples{ |
|
|
library(ggplot2) |
|
|
library(ggplot2) |
|
|
|
|
|
|
|
|