DS.Finite.Bayes {BayesGOF} R Documentation

## Conduct Finite Bayes Inference on a DS object

### Description

A function that generates the finite Bayes prior and posterior distribution, along with the Bayesian credible interval for the posterior mean.

### Usage

```DS.Finite.Bayes(DS.GF.obj, y.0, n.0 = NULL,
cred.interval = 0.9, iters = 25)
```

### Arguments

 `DS.GF.obj` Object from `DS.prior`. `y.0` For Binomial family, number of success y_i for new study. In the Poisson family, it is the number of counts. Represents the study mean for the Normal family. `n.0` For the Binomial family, the total number of trials for the new study. In the Normal family, `n.0` is the standard error of `y.0`. Not used for the Poisson family. `cred.interval` The desired probability for the credible interval of the posterior mean; the default is 0.90 (`90%`). `iters` Integer value of total number of iterations.

### Value

 `prior.fit` Fitted values for the estimated parametric, DS, and finite Bayes prior distributions. `post.fit` Dataframe with θ, π_G(θ | y_0), and π_{LP}(θ | y_0). `interval` The `100*cred.interval`% Bayesian credible interval for the posterior mean. `post.vec` Vector containing the PEB posterior mean (`PEB.mean`), DS posterior mean (`DS.mean`), PEB posterior mode (`PEB.mode`), and the DS posterior mode (`DS.mode`).

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

Efron, B., 2018. "Bayes, Oracle Bayes, and Empirical Bayes," Technical Report.

### Examples

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

[Package BayesGOF version 5.2 Index]