Learn R Programming

HistDAWass (version 1.0.8)

checkEmptyBins: Method checkEmptyBins

Description

The method checking for empty bins in a distribution, i.e. if two cdf consecutive values are equal. In that case a probability value of 1e-7 is assigned to the empty bin and the cdf is recomputed. This methods is useful for numerical reasons.

Usage

checkEmptyBins(object)

# S4 method for distributionH checkEmptyBins(object)

Value

A distributionH object without empty bins

Arguments

object

a distributionH object

Author

Antonio Irpino

Examples

Run this code

## ---- A mydist distribution with an empty bin i.e. two consecutive values of p are equal----
mydist <- distributionH(x = c(1, 2, 3, 10), p = c(0, 0.5, 0.5, 1))
## ---- Checks for empty byns and returns the newdist object without empty bins ----
newdist <- checkEmptyBins(mydist)

Run the code above in your browser using DataLab