Learn R Programming

BayesGOF (version 5.2)

DS.entropy: Full and Excess Entropy of DS(G,m) prior

Description

A function that calculates the full entropy of a DS(G,m) prior. For DS(G,m) with \(m > 0\), also returns the excess entropy \(q\)LP.

Usage

DS.entropy(DS.GF.obj)

Arguments

DS.GF.obj

Object resulting from running DS.prior function on a data set.

Value

ent

The total entropy of the DS(G,m) prior where \(m \geq 0\).

qLP

The excess entropy when \(m > 0\).

References

Mukhopadhyay, S. and Fletcher, D., 2018. "Generalized Empirical Bayes via Frequentist Goodness of Fit," Nature Scientific Reports, 8(1), p.9983, https://www.nature.com/articles/s41598-018-28130-5 .

Examples

Run this code
# NOT RUN {
data(rat)
rat.start <- gMLE.bb(rat$y, rat$n)$estimate
rat.ds <- DS.prior(rat, max.m = 4, rat.start, family = "Binomial")
DS.entropy(rat.ds)
# }

Run the code above in your browser using DataLab