DS.Finite.Bayes {BayesGOF} | R Documentation |
A function that generates the finite Bayes prior and posterior distribution, along with the Bayesian credible interval for the posterior mean.
DS.Finite.Bayes(DS.GF.obj, y.0, n.0 = NULL,
cred.interval = 0.9, iters = 25)
DS.GF.obj |
Object from |
y.0 |
For Binomial family, number of success |
n.0 |
For the Binomial family, the total number of trials for the new study. In the Normal family, |
cred.interval |
The desired probability for the credible interval of the posterior mean; the default is 0.90 ( |
iters |
Integer value of total number of iterations. |
prior.fit |
Fitted values for the estimated parametric, DS, and finite Bayes prior distributions. |
post.fit |
Dataframe with |
interval |
The |
post.vec |
Vector containing the PEB posterior mean ( |
Doug Fletcher, Subhadeep Mukhopadhyay
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.
Efron, B., 2018. "Bayes, Oracle Bayes, and Empirical Bayes," Technical Report.
## Not run:
### Finite Bayes: Rat with theta_71 (y_71 = 4, n_71 = 14)
data(rat)
rat.start <- gMLE.bb(rat$y, rat$n)$estimate
rat.ds <- DS.prior(rat, max.m = 4, rat.start. family = "Binomial")
rat.FB <- DS.FiniteBayes(rat.ds, y.0 = 4, n.0 = 14)
plot(rat.FB)
## End(Not run)