checkEmptyBins-methods: Method 'checkEmptyBins'

checkEmptyBinsR Documentation

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 signature 'distributionH'
checkEmptyBins(object)

Arguments

object

a distributionH object

Value

A distributionH object without empty bins

Author(s)

Antonio Irpino

Examples


## ---- 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)

HistDAWass documentation built on Sept. 26, 2022, 5:06 p.m.