Conference Program Home
  My Program

All Times EDT

Abstract Details

Activity Number: 33 - Recent Advances in Statistical Graphics
Type: Contributed
Date/Time: Sunday, August 7, 2022 : 2:00 PM to 3:50 PM
Sponsor: Section on Statistical Graphics
Abstract #323657
Title: Ggdensity: Improved Bivariate Density Visualization in R
Author(s): James Otto* and David Kahle
Companies: Baylor University: Department of Statistics and Baylor University: Department of Statistics
Keywords: Data Visualization; Density Estimation; ggplot2; R
Abstract:

A popular strategy for visually summarizing bivariate data is plotting contours of an estimated density surface. Most commonly, the density is estimated with a kernel density estimator (KDE) and the plotted contours correspond to equally spaced intervals of the estimated density's height. Notably, this is the case for geom_density_2d() and geom_density_2d_filled() from ggplot2. The proposed ggdensity package extends ggplot2, providing more interpretable visualizations of bivariate density estimates using highest density regions (HDRs). geom_hdr() and geom_hdr_lines() serve as drop-in replacements for the aforementioned ggplot2 functions, plotting density contours that are chosen to be inferentially relevant. By default, they plot the smallest regions containing 50%, 80%, 95%, and 99% of the estimated density (the HDRs). ggdensity also implements the estimation and plotting of HDRs resulting from estimators other than the standard KDE; densities can be estimated by histograms, frequency polygons, and fitting a parametric bivariate normal model. Also included are the functions geom_hdr_fun() and geom_hdr_fun_lines() for plotting HDRs of user-specified probability density functions.


Authors who are presenting talks have a * after their name.

Back to the full JSM 2022 program