DS.micro.inf {BayesGOF} R Documentation

MicroInference for DS Prior Objects

Description

Provides DS nonparametric adaptive Bayes and parametric estimate for a specific observation y_0.

Usage

DS.micro.inf(DS.GF.obj, y.0, n.0, e.0 = NULL)



Arguments

 DS.GF.obj Object resulting from running DS.prior function on a data set. 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. e.0 In the case of the Poisson family with exposure, represents the exposure value for a given count value y.0.

Details

Returns an object of class DS.GF.micro that can be used in conjunction with plot command to display the DS posterior distribution for the new study.

Value

 DS.mean Posterior mean for \pi_{LP}(\theta | y_0). DS.mode Posterior mode for \pi_{LP}(\theta | y_0). PEB.mean Posterior mean for \pi_G(\theta | y_0). PEB.mode Posterior mode for \pi_G(\theta | y_0). post.vec Vector containing PEB.mean, DS.mean, PEB.mode, and DS.mode. study User-provided y_0 and n_0. post.fit Dataframe with \theta, \pi_G(\theta | y_0), and \pi_{LP}(\theta | y_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

### MicroInference for Naval Shipyard Data: sample where y = 0 and n = 5
data(ship)
ship.ds <- DS.prior(ship, max.m = 2, c(.5,.5), family = "Binomial")
ship.ds.micro <- DS.micro.inf(ship.ds, y.0 = 0, n.0 = 5)
ship.ds.micro
plot(ship.ds.micro)


[Package BayesGOF version 5.2 Index]