Learn R Programming

hdrcde: Highest Density Regions and Conditional Density Estimation

The R package hdrcde provides tools for computing highest density regions in one and two dimensions, kernel estimates of univariate density functions conditional on one covariate, and multimodal regression.

This package implements the methods described in the following papers.

Installation

You can install the stable version on R CRAN.

install.packages('hdrcde', dependencies = TRUE)

You can install the development version from Github

pak::pak("robjhyndman/hdrcde")

License

This package is free and open source software, licensed under GPL 3.

Copy Link

Version

Install

install.packages('hdrcde')

Monthly Downloads

17,856

Version

3.5.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Rob Hyndman

Last Published

January 11th, 2026

Functions in hdrcde (3.5.0)

hdr.cde

Calculate highest density regions continuously over some conditioned variable.
hdrconf

HDRs with confidence intervals
lane2

Speed-Flow data for Californian Freeway
BoxCox

Box Cox Transformation
modalreg

Nonparametric Multimodal Regression
hdrscatterplot

Scatterplot showing bivariate highest density regions
plot.hdrcde

Plots highest density regions continuously over some conditioned variable.
cde

Conditional Density Estimation
hdr.boxplot

Highest Density Region Boxplots
hdr.den

Density plot with Highest Density Regions
hdr

Highest Density Regions
cde.bandwidths

Bandwidth calculation for conditional density estimation
plot.cde

Plots conditional densities
hdrbw

Highest Density Region Bandwidth
maxtemp

Daily maximum temperatures in Melbourne, Australia
hdr.2d

Bivariate Highest Density Regions
plot.hdrconf

Plot HDRs with confidence intervals