Description Usage Arguments Value

This function computes the highest density region (HDR) with support on the integers. The distribution can be any discrete
distribution concentrated on the integers — it does not have to have any shape properties for the function to work. The user
must give the density function “'f“' for the distribution. To improve the search properties of the algorithm, the user can
also give lower and upper bounds for the support of the distribution if these are available. (Warning: If the user specifies
incorrect bounds on the support, that do not contain the full support of the distribution, then the algorithm may continue to
search without end, in which case the function will not terminate. Similarly, if the user specifies a sequence function E that
is not a proper bijection to the integers then the algorithm may continue to search without end, in which case the function will
not terminate.) The output of the function is a `'hdr'`

object containing the HDR for the discrete distribution.

1 2 3 4 5 6 7 8 9 | ```
HDR.discrete(
cover.prob,
f,
supp.min = -Inf,
supp.max = Inf,
E = NULL,
...,
distribution = "an unspecified input distribution"
)
``` |

`cover.prob` |
The minimum coverage probability for the region |

`f` |
The density (mass) function for the distribution |

`supp.min` |
A minimum bound for the support of the distribution |

`supp.max` |
A maximum bound for the support of the distribution |

`E` |
A bijective function mapping the natural numbers (1,2,3,...) to a set covering the support of the distribution (optional); if included, the algorithm will search the support of the distribution in the order specified by this function; if not included, the algorithm will search the integers in a default order. |

`...` |
additional parameters of f |

`distribution` |
a label |

If all inputs are correctly specified (i.e., arguments and parameters are in allowable range) then the output will be a list of class “'hdr“' containing the HDR and related information.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.